Mercurial > games > semicongine
comparison Makefile @ 5:4ed9cb098315
add: structure code for crossplatform, add some input handling + bugfixes
| author | Sam <sam@basx.dev> | 
|---|---|
| date | Thu, 22 Dec 2022 00:06:40 +0700 | 
| parents | 5d54ef652619 | 
| children | 1134f41a49e9 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 4:af9183acb173 | 5:4ed9cb098315 | 
|---|---|
| 1 SOURCES := $(shell find src -name '*.nim') | 1 SOURCES := $(shell find src -name '*.nim') | 
| 2 COMPILE_OPTIONS := --path:src --mm:orc --experimental:strictEffects --threads:on | 2 COMPILE_OPTIONS := --path:src --mm:orc --experimental:strictEffects --threads:on | 
| 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 | 5 | 
| 6 build/debug/linux: | 6 # build | 
| 7 mkdir -p $@ | 7 build/debug/linux/test: ${SOURCES} | 
| 8 build/debug/linux/test: build/debug/linux ${SOURCES} | 8 mkdir -p $$( dirname $@ ) | 
| 9 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/test.nim | 9 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/test.nim | 
| 10 | 10 build/release/linux/test: ${SOURCES} | 
| 11 build/release/linux: | 11 mkdir -p $$( dirname $@ ) | 
| 12 mkdir -p $@ | 12 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/test.nim | 
| 13 build/release/linux/test: build/release/linux ${SOURCES} | 13 build/debug/windows/test: ${SOURCES} | 
| 14 mkdir -p $$( dirname $@ ) | |
| 15 nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -o:$@ examples/test.nim | |
| 16 build/release/windows/test: ${SOURCES} | |
| 17 mkdir -p $$( dirname $@ ) | |
| 14 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/test.nim | 18 nim c ${COMPILE_OPTIONS} ${RELEASE_OPTIONS} -o:$@ examples/test.nim | 
| 15 | 19 | 
| 16 # not working yet, need to implement windows window-API | 20 build_all: build/debug/linux/test build/release/linux/test build/debug/windows/test build/release/windows/test | 
| 17 # build/debug/windows: | |
| 18 # mkdir -p $@ | |
| 19 # build/debug/windows/test: build/debug/windows ${SOURCES} | |
| 20 # nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -d:mingw -o:$@ examples/test.nim | |
| 21 # build/release/windows: | |
| 22 # mkdir -p $@ | |
| 23 # build/release/windows/test: build/release/windows ${SOURCES} | |
| 24 # nim c ${COMPILE_OPTIONS} ${DEBUG_OPTIONS} -d:mingw -o:$@ examples/test.nim | |
| 25 thirdparty: | |
| 26 echo https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1885/20221216-081805/install.zip | |
| 27 echo https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1885/20221216-081805/install.zip | |
| 28 | 21 | 
| 29 SPIRV_TOOLS_LINUX_DEBUG: | 22 # publish | 
| 30 wget https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-gcc-release/continuous/1889/20221216-081754/install.tgz | 23 publish_linux_debug: build/debug/linux/test | 
| 31 SPIRV_TOOLS_LINUX_DEBUG: | 24 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/debug/ | 
| 32 wget https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-gcc-debug/continuous/1899/20221216-081758/install.tgz | 25 publish_linux_release: build/release/linux/test | 
| 33 SPIRV_TOOLS_WINDOWS_DEBUG: | 26 scp $< basx.dev:/var/www/public.basx.dev/joni/linux/release/ | 
| 34 wget https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-debug/continuous/1599/20221216-081803/install.zip | 27 publish_windows_debug: build/debug/linux/test | 
| 35 SPIRV_TOOLS_WINDOWS_RELEASE: | 28 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/debug/ | 
| 36 wget https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1885/20221216-081805/install.zip | 29 publish_windows_release: build/release/linux/test | 
| 30 scp $< basx.dev:/var/www/public.basx.dev/joni/windows/release/ | |
| 37 | 31 | 
| 38 GLSL_LINUX_DEBUG: | 32 publish_all: publish_linux_debug publish_linux_release publish_windows_debug publish_windows_release | 
| 39 wget | 33 | 
| 40 GLSL_LINUX_RELEASE: | 34 | 
| 41 wget | 35 # download thirdparty-libraries | 
| 42 GLSL_WINDOWS_DEBUG: | 36 | 
| 43 wget | 37 thirdparty/lib/glslang/linux_debug: | 
| 44 GLSL_WINDOWS_RELEASE: | 38 mkdir -p $@ | 
| 45 wget | 39 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Debug.zip | 
| 40 uzip glslang-master-linux-Debug.zip | |
| 41 thirdparty/lib/glslang/linux_release: | |
| 42 mkdir -p $@ | |
| 43 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip | |
| 44 unzip glslang-master-linux-Release.zip | |
| 45 thirdparty/lib/glslang/windows_debug: | |
| 46 mkdir -p $@ | |
| 47 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Debug.zip | |
| 48 unzip glslang-master-windows-x64-Debug.zip | |
| 49 thirdparty/lib/glslang/windows_release: | |
| 50 mkdir -p $@ | |
| 51 wget --directory-prefix=$@ https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip | |
| 52 unzip glslang-master-windows-x64-Release.zip | |
| 53 | |
| 54 thirdparty/lib/spirv-tools/linux_debug: | |
| 55 mkdir -p $@ | |
| 56 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-gcc-debug/continuous/1899/20221216-081758/install.tgz | |
| 57 tar -xf $@/install.tgz | |
| 58 thirdparty/lib/spirv-tools/linux_release: | |
| 59 mkdir -p $@ | |
| 60 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-gcc-release/continuous/1889/20221216-081754/install.tgz | |
| 61 tar -xf $@/install.tgz | |
| 62 thirdparty/lib/spirv-tools/windows_debug: | |
| 63 mkdir -p $@ | |
| 64 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-debug/continuous/1599/20221216-081803/install.zip | |
| 65 unzip $@/install.zip | |
| 66 thirdparty/lib/spirv-tools/windows_release: | |
| 67 mkdir -p $@ | |
| 68 wget --directory-prefix=$@ https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1885/20221216-081805/install.zip | |
| 69 unzip $@/install.zip | 
