Skip to content

Commit ea31bd4

Browse files
committed
REVIEWED: PLATFORM_WEB build flags, added GL_ENABLE_GET_PROC_ADDRESS
Reviewed flags formating
1 parent 6a8cc62 commit ea31bd4

File tree

3 files changed

+59
-55
lines changed

3 files changed

+59
-55
lines changed

examples/Makefile

+13-12
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ CFLAGS = -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
202202
ifeq ($(BUILD_MODE),DEBUG)
203203
CFLAGS += -g -D_DEBUG
204204
ifeq ($(PLATFORM),PLATFORM_WEB)
205-
CFLAGS += -s ASSERTIONS=1 --profiling
205+
CFLAGS += -sASSERTIONS=1 --profiling
206206
endif
207207
else
208208
ifeq ($(PLATFORM),PLATFORM_WEB)
@@ -298,23 +298,24 @@ endif
298298
ifeq ($(PLATFORM),PLATFORM_WEB)
299299
# -Os # size optimization
300300
# -O2 # optimization level 2, if used, also set --memory-init-file 0
301-
# -s USE_GLFW=3 # Use glfw3 library (context/input management)
302-
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
303-
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
304-
# -s USE_PTHREADS=1 # multithreading support
305-
# -s WASM=0 # disable Web Assembly, emitted by default
306-
# -s ASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
307-
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
308-
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
301+
# -sUSE_GLFW=3 # Use glfw3 library (context/input management)
302+
# -sALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
303+
# -sTOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
304+
# -sUSE_PTHREADS=1 # multithreading support
305+
# -sWASM=0 # disable Web Assembly, emitted by default
306+
# -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
307+
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
308+
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
309+
# -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
309310
# --profiling # include information for code profiling
310311
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
311312
# --preload-file resources # specify a resources folder for data compilation
312313
# --source-map-base # allow debugging in browser with source map
313-
LDFLAGS += -s USE_GLFW=3 -s TOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -s FORCE_FILESYSTEM=1
314+
LDFLAGS += -sUSE_GLFW=3 -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1 -sGL_ENABLE_GET_PROC_ADDRESS
314315

315316
# Build using asyncify
316317
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
317-
LDFLAGS += -s ASYNCIFY
318+
LDFLAGS += -sASYNCIFY
318319
endif
319320

320321
# Add resources building if required
@@ -324,7 +325,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
324325

325326
# Add debug mode flags if required
326327
ifeq ($(BUILD_MODE),DEBUG)
327-
LDFLAGS += -s ASSERTIONS=1 --profiling
328+
LDFLAGS += -sASSERTIONS=1 --profiling
328329
endif
329330

330331
# Define a custom shell .html and output extension

0 commit comments

Comments
 (0)