Mercurial > games > semicongine
comparison Makefile @ 474:d4750f2e0760
add: vector/matrix modules, tests, nim config script
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 28 Dec 2022 11:42:21 +0700 |
parents | 04b8471bdab4 |
children | dde536a70483 |
comparison
equal
deleted
inserted
replaced
473:04b8471bdab4 | 474:d4750f2e0760 |
---|---|
3 DEBUG_OPTIONS := --debugger:native --checks:on --assertions:on | 3 DEBUG_OPTIONS := --debugger:native --checks:on --assertions:on |
4 RELEASE_OPTIONS := -d:release --checks:off --assertions:off | 4 RELEASE_OPTIONS := -d:release --checks:off --assertions:off |
5 WINDOWS_DEBUG_OPTIONS := --cc:vcc --passC:'/MDd' --passL:'ucrtd.lib' | 5 WINDOWS_DEBUG_OPTIONS := --cc:vcc --passC:'/MDd' --passL:'ucrtd.lib' |
6 WINDOWS_RELEASE_OPTIONS := --cc:vcc --passC:'/MD' --passL:'ucrt.lib' | 6 WINDOWS_RELEASE_OPTIONS := --cc:vcc --passC:'/MD' --passL:'ucrt.lib' |
7 | 7 |
8 # build | 8 make_dirs: |
9 build/debug/linux/hello_triangle: ${SOURCES} | 9 mkdir -p build/debug/linux |
10 mkdir -p $$( dirname $@ ) | 10 mkdir -p build/release/linux |
11 mkdir -p build/debug/windows | |
12 mkdir -p build/release/windows | |
13 | |
14 # build hello_triangle | |
15 build/debug/linux/hello_triangle: ${SOURCES} make_dirs | |
11 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim | 16 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim |
12 build/release/linux/hello_triangle: ${SOURCES} | 17 build/release/linux/hello_triangle: ${SOURCES} make_dirs |
13 mkdir -p $$( dirname $@ ) | |
14 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim | 18 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim |
15 build/debug/windows/hello_triangle.exe: ${SOURCES} | 19 build/debug/windows/hello_triangle.exe: ${SOURCES} make_dirs |
16 mkdir -p $$( dirname $@ ) | |
17 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} ${WINDOWS_DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim | 20 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} ${WINDOWS_DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim |
18 build/release/windows/hello_triangle.exe: ${SOURCES} | 21 build/release/windows/hello_triangle.exe: ${SOURCES} make_dirs |
19 mkdir -p $$( dirname $@ ) | |
20 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} ${WINDOWS_RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim | 22 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} ${WINDOWS_RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim |
21 | 23 |
22 build_all_linux: build/debug/linux/hello_triangle build/release/linux/hello_triangle | 24 build_all_linux: build/debug/linux/hello_triangle build/release/linux/hello_triangle |
23 build_all_windows: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe | 25 build_all_windows: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe |
26 build_all: build_all_linux build_all_windows | |
24 | 27 |
25 build_all: build_all_linux build_all_windows | 28 # build maths (for testing) |
29 build/debug/linux/maths: ${SOURCES} make_dirs | |
30 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/maths.nim | |
31 build/release/linux/maths: ${SOURCES} make_dirs | |
32 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/maths.nim | |
33 build/debug/windows/maths.exe: ${SOURCES} make_dirs | |
34 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} ${WINDOWS_DEBUG_OPTIONS} -o:$@ examples/maths.nim | |
35 build/release/windows/maths.exe: ${SOURCES} make_dirs | |
36 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} ${WINDOWS_RELEASE_OPTIONS} -o:$@ examples/maths.nim | |
26 | 37 |
27 clean: | 38 clean: |
28 rm -rf build | 39 rm -rf build |
40 | |
41 tests: | |
42 testament p tests/ | |
29 | 43 |
30 # publish | 44 # publish |
31 publish_linux_debug: build/debug/linux/hello_triangle | 45 publish_linux_debug: build/debug/linux/hello_triangle |
32 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/ | 46 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/ |
33 publish_linux_release: build/release/linux/hello_triangle | 47 publish_linux_release: build/release/linux/hello_triangle |