3 SDKDIR="/emsdk_portable"
4 ENVSCRIPT="$SDKDIR/emsdk_env.sh"
5 if [ ! -f "$ENVSCRIPT" ]; then
6 echo "ERROR: This script expects the Emscripten SDK to be in '$SDKDIR'." 1>&2
12 TARBALL=sdl-emscripten.tar.xz
19 if [ -z "$MAKE" ]; then
21 if [ "$OSTYPE" == "Linux" ]; then
22 NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
24 elif [ "$OSTYPE" = "Darwin" ]; then
25 NCPU=`sysctl -n hw.ncpu`
26 elif [ "$OSTYPE" = "SunOS" ]; then
27 NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
32 if [ -z "$NCPU" ]; then
34 elif [ "$NCPU" = "0" ]; then
41 echo "\$MAKE is '$MAKE'"
43 echo "Setting up Emscripten SDK environment..."
54 emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed"
59 echo "Moving things around..."
61 # Fix up a few things to a real install path
62 perl -w -pi -e "s#$PWD/emscripten-sdl2-installed#/usr/local#g;" ./emscripten-sdl2-installed/lib/libSDL2.la ./emscripten-sdl2-installed/lib/pkgconfig/sdl2.pc ./emscripten-sdl2-installed/bin/sdl2-config
64 mv ./emscripten-sdl2-installed ./usr/local
66 tar -cJvvf $TARBALL -C buildbot usr
71 # end of emscripten-buildbot.sh ...