Initial emscripten SDL2 integration. It compiles. Hope it works

This commit is contained in:
Jonathan Campbell
2018-09-14 16:10:08 -07:00
parent 63a35160a4
commit 73977da7e8
5 changed files with 79 additions and 31 deletions

20
build-emscripten-sdl2 Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# make sure you use ". ./emsdk_set_env.sh"
# I'm sick and tired of all the churn the three versions of autoconf
# are causing in this repo. Stop committing the configure scripts
# and just autoregen.
./autogen.sh || exit 1
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
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@/