From 5e52630af1d44b1dc72331d20362c74ba6034a53 Mon Sep 17 00:00:00 2001 From: Justin Kerk Date: Wed, 5 Nov 2014 23:12:54 -0800 Subject: Build fixes for Emscripten (nw) --- makefile | 2 +- src/osd/sdl/sdl.mak | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 0c7aac71a64..5584f847e92 100644 --- a/makefile +++ b/makefile @@ -910,7 +910,7 @@ $(EMULATOR): $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBBUS) $(LIBOP $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ) @echo Linking $@... ifeq ($(TARGETOS),emscripten) - # Emscripten's linker seems to be stricter about the ordering of .a files +# Emscripten's linker seems to be stricter about the ordering of .a files $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $^ -Wl,--end-group $(LIBS) -o $@ else $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $@ diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index e738fa8b523..21dd81472cc 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -83,13 +83,17 @@ SDL_FRAMEWORK_PATH = /Library/Frameworks/ OSDSRC = $(SRC)/osd OSDOBJ = $(OBJ)/osd -# default to SDL2 for non-OS/2 builds now +# default to SDL2 for non-OS/2, non-Emscripten builds now ifndef SDL_LIBVER ifneq ($(TARGETOS),os2) +ifneq ($(TARGETOS),emscripten) SDL_LIBVER = sdl2 else SDL_LIBVER = sdl endif +else +SDL_LIBVER = sdl +endif endif ifndef NO_USE_QTDEBUG @@ -258,6 +262,7 @@ NO_X11 = 1 NO_USE_XINPUT = 1 NO_USE_MIDI = 1 NO_USE_QTDEBUG = 1 +DONT_USE_NETWORK = 1 endif ifeq ($(TARGETOS),macosx) @@ -779,6 +784,8 @@ ifneq ($(TARGETOS),win32) LIBS += -lpcap endif endif +else +OSDOBJS += $(SDLOBJ)/netdev.o endif #------------------------------------------------- -- cgit v1.2.3