summaryrefslogtreecommitdiffhomepage
path: root/templates/simple_game
diff options
context:
space:
mode:
authorRay <[email protected]>2020-08-08 14:08:56 +0200
committerRay <[email protected]>2020-08-08 14:08:56 +0200
commit959d0d259146c943fe3db61fd1664169303c6394 (patch)
tree203c12c6c36b2ec0352f3ad241770a7710906fe3 /templates/simple_game
parent1841a6bd3b9600484b368b546eef34f7860e4951 (diff)
downloadraylib-959d0d259146c943fe3db61fd1664169303c6394.tar.gz
raylib-959d0d259146c943fe3db61fd1664169303c6394.zip
Review Makefiles for WEB compilation
Diffstat (limited to 'templates/simple_game')
-rw-r--r--templates/simple_game/Makefile14
1 files changed, 6 insertions, 8 deletions
diff --git a/templates/simple_game/Makefile b/templates/simple_game/Makefile
index 9614aeb5..1d77f6fe 100644
--- a/templates/simple_game/Makefile
+++ b/templates/simple_game/Makefile
@@ -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.