Make SDL2 optional for Emscripten

This commit is contained in:
twinaphex 2016-08-01 16:29:56 +02:00
parent 6d76a04b0f
commit 5f183d9895

View File

@ -3,7 +3,7 @@ TARGET = retroarch.js
OS = Emscripten
OBJ :=
DEFINES := -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_MAIN
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_SDL2 -DHAVE_FILTERS_BUILTIN
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
HAVE_EGL = 1
HAVE_OPENGL = 1
@ -26,7 +26,11 @@ ifneq ($(NATIVE_ZLIB),)
WANT_ZLIB = 0
endif
#if you compil with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
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 :=
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s OUTLINING_LIMIT=50000 \