Pārlūkot izejas kodu

build: add experimental support for emscripten.

legacy
Sam Hocevar sam pirms 11 gadiem
vecāks
revīzija
b106bdd8f9
4 mainītis faili ar 26 papildinājumiem un 2 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt