Initial emscripten

This commit is contained in:
Ross Squires
2020-12-07 09:11:51 -05:00
parent 9e9d7acd93
commit 008cb7e568
8 changed files with 37 additions and 18 deletions

View File

@@ -7,14 +7,32 @@
# and just autoregen.
./autogen.sh || exit 1
# for sdl2-config and sdl-config
export PATH=$EMSDK/upstream/emscripten/system/bin:$PATH
export CC="emcc"
export CXX="em++"
export LD="emcc"
export LD_CXX="em++"
export CFLAGS="-DEMTERPRETER_SYNC"
export CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s TOTAL_MEMORY=47775744 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0"
# where are we?
top=`pwd`
if test -z "$top" ; then exit 1; fi
# fix
chmod +x vs2015/sdl/build-scripts/strip_fPIC.sh
echo Compiling DOSBox-X
chmod +x configure
# for sdl2-config and sdl-config
export PATH=/opt/emsdk/emscripten/incoming/system/bin:$PATH
# build command borrowed from Yksoft1 vanilla DOSBox-X port with modifications
CC="emcc" CXX="em++" LD="emcc" LD_CXX="em++" CFLAGS="-DEMTERPRETER_SYNC" CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC" ./configure --host=x86_64-linux --disable-dynamic-x86 --enable-sdl2 --with-sdl-prefix=/opt/emsdk/emscripten/incoming/system --disable-opengl --disable-mt32 --enable-emscripten --enable-force-menu-sdldraw --disable-x11 "$@"
./configure \
--host=x86_64-linux --disable-dynamic-x86 --disable-fpu-x86 \
--enable-sdl2 --with-sdl-prefix=$EMSDK/upstream/emscripten/system \
--disable-opengl --disable-mt32 --enable-emscripten --enable-force-menu-sdldraw --disable-x11 \
--disable-directserial "$@"
make -j3 || exit 1
#emcc -O1 -s USE_SDL=2 -s TOTAL_MEMORY=104857600 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s EMTERPRETIFY_WHITELIST=@d3.txt dosbox-x.bc --memory-init-file 0 -o th5e.html --preload-file d:/tmpp/th5x@/