diff --git a/Makefile b/Makefile index 36963c3..964ce0e 100755 --- a/Makefile +++ b/Makefile @@ -92,10 +92,17 @@ OSTYPE := $(strip $(shell uname -s)) ifneq (,$(strip $(findstring $(TARGETTYPE), WebAssembly))) # WebAssembly CXX = emcc - CFLAGS_EXEC += --shell-file ./emscripten/webnqc_shell.html -s INVOKE_RUN=0 -s MODULARIZE=1 -s EXPORT_NAME=createWebNqc -s EXPORTED_RUNTIME_METHODS='["callMain","FS"]' OBJ_SUBDIR_NAME = wobj EXEC_SUBDIR_NAME = wasm EXEC_EXT = .html + + # Documentation for various Emscripten flags + # - Full List: https://github.com/emscripten-core/emscripten/blob/main/src/settings.js + # - Modularize: https://emscripten.org/docs/getting_started/FAQ.html#can-i-use-multiple-emscripten-compiled-programs-on-one-web-page + # - Environment: https://emscripten.org/docs/getting_started/FAQ.html#can-i-build-javascript-that-only-runs-on-the-web + # - Single File: https://emscripten.org/docs/compiling/Building-Projects.html?highlight=SINGLE_FILE#emscripten-linker-output-files + CFLAGS_EXEC += --shell-file ./emscripten/webnqc_shell.html -s EXPORT_NAME=createWebNqc -s EXPORTED_RUNTIME_METHODS='["callMain","FS"]' \ + -s INVOKE_RUN=false -s MODULARIZE=1 -s ENVIRONMENT=web -s SINGLE_FILE else ifneq (,$(strip $(findstring $(OSTYPE), Darwin))) # Mac OS X