annotate Makefile @ 483:73a0954beabd

did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
author Sam <sam@basx.dev>
date Wed, 11 Jan 2023 00:43:17 +0700
parents 1670f8e70964
children 71bbe11d8de8
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')
476
6862ca8c1324 add: windows builds
Sam <sam@basx.dev>
parents: 474
diff changeset
2
474
d4750f2e0760 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 473
diff changeset
3 # build hello_triangle
479
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 477
diff changeset
4 build/debug/linux/hello_triangle: ${SOURCES}
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
5 nim build_linux_debug -o:$@ examples/hello_triangle.nim
479
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 477
diff changeset
6 build/release/linux/hello_triangle: ${SOURCES}
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
7 nim build_linux_release -o:$@ examples/hello_triangle.nim
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
8 build/debug/windows/hello_triangle.exe: ${SOURCES} build/nim_windows
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
9 # ${WINE_NIM} build_windows_debug -o:$@ examples/hello_triangle.nim
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
10 nim build_windows_debug -o:$@ examples/hello_triangle.nim
479
16842d15319a add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 477
diff changeset
11 build/release/windows/hello_triangle.exe: ${SOURCES} build/nim_windows
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
12 nim build_windows_release -o:$@ examples/hello_triangle.nim
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
13
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
14 # build alotof_triangles
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
15 build/debug/linux/alotof_triangles: ${SOURCES}
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
16 nim build_linux_debug -o:$@ examples/alotof_triangles.nim
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
17 build/release/linux/alotof_triangles: ${SOURCES}
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
18 nim build_linux_release -o:$@ examples/alotof_triangles.nim
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
19 build/debug/windows/alotof_triangles.exe: ${SOURCES} build/nim_windows
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
20 nim build_windows_debug -o:$@ examples/alotof_triangles.nim
482
1670f8e70964 add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 479
diff changeset
21 build/release/windows/alotof_triangles.exe: ${SOURCES} build/nim_windows
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
22 nim build_windows_release -o:$@ examples/alotof_triangles.nim
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
23
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
24 build_all_linux_hello_triangle: build/debug/linux/hello_triangle build/release/linux/hello_triangle
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
25 build_all_windows_hello_triangle: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
26 build_all_hello_triangle: build_all_linux_hello_triangle build_all_windows_hello_triangle
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
27
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
28 build_all_linux_alotof_triangles: build/debug/linux/alotof_triangles build/release/linux/alotof_triangles
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
29 build_all_windows_alotof_triangles: build/debug/windows/alotof_triangles.exe build/release/windows/alotof_triangles.exe
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
30 build_all_alotof_triangles: build_all_linux_alotof_triangles build_all_windows_alotof_triangles
469
ed49f1cdd8b7 add: a few missing changes
Sam <sam@basx.dev>
parents: 466
diff changeset
31
476
6862ca8c1324 add: windows builds
Sam <sam@basx.dev>
parents: 474
diff changeset
32 # clean
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
33 clean:
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
34 rm -rf build
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
35 rm -rf thirdparty
473
04b8471bdab4 did: cleanup up a bit
Sam <sam@basx.dev>
parents: 471
diff changeset
36
477
f226c99b5043 add: matrix multiplications, tests
Sam <sam@basx.dev>
parents: 476
diff changeset
37 .PHONY: tests
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
38 .PHONY: glslang-master-linux-Debug.zip
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
39 .PHONY: glslang-master-linux-Release.zip
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
40 .PHONY: glslang-master-windows-x64-Debug.zip
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
41 .PHONY: glslang-master-windows-x64-Release.zip
477
f226c99b5043 add: matrix multiplications, tests
Sam <sam@basx.dev>
parents: 476
diff changeset
42
476
6862ca8c1324 add: windows builds
Sam <sam@basx.dev>
parents: 474
diff changeset
43 # tests
474
d4750f2e0760 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 473
diff changeset
44 tests:
d4750f2e0760 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 473
diff changeset
45 testament p tests/
d4750f2e0760 add: vector/matrix modules, tests, nim config script
Sam <sam@basx.dev>
parents: 473
diff changeset
46
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
47 # publish
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
48 publish_linux_debug_hello_triangle: 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
49 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
50 publish_linux_release_hello_triangle: 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
51 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
52 publish_windows_debug_hello_triangle: build/debug/linux/hello_triangle.exe
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
53 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
54 publish_windows_release_hello_triangle: build/release/linux/hello_triangle.exe
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
55 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
56 publish_all_linux_hello_triangle: publish_linux_debug_hello_triangle publish_linux_release_hello_triangle
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
57 publish_all_windows_hello_triangle: publish_windows_debug_hello_triangle publish_windows_release_hello_triangle
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
58 publish_all_alotof_hello_triangle: publish_all_linux_hello_triangle publish_all_windows_hello_triangle
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
59
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
60 publish_linux_debug_alotof_triangles: build/debug/linux/alotof_triangles
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
61 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
62 publish_linux_release_alotof_triangles: build/release/linux/alotof_triangles
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
63 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
64 publish_windows_debug_alotof_triangles: build/debug/linux/alotof_triangles.exe
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
65 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
66 publish_windows_release_alotof_triangles: build/release/linux/alotof_triangles.exe
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
67 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
68 publish_all_linux_alotof_triangles: publish_linux_debug_alotof_triangles publish_linux_release_alotof_triangles
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
69 publish_all_windows_alotof_triangles: publish_windows_debug_alotof_triangles publish_windows_release_alotof_triangles
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
70 publish_all_alotof_triangles: publish_all_linux_alotof_triangles publish_all_windows_alotof_triangles
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
71
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
72
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
73 # download thirdparty-libraries
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
74
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
75 thirdparty/bin/linux: glslang-master-linux-Release.zip
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
76 mkdir -p $@
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
77 cd $@ && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/$<
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
78 cd $@ && unzip $<
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
79 cd $@ && mv bin/* .
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
80 cd $@ && rm -rf $< bin lib include
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
81 thirdparty/bin/windows: glslang-master-windows-x64-Release.zip
466
1dd9e2393a9e add: structure code for crossplatform, add some input handling + bugfixes
Sam <sam@basx.dev>
parents: 464
diff changeset
82 mkdir -p $@
483
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
83 cd $@ && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/$<
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
84 cd $@ && unzip $<
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
85 cd $@ && mv bin/* .
73a0954beabd did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 482
diff changeset
86 cd $@ && rm -rf $< bin lib include