From bebdb0fda152a29d8e336408d2eee31d06bce0d7 Mon Sep 17 00:00:00 2001 From: russell Date: Tue, 27 Jul 2010 21:16:05 +0000 Subject: Add --enable-coverage option to configure script. This option enables the proper compiler flags for tracking code coverage, which is useful along side automated testing. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279953 f38db490-d61c-443f-a65b-d21fe96a405b --- Makefile.rules | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index 03bc7e81a..45f7e4bb0 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -43,12 +43,17 @@ ifneq ($(findstring darwin,$(OSARCH)),) endif endif -ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) +ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no) _ASTCFLAGS+=$(OPTIMIZE) else _ASTCFLAGS+=-O0 endif +ifeq ($(AST_CODE_COVERAGE),yes) + _ASTCFLAGS+=-ftest-coverage -fprofile-arcs + _ASTLDFLAGS+=-ftest-coverage -fprofile-arcs +endif + ifeq ($(findstring $(CONFIG_CFLAGS),$(_ASTCFLAGS)),) _ASTCFLAGS+=$(CONFIG_CFLAGS) endif -- cgit v1.2.3