diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-27 21:16:05 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-27 21:16:05 +0000 |
commit | bebdb0fda152a29d8e336408d2eee31d06bce0d7 (patch) | |
tree | 2f45bd7a37f60dff2947af5cbf3447c4e02e73c1 /Makefile.rules | |
parent | 371b257de0045a90119b5775a3c716b6bbab9f82 (diff) |
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
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 7 |
1 files changed, 6 insertions, 1 deletions
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 |