File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 - name : install dependencies
1010 run : |
1111 sudo apt-get update
12- sudo apt-get install -qq libsdl2 -dev
12+ sudo apt-get install -qq libgl-dev libxcursor-dev libxrandr-dev libxi -dev
1313 - name : build sowon
1414 run : |
1515 make
2222 - name : install dependencies
2323 run : |
2424 sudo apt-get update
25- sudo apt-get install -qq libsdl2 -dev
25+ sudo apt-get install -qq libgl-dev libxcursor-dev libxrandr-dev libxi -dev
2626 - name : build sowon
2727 run : |
2828 make
3232 runs-on : macOS-latest
3333 steps :
3434 - uses : actions/checkout@v1
35- - name : install dependencies
36- run : brew install sdl2 pkg-config
3735 - name : build sowon
3836 run : |
3937 make
4341 runs-on : windows-latest
4442 steps :
4543 - uses : actions/checkout@v4
46- - name : download sdl2
47- run : |
48- curl -fsSL -o SDL2-devel-2.0.12-VC.zip https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip
49- tar -xf SDL2-devel-2.0.12-VC.zip
50- mv SDL2-2.0.12 SDL2
5144 - name : build sowon
5245 shell : cmd
5346 run : |
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ sowon_rgfw
33build /
44* .kra
55* ~
6- SDL2
76* .obj
87* .exe
98.dSYM /
Original file line number Diff line number Diff line change 11UNAMEOS = $(shell uname)
22
33COMMON_CFLAGS = -Wall -Wextra -ggdb -std=c99 -pedantic -Ithirdparty -Ibuild -DPENGER
4- SDL2_CFLAGS = ` pkg-config --cflags sdl2 ` $(COMMON_CFLAGS )
54RGFW_CFLAGS = $(COMMON_CFLAGS )
65COMMON_LIBS = -lm
7- SDL2_LIBS = ` pkg-config --libs sdl2 ` $(COMMON_LIBS )
86ifeq ($(UNAMEOS ) ,Darwin)
97RGFW_LIBS = $(COMMON_LIBS ) -framework CoreVideo -framework Cocoa -framework OpenGL -framework IOKit
108else
@@ -14,13 +12,10 @@ PREFIX?= /usr/local
1412INSTALL? = install
1513
1614.PHONY : all
17- all : Makefile sowon sowon_rgfw man
18-
19- sowon_rgfw : src/main_rgfw.c build/digits.h build/penger_walk_sheet.h
20- $(CC ) $(RGFW_CFLAGS ) -o sowon_rgfw src/main_rgfw.c $(RGFW_LIBS )
15+ all : Makefile sowon man
2116
2217sowon : src/main.c build/digits.h build/penger_walk_sheet.h
23- $(CC ) $(SDL2_CFLAGS ) -o sowon src/main.c $(SDL2_LIBS )
18+ $(CC ) $(RGFW_CFLAGS ) -o sowon src/main.c $(RGFW_LIBS )
2419
2520build/digits.h : build/png2c ./assets/digits.png
2621 ./build/png2c ./assets/digits.png digits > build/digits.h
@@ -42,12 +37,11 @@ man: docs/sowon.6.gz
4237
4338.PHONY : clean
4439clean :
45- rm -r sowon sowon_rgfw build docs/sowon.6.gz
40+ rm -r sowon build docs/sowon.6.gz
4641
4742.PHONY : install
4843install : all
4944 $(INSTALL ) -d $(DESTDIR )$(PREFIX ) /bin
5045 $(INSTALL ) -C ./sowon $(DESTDIR )$(PREFIX ) /bin
51- $(INSTALL ) -C ./sowon_rgfw $(DESTDIR )$(PREFIX ) /bin
5246 $(INSTALL ) -d $(DESTDIR )$(PREFIX ) /man/man6
5347 $(INSTALL ) -C docs/sowon.6.gz $(DESTDIR )$(PREFIX ) /man/man6
Original file line number Diff line number Diff line change 66
77## Build
88
9- Dependencies: [ SDL2 ] ( https://www.libsdl.org/download-2.0.php )
9+ ### Ubuntu
1010
11- ### Debian
1211``` console
13- $ sudo apt-get install libsdl2 -dev
12+ $ sudo apt-get install -qq libgl-dev libxcursor-dev libxrandr-dev libxi -dev
1413$ make
1514$ ./sowon
1615```
1716
1817### MacOS
1918
2019``` console
21- $ brew install sdl2 pkg-config
2220$ make
2321$ ./sowon
2422```
@@ -27,15 +25,10 @@ $ ./sowon
2725
2826#### Visual Studio
2927
30- - Enter the Visual Studio Command Line Development Environment https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
31- - Basically just find ` vcvarsall.bat ` and run ` vcvarsall.bat x64 ` inside of cmd
32- - Download [ SDL2 VC Development Libraries] ( https://libsdl.org/release/SDL2-devel-2.0.12-VC.zip ) and copy it to ` path\to\sowon `
28+ - Enter the Visual Studio Command Line Development Environment < https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line > . Basically just find ` vcvarsall.bat ` and run ` vcvarsall.bat x64 ` inside of cmd
3329
3430``` console
3531> cd path\t o\s owon
36- > tar -xf SDL2-devel-2.0.12-VC.zip
37- > move SDL2-2.0.12 SDL2
38- > del SDL2-devel-2.0.12-VC.zip
3932> build_msvc
4033```
4134
Original file line number Diff line number Diff line change 22rem launch this from msvc-enabled console
33
44set COMMON_CXXFLAGS = /std:c++17 /O2 /FC /W4 /nologo /I thirdparty /I build
5- set SDL2_CXXFLAGS = %COMMON_CXXFLAGS% /I SDL2\include
65set RGFW_CXXFLAGS = %COMMON_CXXFLAGS%
76set COMMON_LIBS = Shell32.lib
8- set SDL2_LIBS = %COMMON_LIBS% SDL2\lib\x64\SDL2.lib SDL2\lib\x64\SDL2main.lib -SUBSYSTEM:windows
97set RGFW_LIBS = %COMMON_LIBS% -SUBSYSTEM:windows /entry:mainCRTStartup
108
119mkdir build
1210cl.exe %COMMON_CXXFLAGS% /Febuild\png2c src\png2c.c /link %COMMON_LIBS% -SUBSYSTEM:console
1311build\png2c.exe assets\digits.png digits > build\digits.h
1412build\png2c.exe assets\penger_walk_sheet.png penger > build\penger_walk_sheet.h
15- cl.exe %SDL2_CXXFLAGS% /Fesowon src/main.c /link %SDL2_LIBS%
16- cl.exe %RGFW_CXXFLAGS% /Fesowon_rgfw src/main_rgfw.c /link %RGFW_LIBS%
13+ cl.exe %RGFW_CXXFLAGS% /Fesowon src/main.c /link %RGFW_LIBS%
You can’t perform that action at this time.
0 commit comments