forked from joncampbell123/dosbox-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-emscripten-sdl2
executable file
·20 lines (14 loc) · 1017 Bytes
/
build-emscripten-sdl2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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 --enable-force-menu-sdldraw --disable-x11 "$@"
make -j3 || exit 1
#emcc -O1 -s USE_SDL=2 -s TOTAL_MEMORY=104857600 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s [email protected] dosbox-x.bc --memory-init-file 0 -o th5e.html --preload-file d:/tmpp/th5x@/