about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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`