updates for new mmath library
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# mode = ScriptMode.Whatif
|
||||
task build, "builds an example":
|
||||
setCommand("c", "src/sdlife/main.nim")
|
||||
setCommand("c", "src/sdlife/sdlife.nim")
|
||||
for i in 0..paramCount():
|
||||
let param = paramStr(i)
|
||||
if param == "-d:wasm":
|
||||
mkdir("build")
|
||||
cpFile("resources/index.html", "build/index.html")
|
||||
|
7
nim.cfg
7
nim.cfg
@@ -3,7 +3,7 @@
|
||||
@end
|
||||
|
||||
@if emscripten or asmjs or wasm:
|
||||
o:"build/sdlife.js"
|
||||
o:"build/sdlife.wasm"
|
||||
outdir:build
|
||||
@if not wasm:
|
||||
d:asmjs
|
||||
@@ -15,8 +15,8 @@
|
||||
clang.options.linker = ""
|
||||
cpu = "i386"
|
||||
@if wasm:
|
||||
passC = "-s WASM=1 -Iemscripten"
|
||||
passL = "-s WASM=1 -Lemscripten -s ALLOW_MEMORY_GROWTH=1"
|
||||
passC = "-s WASM=2 -Iemscripten"
|
||||
passL = "-s WASM=2 -s ALLOW_MEMORY_GROWTH=1 -s USE_SDL=2 -s USE_SDL_GFX=2 -Lemscripten -flto"
|
||||
@elif asmjs:
|
||||
passC = "-s ASM_JS=1 -Iemscripten"
|
||||
passL = "-s ASM_JS=1 -Lemscripten"
|
||||
@@ -39,7 +39,6 @@
|
||||
dynlibOverride:"SDL2_ttf"
|
||||
dynlibOverride:"SDL2_net"
|
||||
#passL %= "-s USE_SDL=2 ../libSDL2_gfx.o ../libSDL2_image-png.o ../libSDL2_ttf.o --preload-file ../assets"
|
||||
passL %= "-s USE_SDL=2 -s USE_SDL_GFX=2"
|
||||
@else
|
||||
o:"build/sdlife"
|
||||
@end
|
||||
|
Reference in New Issue
Block a user