78 lines
1.5 KiB
Nim
78 lines
1.5 KiB
Nim
|
|
path:"../myou-engine/libs/packages/"
|
|
|
|
out:"build/game"
|
|
|
|
@if release:
|
|
d:lto
|
|
@else:
|
|
debugger:native
|
|
# floatChecks:on
|
|
@if not myouUseAR and not emscripten:
|
|
d:myouUseRenderdoc
|
|
@end
|
|
@end
|
|
|
|
@if android:
|
|
c # generate c files, don't compile them
|
|
nimcache:"tmp/android"
|
|
d:myouUseNativeActivity
|
|
d:opengl_es
|
|
d:androidNDK
|
|
noMain:on
|
|
@if amd64:
|
|
nimcache:"tmp/androidx64"
|
|
@end
|
|
@end
|
|
|
|
@if ios:
|
|
c # generate c files, don't compile them
|
|
cpu:arm64
|
|
nimcache:"tmp/ios"
|
|
d:opengl_es
|
|
noMain:on
|
|
@end
|
|
|
|
@if emscripten:
|
|
passL:"-o build/web/game.js"
|
|
d:opengl_es
|
|
noMain:on
|
|
nimcache:"tmp/emscripten"
|
|
os:linux
|
|
cpu:wasm32
|
|
cc:clang
|
|
clang.exe:emcc
|
|
clang.linkerexe:emcc
|
|
clang.cpp.exe:emcc
|
|
clang.cpp.linkerexe:emcc
|
|
# d:noSignalHandler
|
|
@if release:
|
|
passC:"-O3 -flto"
|
|
passL:"-O3 -flto --closure 1"
|
|
@else:
|
|
passC:"-gsource-map -O0"
|
|
passL:"-gsource-map -O0"
|
|
# embedsrc
|
|
@end
|
|
passL:"-sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2"
|
|
# passL:"-sEXPORTED_FUNCTIONS=_main,_NimMain,_glfmMain"
|
|
passL:"-sFETCH=1"
|
|
passL:"-sINITIAL_MEMORY=268435456"
|
|
passL:"-sSTACK_SIZE=262144"
|
|
passL:"-sALLOW_MEMORY_GROWTH"
|
|
@end
|
|
|
|
@if sanitize:
|
|
cc:clang
|
|
d:useMalloc
|
|
passC:"-fno-omit-frame-pointer"
|
|
passC:"-mno-omit-leaf-frame-pointer"
|
|
passC:"-fsanitize=address"
|
|
passL:"-fsanitize=address"
|
|
gc:arc
|
|
threads:off
|
|
@end
|
|
|
|
@if mingw:
|
|
passL:"-static"
|
|
@end
|