Mercurial > games > semicongine
annotate Makefile @ 27:8cb2d96ac28e
did: simplify publishing mechanism
| author | Sam <sam@basx.dev> | 
|---|---|
| date | Wed, 11 Jan 2023 11:55:54 +0700 | 
| parents | 8f290112718a | 
| children | da922b506570 | 
| rev | line source | 
|---|---|
| 0 | 1 SOURCES := $(shell find src -name '*.nim') | 
| 15 | 2 | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 3 # compilation requirements | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 4 examples/glslangValidator: thirdparty/bin/linux/glslangValidator | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 5 cp $< examples | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 6 examples/glslangValidator.exe: thirdparty/bin/windows/glslangValidator.exe | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 7 cp $< examples | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 8 | 
| 13 
a571db114152
add: vector/matrix modules, tests, nim config script
 Sam <sam@basx.dev> parents: 
12diff
changeset | 9 # build hello_triangle | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 10 build/debug/linux/hello_triangle: ${SOURCES} examples/glslangValidator | 
| 21 
316923e9247c
add: clean examples, update build configs
 Sam <sam@basx.dev> parents: 
18diff
changeset | 11 nim build_linux_debug -o:$@ examples/hello_triangle.nim | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 12 build/release/linux/hello_triangle: ${SOURCES} examples/glslangValidator | 
| 21 
316923e9247c
add: clean examples, update build configs
 Sam <sam@basx.dev> parents: 
18diff
changeset | 13 nim build_linux_release -o:$@ examples/hello_triangle.nim | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 14 build/debug/windows/hello_triangle.exe: ${SOURCES} examples/glslangValidator.exe | 
| 22 
b45a5d338cd0
did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
 Sam <sam@basx.dev> parents: 
21diff
changeset | 15 nim build_windows_debug -o:$@ examples/hello_triangle.nim | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 16 build/release/windows/hello_triangle.exe: ${SOURCES} examples/glslangValidator.exe | 
| 22 
b45a5d338cd0
did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
 Sam <sam@basx.dev> parents: 
21diff
changeset | 17 nim build_windows_release -o:$@ examples/hello_triangle.nim | 
| 21 
316923e9247c
add: clean examples, update build configs
 Sam <sam@basx.dev> parents: 
18diff
changeset | 18 | 
| 22 
b45a5d338cd0
did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
 Sam <sam@basx.dev> parents: 
21diff
changeset | 19 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: 
21diff
changeset | 20 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: 
21diff
changeset | 21 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: 
21diff
changeset | 22 | 
| 24 
71bbe11d8de8
did: change shader compilation to run during program compilation, maybe add dynamic version later
 Sam <sam@basx.dev> parents: 
22diff
changeset | 23 # build alotof_triangles | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 24 build/debug/linux/alotof_triangles: ${SOURCES} examples/glslangValidator | 
| 24 
71bbe11d8de8
did: change shader compilation to run during program compilation, maybe add dynamic version later
 Sam <sam@basx.dev> parents: 
22diff
changeset | 25 nim build_linux_debug -o:$@ examples/alotof_triangles.nim | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 26 build/release/linux/alotof_triangles: ${SOURCES} examples/glslangValidator | 
| 24 
71bbe11d8de8
did: change shader compilation to run during program compilation, maybe add dynamic version later
 Sam <sam@basx.dev> parents: 
22diff
changeset | 27 nim build_linux_release -o:$@ examples/alotof_triangles.nim | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 28 build/debug/windows/alotof_triangles.exe: ${SOURCES} examples/glslangValidator.exe | 
| 24 
71bbe11d8de8
did: change shader compilation to run during program compilation, maybe add dynamic version later
 Sam <sam@basx.dev> parents: 
22diff
changeset | 29 nim build_windows_debug -o:$@ examples/alotof_triangles.nim | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 30 build/release/windows/alotof_triangles.exe: ${SOURCES} examples/glslangValidator.exe | 
| 24 
71bbe11d8de8
did: change shader compilation to run during program compilation, maybe add dynamic version later
 Sam <sam@basx.dev> parents: 
22diff
changeset | 31 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: 
22diff
changeset | 32 | 
| 22 
b45a5d338cd0
did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
 Sam <sam@basx.dev> parents: 
21diff
changeset | 33 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: 
21diff
changeset | 34 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: 
21diff
changeset | 35 build_all_alotof_triangles: build_all_linux_alotof_triangles build_all_windows_alotof_triangles | 
| 8 | 36 | 
| 15 | 37 # clean | 
| 12 | 38 clean: | 
| 39 rm -rf build | |
| 22 
b45a5d338cd0
did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
 Sam <sam@basx.dev> parents: 
21diff
changeset | 40 rm -rf thirdparty | 
| 12 | 41 | 
| 27 | 42 # tests | 
| 16 | 43 .PHONY: tests | 
| 13 
a571db114152
add: vector/matrix modules, tests, nim config script
 Sam <sam@basx.dev> parents: 
12diff
changeset | 44 tests: | 
| 
a571db114152
add: vector/matrix modules, tests, nim config script
 Sam <sam@basx.dev> parents: 
12diff
changeset | 45 testament p tests/ | 
| 
a571db114152
add: vector/matrix modules, tests, nim config script
 Sam <sam@basx.dev> parents: 
12diff
changeset | 46 | 
| 5 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 Sam <sam@basx.dev> parents: 
3diff
changeset | 47 # publish | 
| 27 | 48 publish: | 
| 49 rsync -rv build/ basx.dev:/var/www/public.basx.dev/zamikongine | |
| 5 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 Sam <sam@basx.dev> parents: 
3diff
changeset | 50 | 
| 
4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
 Sam <sam@basx.dev> parents: 
3diff
changeset | 51 # download thirdparty-libraries | 
| 2 
213fdf8d31dd
did: hello world triangle, a bit of code organization
 Sam <sam@basx.dev> parents: 
1diff
changeset | 52 | 
| 25 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 53 thirdparty/bin/linux/glslangValidator: | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 54 mkdir -p $$( dirname $@ ) | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 55 cd $$( dirname $@ ) && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 56 cd $$( dirname $@ ) && unzip *.zip | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 57 cd $$( dirname $@ ) && mv bin/* . | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 58 cd $$( dirname $@ ) && rm -rf *.zip bin lib include | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 59 thirdparty/bin/windows/glslangValidator.exe: | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 60 mkdir -p $$( dirname $@ ) | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 61 cd $$( dirname $@ ) && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 62 cd $$( dirname $@ ) && unzip *.zip | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 63 cd $$( dirname $@ ) && mv bin/* . | 
| 
8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
 Sam <sam@basx.dev> parents: 
24diff
changeset | 64 cd $$( dirname $@ ) && rm -rf *.zip bin lib include | 
