about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-09-20 11:03:35 -0400
committerCharadon <dev@iotib.net>2022-09-20 11:03:35 -0400
commitce111c26fa183ede6ccfcbf20bd8b8263330278d (patch)
treee71144b7db777897c534a29f811e1ed0dc3b8c57
parent6663682763d953ba20805fd6a15f79c06f4ac7f4 (diff)
downloadPong-C-ce111c26fa183ede6ccfcbf20bd8b8263330278d.tar.gz
Added debug option in Tupfile
-rw-r--r--Tupfile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tupfile b/Tupfile
index 678d8e5..5c0af08 100644
--- a/Tupfile
+++ b/Tupfile
@@ -1,6 +1,12 @@
 CFLAGS += `pkg-config --cflags raylib` `pkg-config --cflags glfw3` `pkg-config --cflags glu`
 CFLAGS += `pkg-config --cflags gl` `pkg-config --cflags sdl2` `pkg-config --cflags SDL2_mixer` `pkg-config --cflags bdw-gc`
-CFLAGS += -Isrc/ -std=gnu99 -Wall -O3 -g -ggdb
+CFLAGS += -Isrc/ -std=gnu99 -Wall -Werror
+# Compile more debug stuff is debug is enabled.
+ifeq (@(DEBUG),true)
+	CFLAGS += -Og -g -ggdb
+else
+	CFLAGS += -O3
+endif
 LDFLAGS += `pkg-config --libs raylib` `pkg-config --libs glfw3` `pkg-config --libs glu`
 LDFLAGS += `pkg-config --libs gl` `pkg-config --libs sdl2` `pkg-config --libs SDL2_mixer`
 LDFLAGS += `pkg-config --libs bdw-gc`