Makefile tweaks to allow building for code coverage analysis.

git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2001 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Russell Bryant 2010-09-16 21:24:40 +00:00
parent 384ae1e688
commit ae11fcd0e6

View File

@ -93,11 +93,11 @@ DYNAMIC_OBJS= \
rose_qsig_mwi.lo \
rose_qsig_name.lo \
version.lo
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) $(LIBPRI_OPT)
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
INSTALL_PREFIX=$(DESTDIR)
INSTALL_BASE=/usr
libdir?=$(INSTALL_BASE)/lib
SOFLAGS:=-Wl,-h$(DYNAMIC_LIBRARY)
SOFLAGS=-Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
LDCONFIG = /sbin/ldconfig
ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX))
LDCONFIG_FLAGS=-n
@ -125,9 +125,15 @@ PRIVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
ifeq ($(PROC),sparc64)
PROC=ultrasparc
LIBPRI_OPT = -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
else
ifneq ($(CODE_COVERAGE),)
LIBPRI_OPT=
COVERAGE_CFLAGS=-ftest-coverage -fprofile-arcs
COVERAGE_LDFLAGS=-ftest-coverage -fprofile-arcs
else
LIBPRI_OPT=-O2
endif
endif
ifeq ($(CPUARCH),i686)
CFLAGS += -m32