瀏覽代碼

Makefile.defs: moved init of vars before FLAVOUR updates

- some vars might depend on type of FLAVOUR installed
- kamailio flavour compiles shm stats by default
Daniel-Constantin Mierla 15 年之前
父節點
當前提交
821640817c
共有 1 個文件被更改,包括 17 次插入8 次删除
  1. 17 8
      Makefile.defs

+ 17 - 8
Makefile.defs

@@ -115,6 +115,14 @@ endif # verbose
 # flavour: sip-router, ser or kamailio
 FLAVOUR?=sip-router
 
+#prefix for various configs and scripts
+#config name/name-prefix for distributed configs
+CFG_NAME=sip-router
+#config name/name-prefix for distributed scripts
+SCR_NAME=sip-router
+#name in source tree
+SRC_NAME=sip-router
+
 ifeq ($(FLAVOUR),sip-router)
 # main binary name
 MAIN_NAME=ser
@@ -124,19 +132,17 @@ MAIN_NAME=ser
 else ifeq ($(FLAVOUR),kamailio)
 # main binary name
 MAIN_NAME=kamailio
+# use kamailio config
+CFG_NAME=kamailio
+# kamailio statistics on
+KMSTATS ?= 1
+# fast malloc statistics on
+FMSTATS ?= 1
 else # default:
 # main binary name
 MAIN_NAME=sip-router
 endif
 
-#prefix for various configs and scripts
-#config name/name-prefix for distributed configs
-CFG_NAME=sip-router
-#config name/name-prefix for distributed scripts
-SCR_NAME=sip-router
-#name in source tree
-SRC_NAME=sip-router
-
 # what to install
 INSTALL_FLAVOUR=$(FLAVOUR)
 
@@ -650,6 +656,9 @@ endif
 ifeq ($(KMSTATS), 1)
 	C_DEFS+= -DSTATISTICS
 endif
+ifeq ($(FMSTATS), 1)
+	C_DEFS+= -DMALLOC_STATS
+endif
 
 ifneq ($(STUN),)
 	C_DEFS+= -DUSE_STUN