~melchizedek6809/WolkenWelten

cfb979c2f109b80f15eaad16c4141e3bf02d3299 — Ben (X13/Arch) 2 years ago 52c5b4f
Fixed WASM build so it works in FF at least
3 files changed, 6 insertions(+), 6 deletions(-)

M common/nujel
M platform/wasm/wasm.mk
M tools/buildwasm
M common/nujel => common/nujel +1 -1
@@ 1,1 1,1 @@
Subproject commit 9a54b1e56ec9e2c93314a9c064b34c8ffa0e745f
Subproject commit 86092ce19d26766c361f1879d1bc8be6be949f44

M platform/wasm/wasm.mk => platform/wasm/wasm.mk +3 -3
@@ 18,7 18,7 @@ $(SERVER_WASM_OBJS): | common/src/tmp/cto.c
$(SERVER_WASM_OBJS): | common/src/tmp/assets.h

%.wo: %.c
	$(EMCC) -c $< $(EMLIBS) -D_GNU_SOURCE $(CSTD) -O3 -fno-rtti -o $@ -MMD
	$(EMCC) -c $< $(EMLIBS) -D_GNU_SOURCE $(CSTD) -O2 -g -o $@ -MMD

all: wolkenwelten



@@ 36,11 36,11 @@ common/nujel/nujel.wa:

releases/wasm/index.html: $(CLIENT_WASM_OBJS) $(COMMON_WASM_OBJS) common/nujel/nujel.wa
	@mkdir -p releases/wasm/
	$(EMCC) $^ -D_GNU_SOURCE $(CSTD) -O3 -fno-rtti --closure 0 -s MINIFY_HTML=0 -s OFFSCREEN_FRAMEBUFFER=1 -s OFFSCREENCANVAS_SUPPORT=1 -s MAX_WEBGL_VERSION=2 $(CLIENT_EMMEM) $(EMLIBS) --shell-file platform/wasm/shell.html -o $@
	$(EMCC) $^ -D_GNU_SOURCE $(CSTD) -O2 -g --closure 0 -s MINIFY_HTML=0 -s OFFSCREEN_FRAMEBUFFER=1 -s OFFSCREENCANVAS_SUPPORT=1 -s MAX_WEBGL_VERSION=2 $(CLIENT_EMMEM) $(EMLIBS) --shell-file platform/wasm/shell.html -o $@

releases/wasm/server.js: $(SERVER_WASM_OBJS) $(COMMON_WASM_OBJS) $(NUJEL_WASM_OBJS) common/nujel/nujel.wa
	@mkdir -p releases/wasm/
	$(EMCC) $^ -D_GNU_SOURCE $(CSTD) -O3 -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS="['_wasmInit','_wasmTranceive']" -fno-rtti --closure 0 $(SERVER_EMMEM) -o releases/wasm/server.js
	$(EMCC) $^ -D_GNU_SOURCE $(CSTD) -O2 -g -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS="['_wasmInit','_wasmTranceive']" -fno-rtti --closure 0 $(SERVER_EMMEM) -o releases/wasm/server.js

releases/wasm/manifest.json: platform/wasm/manifest.json
	@mkdir -p releases/wasm/

M tools/buildwasm => tools/buildwasm +2 -2
@@ 1,5 1,5 @@
#!/usr/bin/env bash
EMSDK_TESTED_VERSION="3.0.0"
EMSDK_TESTED_VERSION="3.1.13"
EMSDK_REPO_URL="https://github.com/emscripten-core/emsdk.git"

cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ..


@@ 15,4 15,4 @@ git pull
cd "$DIR"

source "platform/wasm/emsdk/emsdk_env.sh"
make -j16 release.wasm
make -j release.wasm