PUD: nmealib: do not optimise when compiling with debug
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 26 Jun 2012 09:07:14 +0000 (11:07 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 26 Jun 2012 09:10:22 +0000 (11:10 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/nmealib/Makefile.inc

index a471d55..f33826e 100644 (file)
@@ -35,5 +35,11 @@ CFLAGS ?= -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wm
           -Wno-multichar -Wno-deprecated-declarations -Wendif-labels -Wwrite-strings -Wbad-function-cast \
           -Wpointer-arith -Wcast-qual -Wshadow -Wformat -Wsequence-point -Wcast-align -Wnested-externs \
           -Winline -Wdisabled-optimization -finline-functions-called-once -funit-at-a-time -fearly-inlining \
-          -finline-limit=350 -O2  -fPIC -ggdb -fPIC -O2 -Wall -Wextra -Wformat=2 -Winit-self -Wmissing-include-dirs \
+          -finline-limit=350 -fPIC -ggdb -Wformat=2 -Winit-self -Wmissing-include-dirs \
           -Wswitch-default -Wswitch-enum
+
+ifeq ($(DEBUG),0)
+CFLAGS+= -O2
+else
+CFLAGS+= -O0
+endif