File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 runs-on : ubuntu-latest
77 steps :
88 - uses : actions/checkout@v1
9- - name : install dependencies
10- run : |
11- sudo apt-get update
12- sudo apt-get install -qq libsdl2-dev
139 - name : build sowon
1410 run : |
1511 make
1915 runs-on : ubuntu-latest
2016 steps :
2117 - uses : actions/checkout@v1
22- - name : install dependencies
23- run : |
24- sudo apt-get update
25- sudo apt-get install -qq libsdl2-dev
2618 - name : build sowon
2719 run : |
2820 make
3224 runs-on : macOS-latest
3325 steps :
3426 - uses : actions/checkout@v1
35- - name : install dependencies
36- run : brew install sdl2 pkg-config
3727 - name : build sowon
3828 run : |
3929 make
4333 runs-on : windows-latest
4434 steps :
4535 - 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
5136 - name : build sowon
5237 shell : cmd
5338 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+ ### POSIX
1010
11- ### Debian
1211``` console
13- $ sudo apt-get install libsdl2-dev
14- $ make
15- $ ./sowon
16- ```
17-
18- ### MacOS
19-
20- ``` console
21- $ brew install sdl2 pkg-config
2212$ make
2313$ ./sowon
2414```
@@ -27,15 +17,10 @@ $ ./sowon
2717
2818#### Visual Studio
2919
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 `
20+ - 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
3321
3422``` console
3523> 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
3924> build_msvc
4025```
4126
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%
1613cl.exe %RGFW_CXXFLAGS% /Fesowon_rgfw src/main_rgfw.c /link %RGFW_LIBS%
You can’t perform that action at this time.
0 commit comments