2013-09-07 08:20:38 +08: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
|
|
|
|
|
2021-11-08 17:45:35 +08:00
|
|
|
export CC="emcc --ignore-dynamic-linking -Os"
|
2013-09-07 08:20:38 +08:00
|
|
|
export AR="emar"
|
|
|
|
|
2018-11-16 02:01:51 +08:00
|
|
|
CFGFLAGS="--prefix=/usr --with-compiler=emscripten"
|
2021-11-08 17:45:35 +08:00
|
|
|
CFGFLAGS="${CFGFLAGS} --host x86_64-unknown-linux --without-gperf"
|
2020-04-02 23:52:03 +08:00
|
|
|
CFGFLAGS="${CFGFLAGS} --disable-debugger --with-libr --without-gpl"
|
2022-11-03 00:38:54 +08:00
|
|
|
CFGFLAGS="${CFGFLAGS} --without-jemalloc"
|
2018-12-16 00:27:55 +08:00
|
|
|
CFGFLAGS="${CFGFLAGS} --without-fork" # no process support in Emscripten
|
2022-11-03 00:24:53 +08:00
|
|
|
CFGFLAGS="${CFGFLAGS} --with-static-themes"
|
2013-09-07 08:20:38 +08:00
|
|
|
|
|
|
|
make mrproper
|
2013-09-16 05:57:22 +08:00
|
|
|
cp -f plugins.emscripten.cfg plugins.cfg
|
|
|
|
./configure-plugins
|
2013-09-07 08:20:38 +08:00
|
|
|
|
|
|
|
./configure ${CFGFLAGS} --host=emscripten && \
|
|
|
|
make -s -j ${MAKE_JOBS} DEBUG=0
|
2020-04-12 20:14:19 +08:00
|
|
|
|
|
|
|
rm -f r2js.zip
|
|
|
|
zip r2js.zip binr/*/*.js binr/*/*/*.wasm
|