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 a738f53..c32626d 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