annotate Makefile @ 473:04b8471bdab4

did: cleanup up a bit
author Sam <sam@basx.dev>
date Tue, 27 Dec 2022 20:47:48 +0700
parents 9eeaeb35eb1c
children a571db114152
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
461
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
1 SOURCES := $(shell find src -name '*.nim')
471
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 469
diff changeset
2 COMPILE_OPTIONS := --path:src --mm:orc --experimental:strictEffects --threads:on --app:gui
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
3 DEBUG_OPTIONS := --debugger:native --checks:on --assertions:on
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
4 RELEASE_OPTIONS := -d:release --checks:off --assertions:off
471
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 469
diff changeset
5 WINDOWS_DEBUG_OPTIONS := --cc:vcc --passC:'/MDd' --passL:'ucrtd.lib'
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 469
diff changeset
6 WINDOWS_RELEASE_OPTIONS := --cc:vcc --passC:'/MD' --passL:'ucrt.lib'
461
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
7
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
8 # build
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
9 build/debug/linux/hello_triangle: ${SOURCES}
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
10 mkdir -p $$( dirname $@ )
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
11 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
12 build/release/linux/hello_triangle: ${SOURCES}
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
13 mkdir -p $$( dirname $@ )
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
14 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
15 build/debug/windows/hello_triangle.exe: ${SOURCES}
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
16 mkdir -p $$( dirname $@ )
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
17 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} ${WINDOWS_DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
18 build/release/windows/hello_triangle.exe: ${SOURCES}
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
19 mkdir -p $$( dirname $@ )
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
20 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} ${WINDOWS_RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
21
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
22 build_all_linux: build/debug/linux/hello_triangle build/release/linux/hello_triangle
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
23 build_all_windows: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe
469
ed49f1cdd8b7 add: a few missing changes
Sam <sam@basx.dev>
parents: 466
diff changeset
24
ed49f1cdd8b7 add: a few missing changes
Sam <sam@basx.dev>
parents: 466
diff changeset
25 build_all: build_all_linux build_all_windows
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
26
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
27 clean:
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
28 rm -rf build
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
29
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
30 # publish
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
31 publish_linux_debug: build/debug/linux/hello_triangle
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
32 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
33 publish_linux_release: build/release/linux/hello_triangle
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
34 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
35 publish_windows_debug: build/debug/linux/hello_triangle
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
36 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
37 publish_windows_release: build/release/linux/hello_triangle
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
38 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
39
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
40 publish_all: publish_linux_debug publish_linux_release publish_windows_debug publish_windows_release
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
41
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
42
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
43 # download thirdparty-libraries
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
44
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
45 thirdparty/lib/glslang/linux_debug:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
46 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
47 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Debug.zip
469
ed49f1cdd8b7 add: a few missing changes
Sam <sam@basx.dev>
parents: 466
diff changeset
48 unzip glslang-master-linux-Debug.zip
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
49 thirdparty/lib/glslang/linux_release:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
50 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
51 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
52 unzip glslang-master-linux-Release.zip
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
53 thirdparty/lib/glslang/windows_debug:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
54 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
55 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Debug.zip
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
56 unzip glslang-master-windows-x64-Debug.zip
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
57 thirdparty/lib/glslang/windows_release:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
58 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
59 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
60 unzip glslang-master-windows-x64-Release.zip
464
7cae1900c9a7 add: skeleton to download thirdparty builds
Sam <sam@basx.dev>
parents: 463
diff changeset
61
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
62 thirdparty/lib/spirv-tools/linux_debug:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
63 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
64 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
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
65 tar -xf $@/install.tgz
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
66 thirdparty/lib/spirv-tools/linux_release:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
67 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
68 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
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
69 tar -xf $@/install.tgz
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
70 thirdparty/lib/spirv-tools/windows_debug:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
71 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
72 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
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
73 unzip $@/install.zip
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
74 thirdparty/lib/spirv-tools/windows_release:
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
75 mkdir -p $@
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
76 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
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
77 unzip $@/install.zip