only use -g if debugging is requested
authorFelix Fietkau <nbd@openwrt.org>
Wed, 23 Jan 2008 07:26:32 +0000 (08:26 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 23 Jan 2008 07:26:32 +0000 (08:26 +0100)
Makefile

index a738f539b9ab7cbeade88e5a5294e4e8a993c66a..c32626de9e9deda5f213ba59a61de5620d2a4137 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
-COPTS=-g -O2
-CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror $(if $(DEBUG),-DDEBUG_ALL)
+COPTS=-O2
+CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror
+ifneq ($(DEBUG),)
+  CFLAGS += -g3 -DDEBUG_ALL
+endif
 
 AR=ar
 CC=gcc