annotate Makefile @ 24:71bbe11d8de8

did: change shader compilation to run during program compilation, maybe add dynamic version later
author Sam <sam@basx.dev>
date Wed, 11 Jan 2023 11:15:02 +0700
parents b45a5d338cd0
children 8f290112718a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5daf3f236d87 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
1 SOURCES := $(shell find src -name '*.nim')
15
dde536a70483 add: windows builds
Sam <sam@basx.dev>
parents: 13
diff changeset
2
13
a571db114152 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 12
diff changeset
3 # build hello_triangle
24
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
4 build/debug/linux/hello_triangle: ${SOURCES} thirdparty/bin/linux
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 18
diff changeset
5 nim build_linux_debug -o:$@ examples/hello_triangle.nim
24
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
6 build/release/linux/hello_triangle: ${SOURCES} thirdparty/bin/linux
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 18
diff changeset
7 nim build_linux_release -o:$@ examples/hello_triangle.nim
24
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
8 build/debug/windows/hello_triangle.exe: ${SOURCES} thirdparty/bin/windows
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
9 nim build_windows_debug -o:$@ examples/hello_triangle.nim
24
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
10 build/release/windows/hello_triangle.exe: ${SOURCES} thirdparty/bin/windows
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
11 nim build_windows_release -o:$@ examples/hello_triangle.nim
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 18
diff changeset
12
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
13 build_all_linux_hello_triangle: build/debug/linux/hello_triangle build/release/linux/hello_triangle
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
14 build_all_windows_hello_triangle: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
15 build_all_hello_triangle: build_all_linux_hello_triangle build_all_windows_hello_triangle
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
16
24
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
17 # build alotof_triangles
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
18 build/debug/linux/alotof_triangles: ${SOURCES} thirdparty/bin/linux
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
19 nim build_linux_debug -o:$@ examples/alotof_triangles.nim
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
20 build/release/linux/alotof_triangles: ${SOURCES} thirdparty/bin/linux
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
21 nim build_linux_release -o:$@ examples/alotof_triangles.nim
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
22 build/debug/windows/alotof_triangles.exe: ${SOURCES} thirdparty/bin/windows
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
23 nim build_windows_debug -o:$@ examples/alotof_triangles.nim
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
24 build/release/windows/alotof_triangles.exe: ${SOURCES} thirdparty/bin/windows
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
25 nim build_windows_release -o:$@ examples/alotof_triangles.nim
71bbe11d8de8 did: change shader compilation to run during program compilation, maybe add dynamic version later
Sam <sam@basx.dev>
parents: 22
diff changeset
26
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
27 build_all_linux_alotof_triangles: build/debug/linux/alotof_triangles build/release/linux/alotof_triangles
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
28 build_all_windows_alotof_triangles: build/debug/windows/alotof_triangles.exe build/release/windows/alotof_triangles.exe
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
29 build_all_alotof_triangles: build_all_linux_alotof_triangles build_all_windows_alotof_triangles
8
1134f41a49e9 add: a few missing changes
Sam <sam@basx.dev>
parents: 5
diff changeset
30
15
dde536a70483 add: windows builds
Sam <sam@basx.dev>
parents: 13
diff changeset
31 # clean
12
9e5fe647ff91 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 10
diff changeset
32 clean:
9e5fe647ff91 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 10
diff changeset
33 rm -rf build
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
34 rm -rf thirdparty
12
9e5fe647ff91 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 10
diff changeset
35
16
617c6dcddbe2 add: matrix multiplications, tests
Sam <sam@basx.dev>
parents: 15
diff changeset
36 .PHONY: tests
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
37 .PHONY: glslang-master-linux-Debug.zip
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
38 .PHONY: glslang-master-linux-Release.zip
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
39 .PHONY: glslang-master-windows-x64-Debug.zip
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
40 .PHONY: glslang-master-windows-x64-Release.zip
16
617c6dcddbe2 add: matrix multiplications, tests
Sam <sam@basx.dev>
parents: 15
diff changeset
41
15
dde536a70483 add: windows builds
Sam <sam@basx.dev>
parents: 13
diff changeset
42 # tests
13
a571db114152 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 12
diff changeset
43 tests:
a571db114152 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 12
diff changeset
44 testament p tests/
a571db114152 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 12
diff changeset
45
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
46 # publish
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
47 publish_linux_debug_hello_triangle: build/debug/linux/hello_triangle
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
48 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
49 publish_linux_release_hello_triangle: build/release/linux/hello_triangle
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
50 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
51 publish_windows_debug_hello_triangle: build/debug/linux/hello_triangle.exe
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
52 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
53 publish_windows_release_hello_triangle: build/release/linux/hello_triangle.exe
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
54 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
55 publish_all_linux_hello_triangle: publish_linux_debug_hello_triangle publish_linux_release_hello_triangle
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
56 publish_all_windows_hello_triangle: publish_windows_debug_hello_triangle publish_windows_release_hello_triangle
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
57 publish_all_alotof_hello_triangle: publish_all_linux_hello_triangle publish_all_windows_hello_triangle
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
58
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
59 publish_linux_debug_alotof_triangles: build/debug/linux/alotof_triangles
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
60 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
61 publish_linux_release_alotof_triangles: build/release/linux/alotof_triangles
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
62 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
63 publish_windows_debug_alotof_triangles: build/debug/linux/alotof_triangles.exe
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
64 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
65 publish_windows_release_alotof_triangles: build/release/linux/alotof_triangles.exe
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
66 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
67 publish_all_linux_alotof_triangles: publish_linux_debug_alotof_triangles publish_linux_release_alotof_triangles
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
68 publish_all_windows_alotof_triangles: publish_windows_debug_alotof_triangles publish_windows_release_alotof_triangles
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
69 publish_all_alotof_triangles: publish_all_linux_alotof_triangles publish_all_windows_alotof_triangles
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
70
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
71
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
72 # download thirdparty-libraries
2
213fdf8d31dd did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 1
diff changeset
73
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
74 thirdparty/bin/linux: glslang-master-linux-Release.zip
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
75 mkdir -p $@
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
76 cd $@ && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/$<
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
77 cd $@ && unzip $<
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
78 cd $@ && mv bin/* .
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
79 cd $@ && rm -rf $< bin lib include
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
80 thirdparty/bin/windows: glslang-master-windows-x64-Release.zip
5
4ed9cb098315 add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 3
diff changeset
81 mkdir -p $@
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
82 cd $@ && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/$<
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
83 cd $@ && unzip $<
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
84 cd $@ && mv bin/* .
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
85 cd $@ && rm -rf $< bin lib include