Mercurial > games > semicongine
comparison Makefile @ 21:316923e9247c
add: clean examples, update build configs
| author | Sam <sam@basx.dev> |
|---|---|
| date | Tue, 10 Jan 2023 00:24:37 +0700 |
| parents | 90e117952f74 |
| children | b45a5d338cd0 |
comparison
equal
deleted
inserted
replaced
| 20:beb86492b178 | 21:316923e9247c |
|---|---|
| 1 SOURCES := $(shell find src -name '*.nim') | 1 SOURCES := $(shell find src -name '*.nim') |
| 2 DEBUG_OPTIONS := --debugger:native --checks:on --assertions:on | |
| 3 RELEASE_OPTIONS := -d:release --checks:off --assertions:off | |
| 4 WINDOWS_DEBUG_OPTIONS := --cc:vcc --passC:'/MDd' --passL:'ucrtd.lib' | |
| 5 WINDOWS_RELEASE_OPTIONS := --cc:vcc --passC:'/MD' --passL:'ucrt.lib' | |
| 6 | 2 |
| 7 # HACK to get cross-compilation working -------------------------------- | 3 # HACK to get cross-compilation working -------------------------------- |
| 8 | 4 |
| 9 # anywhere with a windows filesystem that has the visual basic compiler tools installed | 5 # anywhere with a windows filesystem that has the visual basic compiler tools installed |
| 10 WINDOWS_BASE := /mnt | 6 WINDOWS_BASE := /mnt |
| 27 # end of HACK----------------------------------------------------------- | 23 # end of HACK----------------------------------------------------------- |
| 28 | 24 |
| 29 | 25 |
| 30 # build hello_triangle | 26 # build hello_triangle |
| 31 build/debug/linux/hello_triangle: ${SOURCES} | 27 build/debug/linux/hello_triangle: ${SOURCES} |
| 32 nim build_linux_debug ${DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim | 28 nim build_linux_debug -o:$@ examples/hello_triangle.nim |
| 33 build/release/linux/hello_triangle: ${SOURCES} | 29 build/release/linux/hello_triangle: ${SOURCES} |
| 34 nim build_linux_release c ${RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim | 30 nim build_linux_release -o:$@ examples/hello_triangle.nim |
| 35 build/debug/windows/hello_triangle.exe: ${SOURCES} build/nim_windows | 31 build/debug/windows/hello_triangle.exe: ${SOURCES} build/nim_windows |
| 36 ${WINE_NIM} c ${DEBUG_OPTIONS} ${WINDOWS_DEBUG_OPTIONS} -o:$@ examples/hello_triangle.nim | 32 ${WINE_NIM} build_windows_debug -o:$@ examples/hello_triangle.nim |
| 37 build/release/windows/hello_triangle.exe: ${SOURCES} build/nim_windows | 33 build/release/windows/hello_triangle.exe: ${SOURCES} build/nim_windows |
| 38 ${WINE_NIM} c ${RELEASE_OPTIONS} ${WINDOWS_RELEASE_OPTIONS} -o:$@ examples/hello_triangle.nim | 34 ${WINE_NIM} build_windows_release -o:$@ examples/hello_triangle.nim |
| 35 | |
| 36 build/debug/linux/alotof_triangles: ${SOURCES} | |
| 37 nim build_linux_debug -o:$@ examples/alotof_triangles.nim | |
| 38 build/release/linux/alotof_triangles: ${SOURCES} | |
| 39 nim build_linux_release -o:$@ examples/alotof_triangles.nim | |
| 40 build/debug/windows/alotof_triangles.exe: ${SOURCES} build/nim_windows | |
| 41 ${WINE_NIM} build_windows_debug -o:$@ examples/alotof_triangles.nim | |
| 42 build/release/windows/alotof_triangles.exe: ${SOURCES} build/nim_windows | |
| 43 ${WINE_NIM} build_windows_release -o:$@ examples/alotof_triangles.nim | |
| 39 | 44 |
| 40 build_all_linux: build/debug/linux/hello_triangle build/release/linux/hello_triangle | 45 build_all_linux: build/debug/linux/hello_triangle build/release/linux/hello_triangle |
| 41 build_all_windows: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe | 46 build_all_windows: build/debug/windows/hello_triangle.exe build/release/windows/hello_triangle.exe |
| 42 build_all: build_all_linux build_all_windows | 47 build_all: build_all_linux build_all_windows |
| 43 | 48 |
