Parcourir la source

Review DEBUG mode

Ray il y a 6 ans
Parent
commit
55380f8489
2 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 4 1
      examples/Makefile
  2. 4 1
      src/Makefile

+ 4 - 1
examples/Makefile

@@ -188,11 +188,14 @@ endif
 #  -std=gnu99           defines C language mode (GNU C from 1999 revision)
 #  -std=gnu99           defines C language mode (GNU C from 1999 revision)
 #  -Wno-missing-braces  ignore invalid warning (GCC bug 53119)
 #  -Wno-missing-braces  ignore invalid warning (GCC bug 53119)
 #  -D_DEFAULT_SOURCE    use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
 #  -D_DEFAULT_SOURCE    use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
-CFLAGS += -O1 -s -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
+CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
 
 
 ifeq ($(BUILD_MODE),DEBUG)
 ifeq ($(BUILD_MODE),DEBUG)
     CFLAGS += -g
     CFLAGS += -g
 endif
 endif
+ifeq ($(RAYLIB_BUILD_MODE),RELEASE)
+    CFLAGS += -O1 -s
+endif
 
 
 # Additional flags for compiler (if desired)
 # Additional flags for compiler (if desired)
 #CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
 #CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes

+ 4 - 1
src/Makefile

@@ -256,11 +256,14 @@ endif
 #  -D_DEFAULT_SOURCE        use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
 #  -D_DEFAULT_SOURCE        use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
 #  -Werror=pointer-arith    catch unportable code that does direct arithmetic on void pointers
 #  -Werror=pointer-arith    catch unportable code that does direct arithmetic on void pointers
 #  -fno-strict-aliasing     jar_xm.h does shady stuff (breaks strict aliasing)
 #  -fno-strict-aliasing     jar_xm.h does shady stuff (breaks strict aliasing)
-CFLAGS += -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing
+CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing
 
 
 ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
 ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
     CFLAGS += -g
     CFLAGS += -g
 endif
 endif
+ifeq ($(RAYLIB_BUILD_MODE),RELEASE)
+    CFLAGS += -O1
+endif
 
 
 # Additional flags for compiler (if desired)
 # Additional flags for compiler (if desired)
 #  -Wextra                  enables some extra warning flags that are not enabled by -Wall
 #  -Wextra                  enables some extra warning flags that are not enabled by -Wall