From b5cd030eff4a1c73184cf3c94f79e57695d8568e Mon Sep 17 00:00:00 2001 From: Logan McNaughton Date: Fri, 23 Sep 2016 09:16:45 -0600 Subject: [PATCH] Only set PTHREAD_POOL_SIZE=2 if PTHREAD is on --- Makefile.emscripten | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.emscripten b/Makefile.emscripten index 70549715ba..310b234568 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -37,11 +37,14 @@ 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 -LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s ASYNCIFY=$(ASYNC) -s USE_PTHREADS=$(PTHREAD) -s PTHREAD_POOL_SIZE=2 \ +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']" \ --js-library emscripten/library_rwebaudio.js \ --js-library emscripten/library_rwebinput.js \ --js-library emscripten/library_rwebcam.js +ifneq ($(PTHREAD), 0) + LDFLAGS += -s PTHREAD_POOL_SIZE=2 +endif include Makefile.common