Update Makefile

This commit is contained in:
Ray
2025-01-12 16:19:46 +01:00
parent 1f81371106
commit e09dfe8bbd

View File

@ -219,21 +219,23 @@ endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
# -Os # size optimization # -Os # size optimization
# -O2 # optimization level 2, if used, also set --memory-init-file 0 # -O2 # optimization level 2, if used, also set --memory-init-file 0
# -s USE_GLFW=3 # Use glfw3 library (context/input management) # -sUSE_GLFW=3 # Use glfw3 library (context/input management)
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL! # -sALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) # -sTOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
# -s USE_PTHREADS=1 # multithreading support # -sUSE_PTHREADS=1 # multithreading support
# -s WASM=0 # disable Web Assembly, emitted by default # -sWASM=0 # disable Web Assembly, emitted by default
# -s EMTERPRETIFY=1 # enable emscripten code interpreter (very slow) # -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
# -s EMTERPRETIFY_ASYNC=1 # support synchronous loops by emterpreter # -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data # -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off) # -sMINIFY_HTML=0 # minify generated html from shell.html
# --profiling # include information for code profiling # --profiling # include information for code profiling
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem) # --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation # --preload-file resources # specify a resources folder for data compilation
CFLAGS += -Os -s USE_GLFW=3 -s FORCE_FILESYSTEM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 --preload-file $(dir $<)resources@resources # --source-map-base # allow debugging in browser with source map
# --shell-file shell.html # define a custom shell .html and output extension
CFLAGS += -Os -sUSE_GLFW=3 -sFORCE_FILESYSTEM=1 -sASYNCIFY --preload-file $(dir $<)resources@resources
ifeq ($(BUILD_MODE), DEBUG) ifeq ($(BUILD_MODE), DEBUG)
CFLAGS += -s ASSERTIONS=1 --profiling CFLAGS += -sASSERTIONS=1 --profiling
endif endif
# NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way, # NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way,
# we can compile same code for ALL platforms with no change required, but, working on bigger # we can compile same code for ALL platforms with no change required, but, working on bigger