Skip to content

Commit

Permalink
Update the flags used with Emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
mesheets committed Jul 1, 2024
1 parent 8f4e879 commit e018d4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e018d4f

Please sign in to comment.