|
@@ -116,10 +116,10 @@ endif
|
|
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
|
|
# Emscripten required variables
|
|
|
EMSDK_PATH ?= C:/emsdk
|
|
|
- EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/fastcomp/emscripten
|
|
|
- CLANG_PATH = $(EMSDK_PATH)/fastcomp/bin
|
|
|
- PYTHON_PATH = $(EMSDK_PATH)/python/2.7.13.1_64bit/python-2.7.13.amd64
|
|
|
- NODE_PATH = $(EMSDK_PATH)/node/12.9.1_64bit/bin
|
|
|
+ EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
|
|
+ CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
|
|
+ PYTHON_PATH = $(EMSDK_PATH)/python/3.7.4_64bit
|
|
|
+ NODE_PATH = $(EMSDK_PATH)/node/12.18.1_64bit/bin
|
|
|
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:\raylib\MinGW\bin:$$(PATH)
|
|
|
endif
|
|
|
|
|
@@ -229,16 +229,14 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
|
|
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
|
|
|
# -s USE_PTHREADS=1 # multithreading support
|
|
|
# -s WASM=0 # disable Web Assembly, emitted by default
|
|
|
- # -s EMTERPRETIFY=1 # enable emscripten code interpreter (very slow)
|
|
|
- # -s EMTERPRETIFY_ASYNC=1 # support synchronous loops by emterpreter
|
|
|
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
|
|
|
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
|
|
|
# --profiling # include information for code profiling
|
|
|
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
|
|
|
# --preload-file resources # specify a resources folder for data compilation
|
|
|
- CFLAGS += -s USE_GLFW=3 -s TOTAL_MEMORY=16777216 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1
|
|
|
+ CFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=16777216 -s FORCE_FILESYSTEM=1
|
|
|
|
|
|
- # NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way,
|
|
|
+ # NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
|
|
|
# we can compile same code for ALL platforms with no change required, but, working on bigger
|
|
|
# projects, code needs to be refactored to avoid a blocking while() loop, moving Update and Draw
|
|
|
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
|