diff --git a/build/Makefile.am b/build/Makefile.am index 5d284872..21793756 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/build/autotools/common.am EXTRA_DIST += lol-build \ check-source.sh run-bitten.sh \ build-linux build-mingw build-mingw64 build-ps3 \ - build-nacl32 build-nacl64 \ + build-nacl32 build-nacl64 build-android build-html \ \ autotools/common.am diff --git a/build/autotools/common.am b/build/autotools/common.am index 76d4af2d..34717c19 100644 --- a/build/autotools/common.am +++ b/build/autotools/common.am @@ -65,7 +65,12 @@ SUFFIXES += .lolfx echo "lolfx_resource_$(notdir $(basename $(filter %.lolfx, $^))) ="; \ $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \ echo ";") \ - | $(CXXCOMPILE) -xc++ -c - -o $@ + > $@.lolfx.cpp && \ + $(CXXCOMPILE) -xc++ -c $@.lolfx.cpp -o $@ && \ + exit=0 || exit=1; rm -f $@.lolfx.cpp ; exit "$$exit" + +# Disable on the fly compilation because emscripten doesn't support it +# | $(CXXCOMPILE) -xc++ -c - -o $@ # diff --git a/build/build-html b/build/build-html new file mode 100755 index 00000000..4d240c2f --- /dev/null +++ b/build/build-html @@ -0,0 +1,10 @@ +#!/bin/sh + +# This can't hurt +make distclean + +set -e +./build/lol-build bootstrap emscripten-html +./build/lol-build configure emscripten-html +./build/lol-build build emscripten-html + diff --git a/build/lol-build b/build/lol-build index 8c0a10e3..b93624ae 100755 --- a/build/lol-build +++ b/build/lol-build @@ -24,6 +24,8 @@ # - win*-i386 # - win*-amd64 # - raspi-arm +# - emscripten-html +# - emscripten-js # set -e @@ -89,6 +91,9 @@ __init__() WINEDLLOVERRIDES="winemenubuilder.exe,wineboot.exe,explorer.exe,winedbg.exe=d" export WINEDLLOVERRIDES + LLVM_ADD_VERSION=3.0 + export LLVM_ADD_VERSION + # Ensure SDL does not redirect stdout/stderr to local files SDL_STDIO_REDIRECT=0 export SDL_STDIO_REDIRECT @@ -233,6 +238,10 @@ configure() PATH="$PATH" PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS" ;; + emscripten-*) + EM_HOME=$HOME/emscripten + ./configure CC=$EM_HOME/emcc CXX=$EM_HOME/em++ AR=$EM_HOME/emar RANLIB=$EM_HOME/emranlib PKG_CONFIG=false ac_cv_exeext=".${platform##emscripten-}" + ;; *) PATH="$PATH" ./configure CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS" ;;