From d2aeafcf1ef3e6cace8a15d8ff0f8c71697d8714 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 22 Feb 2020 10:36:34 +0100 Subject: [PATCH] Update Makefile --- src/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Makefile b/src/Makefile index e7086e55c..3a7907895 100644 --- a/src/Makefile +++ b/src/Makefile @@ -291,9 +291,16 @@ endif ifeq ($(RAYLIB_BUILD_MODE),DEBUG) CFLAGS += -g + ifeq ($(PLATFORM),PLATFORM_WEB) + CFLAGS += -s ASSERTIONS=1 --profiling + endif endif ifeq ($(RAYLIB_BUILD_MODE),RELEASE) - CFLAGS += -O1 + ifeq ($(PLATFORM),PLATFORM_WEB) + CFLAGS += -Os + else + CFLAGS += -s -O1 + endif endif # Additional flags for compiler (if desired) @@ -311,18 +318,12 @@ ifeq ($(PLATFORM),PLATFORM_WEB) # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL! # -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 - ifeq ($(RAYLIB_BUILD_MODE),DEBUG) - CFLAGS += -s ASSERTIONS=1 --profiling - endif endif ifeq ($(PLATFORM),PLATFORM_ANDROID) # Compiler flags for arquitecture