build-scripts/emscripten-buildbot.sh
changeset 9284 f5fb020fb928
parent 9283 6723e3e133ea
child 9285 559ac7dd4ee4
     1.1 --- a/build-scripts/emscripten-buildbot.sh	Wed Dec 24 12:49:35 2014 -0500
     1.2 +++ b/build-scripts/emscripten-buildbot.sh	Wed Dec 24 13:03:20 2014 -0500
     1.3 @@ -7,6 +7,11 @@
     1.4     exit 1
     1.5  fi
     1.6  
     1.7 +TARBALL="$1"
     1.8 +if [ -z $1 ]; then
     1.9 +    TARBALL=sdl-emscripten.tar.xz
    1.10 +fi
    1.11 +
    1.12  cd `dirname "$0"`
    1.13  cd ..
    1.14  SDLBASE=`pwd`
    1.15 @@ -39,21 +44,26 @@
    1.16  source "$ENVSCRIPT"
    1.17  
    1.18  echo "Setting up..."
    1.19 -set -e
    1.20  set -x
    1.21  cd "$SDLBASE"
    1.22  rm -rf buildbot
    1.23 +rm -rf emscripten-sdl2-installed
    1.24  mkdir buildbot
    1.25 -cd buildbot
    1.26 +pushd buildbot
    1.27  
    1.28  echo "Configuring..."
    1.29 -emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2 -Wno-warn-absolute-paths"
    1.30 +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="$SDLBASE/emscripten-sdl2-installed"
    1.31  
    1.32  echo "Building..."
    1.33  emmake $MAKE
    1.34  
    1.35 -set +x
    1.36 -echo "Done! The library is in $SDLBASE/buildbot/build/.libs/libSDL2.a ..."
    1.37 +echo "Moving things around..."
    1.38 +emmake $MAKE install
    1.39 +mkdir -p ./usr
    1.40 +mv "$SDLBASE/emscripten-sdl2-installed" ./usr/local
    1.41 +popd
    1.42 +tar -cJvvf $TARBALL -C buildbot usr
    1.43 +rm -rf buildbot
    1.44  
    1.45  exit 0
    1.46