Mercurial > games > semicongine
diff Makefile @ 2:213fdf8d31dd
did: hello world triangle, a bit of code organization
author | Sam <sam@basx.dev> |
---|---|
date | Mon, 19 Dec 2022 10:41:20 +0700 |
parents | bb2a7d3a7003 |
children | 5d54ef652619 |
line wrap: on
line diff
--- a/Makefile Fri Dec 16 00:05:41 2022 +0700 +++ b/Makefile Mon Dec 19 10:41:20 2022 +0700 @@ -1,11 +1,25 @@ SOURCES := $(shell find src -name '*.nim') +COMPILE_OPTIONS := --path:src --mm:orc --experimental:strictEffects --threads:on +DEBUG_OPTIONS := --debugger:native --checks:on --assertions:on +RELEASE_OPTIONS := -d:release --checks:off --assertions:off build/debug/linux: mkdir -p $@ build/debug/linux/test: build/debug/linux ${SOURCES} - nim c -o:$@ --gc:orc --debugger:native --checks:on --assertions:on src/test.nim + nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/test.nim build/release/linux: mkdir -p $@ build/release/linux/test: build/release/linux ${SOURCES} - nim c -d:release --gc:orc -o:$@ --checks:off --assertions:off src/test.nim + nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/test.nim + +# not working yet, need to implement windows window-API +# build/debug/windows: + # mkdir -p $@ +# build/debug/windows/test: build/debug/windows ${SOURCES} + # nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -d:mingw -o:$@ examples/test.nim +# build/release/windows: + # mkdir -p $@ +# build/release/windows/test: build/release/windows ${SOURCES} + # nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -d:mingw -o:$@ examples/test.nim +