2019-07-15 15:25:00 +00:00
|
|
|
# temporary build script.
|
|
|
|
# must integrate the build process into automake
|
|
|
|
|
|
|
|
topdir=../../..
|
|
|
|
blddir=${topdir}/bld/emcc
|
|
|
|
|
|
|
|
emcc -Wall -O2 -g \
|
|
|
|
${blddir}/lib/.libs/libmoo.a \
|
2019-11-04 08:44:23 +00:00
|
|
|
${blddir}/lib/.libs/libmoox.a \
|
2019-07-15 15:25:00 +00:00
|
|
|
${topdir}/wasm/main.c \
|
|
|
|
-DMOO_HAVE_CFG_H \
|
|
|
|
-I${blddir}/lib \
|
|
|
|
-I${topdir}/lib\
|
2019-11-04 14:53:33 +00:00
|
|
|
-s WASM=1 \
|
|
|
|
-s LINKABLE=1 \
|
|
|
|
-s ALLOW_MEMORY_GROWTH=1 \
|
2019-07-15 15:25:00 +00:00
|
|
|
-s EXTRA_EXPORTED_RUNTIME_METHODS="['ccall','cwrap']" \
|
|
|
|
-o libmoo.js \
|
2019-11-03 16:02:22 +00:00
|
|
|
--embed-file ${topdir}/kernel/ \
|
2019-07-15 15:25:00 +00:00
|
|
|
--pre-js ${topdir}/wasm/moo.cb.js
|
|
|
|
|
2019-11-04 14:53:33 +00:00
|
|
|
##-s USE_PTHREADS=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 \
|
2019-11-04 08:44:23 +00:00
|
|
|
##cp -pf ${topdir}/wasm/moo.html .
|
|
|
|
##cp -pf ${topdir}/wasm/moo.worker.js .
|
|
|
|
ln -sf ${topdir}/wasm/moo.html moo.html
|
|
|
|
ln -sf ${topdir}/wasm/moo.worker.js moo.worker.js
|