diff mbox

[PATCHv2,1/2] Makefile.inc: DEBUG=yes to build debug

Message ID 1399409980-465-2-git-send-email-anders.roxell@linaro.org
State Superseded
Headers show

Commit Message

Anders Roxell May 6, 2014, 8:59 p.m. UTC
DEBUG=yes to add -O0 -g to EXTRA_CFLAGS

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 Makefile.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/Makefile.inc b/Makefile.inc
index a5aeb8b..6b292ce 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -18,8 +18,13 @@  RM     := rm -f
 COPY   := cp -r
 
 EXTRA_CFLAGS += -DODP_DEBUG=1
+
+ifeq ($(DEBUG),yes)
+EXTRA_CFLAGS += -O0 -g
+else
 EXTRA_CFLAGS += -O3
-#EXTRA_CFLAGS += -O0 -g
+endif
+
 EXTRA_CFLAGS += -pthread
 EXTRA_CFLAGS += -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
 EXTRA_CFLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith