Module: sip-router
Branch: kamailio_3.0
Commit: 4800f80d38d34c7dc3e0216e142c286897a454a1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4800f80…
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 ...
- default in release mode: MEMDBG=0
---
Makefile.defs | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 02e40b8..9200c7f 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -151,6 +151,11 @@ PATCHLEVEL = 0
SUBLEVEL = 0
EXTRAVERSION =
+# 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)
@@ -618,15 +623,12 @@ C_DEFS= $(extra_defs) \
-DUSE_DNS_FAILOVER \
-DUSE_DST_BLACKLIST \
-DUSE_NAPTR \
- -DF_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 \
@@ -646,6 +648,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