Browse Source

build: add experimental support for emscripten.

legacy
Sam Hocevar sam 11 years ago
parent
commit
b106bdd8f9
4 changed files with 26 additions and 2 deletions
  1. +1
    -1
      build/Makefile.am
  2. +6
    -1
      build/autotools/common.am
  3. +10
    -0
      build/build-html
  4. +9
    -0
      build/lol-build

+ 1
- 1
build/Makefile.am View File

@@ -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



+ 6
- 1
build/autotools/common.am View File

@@ -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 $@


#


+ 10
- 0
build/build-html View File

@@ -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


+ 9
- 0
build/lol-build View File

@@ -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"
;;


Loading…
Cancel
Save