mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-10 04:08:57 +08:00
compilation fixes for Emscripten, part 1
This commit is contained in:
parent
65d88210cf
commit
a32e6b31ed
@ -15,7 +15,8 @@ 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=95551488 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0"
|
||||
export CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2 -s USE_FREETYPE=1"
|
||||
export LDFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC -s USE_ZLIB=1 -s USE_SDL=2 -s USE_FREETYPE=1 -s TOTAL_MEMORY=134217728 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0"
|
||||
|
||||
# where are we?
|
||||
top=`pwd`
|
||||
@ -32,9 +33,5 @@ chmod +x configure
|
||||
--host=x86_64-linux --disable-fpu-x86 --disable-dynamic-core \
|
||||
--enable-sdl2 --with-sdl-prefix=$EMSDK/upstream/emscripten/system \
|
||||
--disable-opengl --disable-mt32 --enable-emscripten --enable-force-menu-sdldraw --disable-x11 \
|
||||
--disable-directserial "$@"
|
||||
--disable-avcodec --disable-libslirp --disable-libfluidsynth "$@"
|
||||
make -j6 || exit 1
|
||||
|
||||
cd src;
|
||||
emcc -DEMSCRIPTEN=1 -s USE_ZLIB=1 -s TOTAL_MEMORY=95551488 -s ASYNCIFY -s ERROR_ON_UNDEFINED_SYMBOLS=0 -std=gnu++14 -Os -DFORCE_SDLDRAW -Wall -Wextra -Wunused -pedantic -Wlogical-op -Wsign-promo -Wconversion-null -Wno-deprecated-declarations -Wno-implicit-fallthrough -Wno-strict-aliasing -Wno-missing-field-initializers -Wno-format-zero-length -Wno-address-of-packed-member -Wno-int-to-void-pointer-cast -I/home/rossimo/dosbox-x -I/home/rossimo/dosbox-x/vs/sdlnet/linux-host/include -I/home/rossimo/dosbox-x/vs/sdlnet/linux-host/include/SDL -L/home/rossimo/dosbox-x/vs/sdlnet/linux-host/lib -o dosbox-x.html dosbox.o debug/libdebug.a dos/libdos.a shell/libshell.a builtin/libbuiltin.a ints/libints.a misc/libmisc.a hardware/serialport/libserial.a hardware/parport/libparallel.a libs/porttalk/libporttalk.a gui/libgui.a libs/gui_tk/libgui_tk.a hardware/libhardware.a cpu/libcpu.a hardware/reSID/libresid.a fpu/libfpu.a gui/libgui.a output/liboutput.a hardware/mame/libmame.a libs/zmbv/libzmbv.a libs/decoders/internal/libopusint.a -s USE_SDL=2 -lz ;
|
||||
cd ..
|
@ -34,7 +34,7 @@ int main(){
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if $CXX $CPPFLAGS $CXXFLAGS -Werror -o conftest.o conftest.c++ [$1] > /dev/null 2>&1
|
||||
if $CXX $CPPFLAGS $CXXFLAGS -Werror -c -o conftest.o conftest.c++ [$1] > /dev/null 2>&1
|
||||
then
|
||||
AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="${CXXFLAGS} [$1]"
|
||||
|
@ -20,6 +20,10 @@
|
||||
#ifndef DOSBOX_DOSBOX_H
|
||||
#define DOSBOX_DOSBOX_H
|
||||
|
||||
#if !defined (WIN32)
|
||||
/* for mkdir_p, needed by emscripten */
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
#if defined(C_ICONV)
|
||||
|
@ -30,6 +30,9 @@
|
||||
#define _DARWIN_C_SOURCE
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
#if defined(EMSCRIPTEN)
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include <utime.h>
|
||||
#include <sys/file.h>
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user