summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2018-06-04 15:39:39 -0700
committerGitHub <noreply@github.com>2018-06-04 15:39:39 -0700
commit29281771e9cd3896d8ee83c960b87d0d5bd3436d (patch)
treeeb248cf55b80dd93afef6dfaaa14fa5bd5273158 /Makefile
parenta9829fff6a5345d6b7ae6cbbbca70c7c03f22fe0 (diff)
downloadwabt-29281771e9cd3896d8ee83c960b87d0d5bd3436d.tar.gz
wabt-29281771e9cd3896d8ee83c960b87d0d5bd3436d.tar.bz2
wabt-29281771e9cd3896d8ee83c960b87d0d5bd3436d.zip
Fix emscripten build (#855)
It's not correct to use `--pre-js` and `--post-js` to wrap the module in a function instance; instead we're supposed to use `-s MODULARIZE=1`. This still keeps the build as (almost) asm.js, as switching to wasm is a bit more work (we need to preload the wasm binary module). This fixes issue #853.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a40d44fd..1befa8ce 100644
--- a/Makefile
+++ b/Makefile
@@ -155,6 +155,10 @@ src/prebuilt/wasm2c.include.c: src/wasm2c.c.tmpl
src/prebuilt/wasm2c.include.h: src/wasm2c.h.tmpl
src/wasm2c_tmpl.py -o $@ $<
+.PHONY: demo
+demo: emscripten-release
+ cp out/emscripten/Release/libwabt.js demo
+
# running CMake
$(foreach CONFIG,$(CONFIGS), \
$(foreach COMPILER,$(COMPILERS), \