diff mbox

[PATCHv3,2/2] Makefile.inc: ODP_DEBUG_PRINT=no to disable the ODP_DBG macro

Message ID 1399583309-17552-3-git-send-email-anders.roxell@linaro.org
State Accepted
Headers show

Commit Message

Anders Roxell May 8, 2014, 9:08 p.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 Makefile.inc        | 6 +++++-
 include/odp_debug.h | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/Makefile.inc b/Makefile.inc
index 6b292ce..2fa3d97 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -17,7 +17,11 @@  RMDIR  := rm -rf
 RM     := rm -f
 COPY   := cp -r
 
-EXTRA_CFLAGS += -DODP_DEBUG=1
+ifeq ($(ODP_DEBUG_PRINT),no)
+EXTRA_CFLAGS += -DODP_DEBUG_PRINT=0
+else
+EXTRA_CFLAGS += -DODP_DEBUG_PRINT=1
+endif
 
 ifeq ($(DEBUG),yes)
 EXTRA_CFLAGS += -O0 -g
diff --git a/include/odp_debug.h b/include/odp_debug.h
index e35c1ac..166716d 100644
--- a/include/odp_debug.h
+++ b/include/odp_debug.h
@@ -52,7 +52,9 @@  extern "C" {
  * Debug printing macro, which prints output when DEBUG flag is set.
  */
 #define ODP_DBG(fmt, ...) \
-		do { if (ODP_DEBUG == 1) printf(fmt, ##__VA_ARGS__); } while (0)
+		do { if (ODP_DEBUG_PRINT == 1) \
+			printf(fmt, ##__VA_ARGS__); \
+		} while (0)
 
 /**
  * Print output to stderr (file, line and function).