From fca639ad84bd7fe2352b93a4e35d73c967d7b347 Mon Sep 17 00:00:00 2001 From: Toad King Date: Sun, 14 Jan 2018 14:42:57 -0600 Subject: [PATCH] remove linking SDL code --- Makefile.emscripten | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.emscripten b/Makefile.emscripten index 2fb4de0e2d..0334d2edf3 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -32,13 +32,9 @@ ifneq ($(NATIVE_ZLIB),) WANT_ZLIB = 0 endif -ifeq ($(HAVE_SDL2), 1) -DEFINES += -DHAVE_SDL2 -endif - #if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS: -LIBS := -s USE_SDL=2 -s USE_ZLIB=1 +LIBS := -s USE_ZLIB=1 LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s NO_EXIT_RUNTIME=0 \ -s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \ --js-library emscripten/library_rwebaudio.js \ @@ -51,6 +47,11 @@ ifeq ($(ASYNC), 1) LDFLAGS += -s ASYNCIFY=$(ASYNC) endif +ifeq ($(HAVE_SDL2), 1) + LIBS += -s USE_SDL=2 + DEFINES += -DHAVE_SDL2 +endif + include Makefile.common CFLAGS += -Ideps/libz -Ideps -Ideps/stb