summaryrefslogtreecommitdiffhomepage
path: root/projects/VSCode/Makefile
diff options
context:
space:
mode:
authorJuDelCo <[email protected]>2019-11-12 19:30:45 +0100
committerRay <[email protected]>2019-11-12 19:30:45 +0100
commit74642ba1c634ca6e5b09a6c45855dcb9497feebb (patch)
tree5b652eb8edc32ac5c2d1a24038b9eae9879efdd6 /projects/VSCode/Makefile
parent96b0563249ca1c1c3fa4939a4e68253b90b2f094 (diff)
downloadraylib-74642ba1c634ca6e5b09a6c45855dcb9497feebb.tar.gz
raylib-74642ba1c634ca6e5b09a6c45855dcb9497feebb.zip
Fix VSCode template for debugging. (#1014)
Diffstat (limited to 'projects/VSCode/Makefile')
-rw-r--r--projects/VSCode/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/projects/VSCode/Makefile b/projects/VSCode/Makefile
index 13a2853b..64d07f1d 100644
--- a/projects/VSCode/Makefile
+++ b/projects/VSCode/Makefile
@@ -183,18 +183,21 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
# Define compiler flags:
+# -O0 defines optimization level (no optimization, better for debugging)
# -O1 defines optimization level
# -g include debug information on compilation
-# -s strip unnecessary data from build
+# -s strip unnecessary data from build -> do not use in debug builds
# -Wall turns on most, but not all, compiler warnings
# -std=c99 defines C language mode (standard C from 1999 revision)
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
# -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)
- CFLAGS += -g
+ CFLAGS += -g -O0
+else
+ CFLAGS += -s -O1
endif
# Additional flags for compiler (if desired)