Mercurial > games > semicongine
comparison Makefile @ 25:8f290112718a
fix: build from scratch not working, remove temp shader files from compilation
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 11 Jan 2023 11:43:22 +0700 |
parents | 71bbe11d8de8 |
children | 8cb2d96ac28e |
comparison
equal
deleted
inserted
replaced
24:71bbe11d8de8 | 25:8f290112718a |
---|---|
1 SOURCES := $(shell find src -name '*.nim') | 1 SOURCES := $(shell find src -name '*.nim') |
2 | 2 |
3 # compilation requirements | |
4 examples/glslangValidator: thirdparty/bin/linux/glslangValidator | |
5 cp $< examples | |
6 examples/glslangValidator.exe: thirdparty/bin/windows/glslangValidator.exe | |
7 cp $< examples | |
8 | |
3 # build hello_triangle | 9 # build hello_triangle |
4 build/debug/linux/hello_triangle: ${SOURCES} thirdparty/bin/linux | 10 build/debug/linux/hello_triangle: ${SOURCES} examples/glslangValidator |
5 nim build_linux_debug -o:$@ examples/hello_triangle.nim | 11 nim build_linux_debug -o:$@ examples/hello_triangle.nim |
6 build/release/linux/hello_triangle: ${SOURCES} thirdparty/bin/linux | 12 build/release/linux/hello_triangle: ${SOURCES} examples/glslangValidator |
7 nim build_linux_release -o:$@ examples/hello_triangle.nim | 13 nim build_linux_release -o:$@ examples/hello_triangle.nim |
8 build/debug/windows/hello_triangle.exe: ${SOURCES} thirdparty/bin/windows | 14 build/debug/windows/hello_triangle.exe: ${SOURCES} examples/glslangValidator.exe |
9 nim build_windows_debug -o:$@ examples/hello_triangle.nim | 15 nim build_windows_debug -o:$@ examples/hello_triangle.nim |
10 build/release/windows/hello_triangle.exe: ${SOURCES} thirdparty/bin/windows | 16 build/release/windows/hello_triangle.exe: ${SOURCES} examples/glslangValidator.exe |
11 nim build_windows_release -o:$@ examples/hello_triangle.nim | 17 nim build_windows_release -o:$@ examples/hello_triangle.nim |
12 | 18 |
13 build_all_linux_hello_triangle: build/debug/linux/hello_triangle build/release/linux/hello_triangle | 19 build_all_linux_hello_triangle: build/debug/linux/hello_triangle build/release/linux/hello_triangle |
14 build_all_windows_hello_triangle: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe | 20 build_all_windows_hello_triangle: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe |
15 build_all_hello_triangle: build_all_linux_hello_triangle build_all_windows_hello_triangle | 21 build_all_hello_triangle: build_all_linux_hello_triangle build_all_windows_hello_triangle |
16 | 22 |
17 # build alotof_triangles | 23 # build alotof_triangles |
18 build/debug/linux/alotof_triangles: ${SOURCES} thirdparty/bin/linux | 24 build/debug/linux/alotof_triangles: ${SOURCES} examples/glslangValidator |
19 nim build_linux_debug -o:$@ examples/alotof_triangles.nim | 25 nim build_linux_debug -o:$@ examples/alotof_triangles.nim |
20 build/release/linux/alotof_triangles: ${SOURCES} thirdparty/bin/linux | 26 build/release/linux/alotof_triangles: ${SOURCES} examples/glslangValidator |
21 nim build_linux_release -o:$@ examples/alotof_triangles.nim | 27 nim build_linux_release -o:$@ examples/alotof_triangles.nim |
22 build/debug/windows/alotof_triangles.exe: ${SOURCES} thirdparty/bin/windows | 28 build/debug/windows/alotof_triangles.exe: ${SOURCES} examples/glslangValidator.exe |
23 nim build_windows_debug -o:$@ examples/alotof_triangles.nim | 29 nim build_windows_debug -o:$@ examples/alotof_triangles.nim |
24 build/release/windows/alotof_triangles.exe: ${SOURCES} thirdparty/bin/windows | 30 build/release/windows/alotof_triangles.exe: ${SOURCES} examples/glslangValidator.exe |
25 nim build_windows_release -o:$@ examples/alotof_triangles.nim | 31 nim build_windows_release -o:$@ examples/alotof_triangles.nim |
26 | 32 |
27 build_all_linux_alotof_triangles: build/debug/linux/alotof_triangles build/release/linux/alotof_triangles | 33 build_all_linux_alotof_triangles: build/debug/linux/alotof_triangles build/release/linux/alotof_triangles |
28 build_all_windows_alotof_triangles: build/debug/windows/alotof_triangles.exe build/release/windows/alotof_triangles.exe | 34 build_all_windows_alotof_triangles: build/debug/windows/alotof_triangles.exe build/release/windows/alotof_triangles.exe |
29 build_all_alotof_triangles: build_all_linux_alotof_triangles build_all_windows_alotof_triangles | 35 build_all_alotof_triangles: build_all_linux_alotof_triangles build_all_windows_alotof_triangles |
32 clean: | 38 clean: |
33 rm -rf build | 39 rm -rf build |
34 rm -rf thirdparty | 40 rm -rf thirdparty |
35 | 41 |
36 .PHONY: tests | 42 .PHONY: tests |
37 .PHONY: glslang-master-linux-Debug.zip | |
38 .PHONY: glslang-master-linux-Release.zip | |
39 .PHONY: glslang-master-windows-x64-Debug.zip | |
40 .PHONY: glslang-master-windows-x64-Release.zip | |
41 | 43 |
42 # tests | 44 # tests |
43 tests: | 45 tests: |
44 testament p tests/ | 46 testament p tests/ |
45 | 47 |
69 publish_all_alotof_triangles: publish_all_linux_alotof_triangles publish_all_windows_alotof_triangles | 71 publish_all_alotof_triangles: publish_all_linux_alotof_triangles publish_all_windows_alotof_triangles |
70 | 72 |
71 | 73 |
72 # download thirdparty-libraries | 74 # download thirdparty-libraries |
73 | 75 |
74 thirdparty/bin/linux: glslang-master-linux-Release.zip | 76 thirdparty/bin/linux/glslangValidator: |
75 mkdir -p $@ | 77 mkdir -p $$( dirname $@ ) |
76 cd $@ && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/$< | 78 cd $$( dirname $@ ) && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip |
77 cd $@ && unzip $< | 79 cd $$( dirname $@ ) && unzip *.zip |
78 cd $@ && mv bin/* . | 80 cd $$( dirname $@ ) && mv bin/* . |
79 cd $@ && rm -rf $< bin lib include | 81 cd $$( dirname $@ ) && rm -rf *.zip bin lib include |
80 thirdparty/bin/windows: glslang-master-windows-x64-Release.zip | 82 thirdparty/bin/windows/glslangValidator.exe: |
81 mkdir -p $@ | 83 mkdir -p $$( dirname $@ ) |
82 cd $@ && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/$< | 84 cd $$( dirname $@ ) && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip |
83 cd $@ && unzip $< | 85 cd $$( dirname $@ ) && unzip *.zip |
84 cd $@ && mv bin/* . | 86 cd $$( dirname $@ ) && mv bin/* . |
85 cd $@ && rm -rf $< bin lib include | 87 cd $$( dirname $@ ) && rm -rf *.zip bin lib include |