Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: f5875992906022e491d059bd5c20662b192ac4fd
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f587599…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
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 (for now): MEMDBG=1
---
Makefile.defs | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index eca85ad..de2cf24 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -146,6 +146,11 @@ PATCHLEVEL = 99
SUBLEVEL = 99
EXTRAVERSION = -pre3
+# memory debugger switcher
+# 0 - off (release mode)
+# 1 - on (devel mode)
+MEMDBG ?= 1
+
SER_VER = $(shell expr $(VERSION) \* 1000000 + $(PATCHLEVEL) \* 1000 + \
$(SUBLEVEL) )
RELEASE:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -613,15 +618,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 \
@@ -641,6 +643,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