Module: sip-router
Branch: master
Commit: 2c168f02b89cf4f97c5b95b8b3e8410b2f825a51
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2c168f0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Feb 8 23:16:47 2010 +0100
Makefile: MEMDBG var to control mem debugging mode
- to compile with memory debugging
make MEMDBG=1 cfg; make ...
---
Makefile.defs | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 556883e..304d706 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -152,6 +152,11 @@ PATCHLEVEL = 0
SUBLEVEL = 99
EXTRAVERSION = -dev1
+# memory debugger switcher
+# 0 - off (release mode)
+# 1 - on (devel mode)
+MEMDBG ?= 0
+
SER_VER = $(shell expr $(VERSION) \* 1000000 + $(PATCHLEVEL) \* 1000 + \
$(SUBLEVEL) )
RELEASE:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -619,15 +624,12 @@ C_DEFS= $(extra_defs) \
-DUSE_DNS_FAILOVER \
-DUSE_DST_BLACKLIST \
-DUSE_NAPTR \
- -DDBG_QM_MALLOC \
#-DUSE_DNS_CACHE_STATS \
#-DUSE_DST_BLACKLIST_STATS \
#-DDNS_WATCHDOG_SUPPORT \
#-DLL_MALLOC \
#-DSF_MALLOC \
#-DDL_MALLOC \
- #-DF_MALLOC \
- #-DDBG_QM_MALLOC \
#-DDBG_F_MALLOC \
#-DNO_DEBUG \
#-DEXTRA_DEBUG \
@@ -647,6 +649,11 @@ C_DEFS= $(extra_defs) \
# use make mode=debug all instead. Anyway no by default ser is compiled w/
# debugging symbols in all cases (-g). --andrei
+ifeq ($(MEMDBG), 1)
+ C_DEFS+= -DDBG_QM_MALLOC
+else
+ C_DEFS+= -DF_MALLOC
+endif
ifeq ($(CORE_TLS), 1)
C_DEFS+= -DUSE_TLS -DCORE_TLS
endif