Mercurial > games > semicongine
annotate Makefile @ 10:0660ba9d1930
did: make it work on windows
| author | sam <sam@basx.dev> | 
|---|---|
| date | Sat, 24 Dec 2022 22:32:46 +0700 | 
| parents | 1134f41a49e9 | 
| children | 9e5fe647ff91 | 
| rev | line source | 
|---|---|
| 0 | 1 SOURCES := $(shell find src -name '*.nim') | 
| 10 | 2 COMPILE_OPTIONS := --path:src --mm:orc --experimental:strictEffects --threads:on --app:gui | 
| 
2
 
213fdf8d31dd
did: hello world triangle, a bit of code organization
 
Sam <sam@basx.dev> 
parents: 
1 
diff
changeset
 | 
3 DEBUG_OPTIONS := --debugger:native --checks:on --assertions:on | 
| 
 
213fdf8d31dd
did: hello world triangle, a bit of code organization
 
Sam <sam@basx.dev> 
parents: 
1 
diff
changeset
 | 
4 RELEASE_OPTIONS := -d:release --checks:off --assertions:off | 
| 10 | 5 WINDOWS_DEBUG_OPTIONS := --cc:vcc --passC:'/MDd' --passL:'ucrtd.lib' | 
| 6 WINDOWS_RELEASE_OPTIONS := --cc:vcc --passC:'/MD' --passL:'ucrt.lib' | |
| 0 | 7 | 
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
8 # build | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
9 build/debug/linux/test: ${SOURCES} | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
10 mkdir -p $$( dirname $@ ) | 
| 
2
 
213fdf8d31dd
did: hello world triangle, a bit of code organization
 
Sam <sam@basx.dev> 
parents: 
1 
diff
changeset
 | 
11 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/test.nim | 
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
12 build/release/linux/test: ${SOURCES} | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
13 mkdir -p $$( dirname $@ ) | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
14 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/test.nim | 
| 10 | 15 build/debug/windows/test.exe: ${SOURCES} | 
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
16 mkdir -p $$( dirname $@ ) | 
| 10 | 17 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} ${WINDOWS_DEBUG_OPTIONS} -o:$@ examples/test.nim | 
| 18 build/release/windows/test.exe: ${SOURCES} | |
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
19 mkdir -p $$( dirname $@ ) | 
| 10 | 20 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} ${WINDOWS_RELEASE_OPTIONS} -o:$@ examples/test.nim | 
| 
2
 
213fdf8d31dd
did: hello world triangle, a bit of code organization
 
Sam <sam@basx.dev> 
parents: 
1 
diff
changeset
 | 
21 | 
| 8 | 22 build_all_linux: build/debug/linux/test build/release/linux/test | 
| 10 | 23 build_all_windows: build/debug/windows/test.exe build/release/windows/test.exe | 
| 8 | 24 | 
| 25 build_all: build_all_linux build_all_windows | |
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
26 | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
27 # publish | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
28 publish_linux_debug: build/debug/linux/test | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
29 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
30 publish_linux_release: build/release/linux/test | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
31 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
32 publish_windows_debug: build/debug/linux/test | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
33 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
34 publish_windows_release: build/release/linux/test | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
35 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
36 | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
37 publish_all: publish_linux_debug publish_linux_release publish_windows_debug publish_windows_release | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
38 | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
39 | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
40 # download thirdparty-libraries | 
| 
2
 
213fdf8d31dd
did: hello world triangle, a bit of code organization
 
Sam <sam@basx.dev> 
parents: 
1 
diff
changeset
 | 
41 | 
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
42 thirdparty/lib/glslang/linux_debug: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
43 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
44 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Debug.zip | 
| 8 | 45 unzip glslang-master-linux-Debug.zip | 
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
46 thirdparty/lib/glslang/linux_release: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
47 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
48 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
49 unzip glslang-master-linux-Release.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
50 thirdparty/lib/glslang/windows_debug: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
51 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
52 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Debug.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
53 unzip glslang-master-windows-x64-Debug.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
54 thirdparty/lib/glslang/windows_release: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
55 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
56 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
57 unzip glslang-master-windows-x64-Release.zip | 
| 
3
 
5d54ef652619
add: skeleton to download thirdparty builds
 
Sam <sam@basx.dev> 
parents: 
2 
diff
changeset
 | 
58 | 
| 
5
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
59 thirdparty/lib/spirv-tools/linux_debug: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
60 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
61 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-gcc-debug/continuous/1899/20221216-081758/install.tgz | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
62 tar -xf $@/install.tgz | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
63 thirdparty/lib/spirv-tools/linux_release: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
64 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
65 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-gcc-release/continuous/1889/20221216-081754/install.tgz | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
66 tar -xf $@/install.tgz | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
67 thirdparty/lib/spirv-tools/windows_debug: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
68 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
69 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-debug/continuous/1599/20221216-081803/install.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
70 unzip $@/install.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
71 thirdparty/lib/spirv-tools/windows_release: | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
72 mkdir -p $@ | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
73 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1885/20221216-081805/install.zip | 
| 
 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 
Sam <sam@basx.dev> 
parents: 
3 
diff
changeset
 | 
74 unzip $@/install.zip | 
