2013-09-07 00:20:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# find root
|
|
|
|
cd `dirname $PWD/$0` ; cd ..
|
|
|
|
#TODO: add support for ccache
|
|
|
|
|
|
|
|
# XXX. fails with >1
|
|
|
|
[ -z "${MAKE_JOBS}" ] && MAKE_JOBS=8
|
|
|
|
|
|
|
|
OLD_LDFLAGS="${LDFLAGS}"
|
|
|
|
unset LDFLAGS
|
|
|
|
|
2017-01-29 19:00:01 +00:00
|
|
|
export CC="emcc --ignore-dynamic-linking -Oz"
|
2013-09-07 00:20:38 +00:00
|
|
|
export AR="emar"
|
|
|
|
|
2018-11-15 18:01:51 +00:00
|
|
|
CFGFLAGS="--prefix=/usr --with-compiler=emscripten"
|
2020-04-02 15:52:03 +00:00
|
|
|
CFGFLAGS="${CFGFLAGS} --host x86_64-unknown-linux"
|
|
|
|
CFGFLAGS="${CFGFLAGS} --disable-debugger --with-libr --without-gpl"
|
2018-11-15 18:01:51 +00:00
|
|
|
CFGFLAGS="${CFGFLAGS} --without-libuv --without-jemalloc"
|
2018-12-15 16:27:55 +00:00
|
|
|
CFGFLAGS="${CFGFLAGS} --without-fork" # no process support in Emscripten
|
2013-09-07 00:20:38 +00:00
|
|
|
|
|
|
|
make mrproper
|
2013-09-15 21:57:22 +00:00
|
|
|
cp -f plugins.emscripten.cfg plugins.cfg
|
|
|
|
./configure-plugins
|
2013-09-07 00:20:38 +00:00
|
|
|
|
|
|
|
./configure ${CFGFLAGS} --host=emscripten && \
|
|
|
|
make -s -j ${MAKE_JOBS} DEBUG=0
|
2020-04-12 12:14:19 +00:00
|
|
|
|
|
|
|
rm -f r2js.zip
|
|
|
|
zip r2js.zip binr/*/*.js binr/*/*/*.wasm
|