summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRay <[email protected]>2019-05-14 18:01:20 +0200
committerRay <[email protected]>2019-05-14 18:01:20 +0200
commit7eb488a35079a6d940ec92af568407103996e68f (patch)
tree2f10ab3f45a94b97aef674cff810fbb8f381c5b1 /examples
parent424d3ca8d9c5d612606444b2a2099cfad37f1888 (diff)
downloadraylib-7eb488a35079a6d940ec92af568407103996e68f.tar.gz
raylib-7eb488a35079a6d940ec92af568407103996e68f.zip
Improve support for web building
Note that building examples for web as they are (no code adaptation for web avoiding while loop) implies using the emterpreter... and that's very slow!
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 6b9f5229..2163ca75 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -117,9 +117,9 @@ endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# Emscripten required variables
- EMSDK_PATH = C:/emsdk
- EMSCRIPTEN_VERSION = 1.38.30
- CLANG_VERSION = e1.38.30_64bit
+ EMSDK_PATH ?= D:/emsdk
+ EMSCRIPTEN_VERSION ?= 1.38.31
+ CLANG_VERSION = e$(EMSCRIPTEN_VERSION)_64bit
PYTHON_VERSION = 2.7.13.1_64bit\python-2.7.13.amd64
NODE_VERSION = 8.9.1_64bit
export PATH = $(EMSDK_PATH);$(EMSDK_PATH)\clang\$(CLANG_VERSION);$(EMSDK_PATH)\node\$(NODE_VERSION)\bin;$(EMSDK_PATH)\python\$(PYTHON_VERSION);$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION);C:\raylib\MinGW\bin:$$(PATH)
@@ -249,8 +249,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
# --profiling # include information for code profiling
# --preload-file resources # specify a resources folder for data compilation
- CFLAGS += -Os -s USE_GLFW=3 -s ASSERTIONS=2 -s WASM=1 -s FORCE_FILESYSTEM=1
- # -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 --preload-file audio/resources@resources
+ CFLAGS += -Os -s USE_GLFW=3 -s ASSERTIONS=2 -s WASM=1 -s FORCE_FILESYSTEM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 --preload-file $(dir $<)resources@resources
# 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