File: emscripten.sh

package info (click to toggle)
radare2 6.0.7%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 78,360 kB
  • sloc: ansic: 903,263; sh: 8,137; javascript: 7,911; makefile: 5,503; python: 2,730; cpp: 789; perl: 404; lisp: 122; sed: 85; asm: 57; cs: 37; xml: 32; ruby: 29; java: 21
file content (30 lines) | stat: -rwxr-xr-x 805 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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

export CC="emcc --ignore-dynamic-linking -Os"
export AR="emar"

CFGFLAGS="--prefix=/usr --with-compiler=emscripten"
CFGFLAGS="${CFGFLAGS} --host x86_64-unknown-linux --without-gperf"
CFGFLAGS="${CFGFLAGS} --disable-debugger --with-libr --without-gpl"
CFGFLAGS="${CFGFLAGS} --without-jemalloc"
CFGFLAGS="${CFGFLAGS} --without-fork" # no process support in Emscripten
CFGFLAGS="${CFGFLAGS} --with-static-themes"

make mrproper
cp -f plugins.emscripten.cfg plugins.cfg
./configure-plugins

./configure ${CFGFLAGS} --host=emscripten && \
	make -s -j ${MAKE_JOBS} DEBUG=0

rm -f r2js.zip
zip r2js.zip binr/*/*.js binr/*/*/*.wasm