Allow pthread support in emscripten
This commit is contained in:
parent
9179b6b6f2
commit
01c43f5eef
|
@ -3,9 +3,10 @@ TARGET := retroarch.js
|
||||||
EOPT = USE_ZLIB=1 USE_SDL=2 # Emscripten specific options
|
EOPT = USE_ZLIB=1 USE_SDL=2 # Emscripten specific options
|
||||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||||
|
|
||||||
|
PTHREAD = 0
|
||||||
OS = Emscripten
|
OS = Emscripten
|
||||||
OBJ :=
|
OBJ :=
|
||||||
DEFINES := -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_MAIN
|
DEFINES := -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
||||||
|
|
||||||
HAVE_EGL = 1
|
HAVE_EGL = 1
|
||||||
|
@ -36,7 +37,7 @@ endif
|
||||||
#if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
|
#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_SDL=2 -s USE_ZLIB=1
|
||||||
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s ASYNCIFY=$(ASYNC) \
|
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s ASYNCIFY=$(ASYNC) -s USE_PTHREADS=$(PTHREAD) \
|
||||||
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
||||||
--js-library emscripten/library_rwebaudio.js \
|
--js-library emscripten/library_rwebaudio.js \
|
||||||
--js-library emscripten/library_rwebinput.js \
|
--js-library emscripten/library_rwebinput.js \
|
||||||
|
|
Loading…
Reference in New Issue