mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-08 19:32:39 +08:00
43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# make sure you use ". ./emsdk_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
|
|
|
|
# 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 AR="emar"
|
|
export RANLIB="emranlib"
|
|
export CFLAGS="-DEMTERPRETER_SYNC"
|
|
export CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2"
|
|
export LDFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2 -s FORCE_FILESYSTEM=1 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=100663296 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0"
|
|
|
|
# where are we?
|
|
top=`pwd`
|
|
if test -z "$top" ; then exit 1; fi
|
|
|
|
# fix
|
|
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
|
|
|
echo Compiling DOSBox-X
|
|
chmod +x configure
|
|
|
|
# build command borrowed from Yksoft1 vanilla DOSBox-X port with modifications
|
|
./configure \
|
|
--host=x86_64-linux --disable-dynrec --disable-dynamic-x86 --disable-fpu-x86 --disable-dynamic-core \
|
|
--enable-sdl2 --with-sdl-prefix=$EMSDK/upstream/emscripten/system --disable-screenshots \
|
|
--disable-opengl --disable-mt32 --enable-emscripten --enable-force-menu-sdldraw --disable-x11 \
|
|
--disable-avcodec --disable-libslirp --disable-libfluidsynth --disable-freetype "$@"
|
|
|
|
make -j6 || exit 1
|
|
|
|
# the resulting files are src/dosbox-x (JS) and src/dosbox-x.wasm
|