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:
parent
384ae1e688
commit
ae11fcd0e6
10
Makefile
10
Makefile
@ -93,11 +93,11 @@ DYNAMIC_OBJS= \
|
|||||||
rose_qsig_mwi.lo \
|
rose_qsig_mwi.lo \
|
||||||
rose_qsig_name.lo \
|
rose_qsig_name.lo \
|
||||||
version.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_PREFIX=$(DESTDIR)
|
||||||
INSTALL_BASE=/usr
|
INSTALL_BASE=/usr
|
||||||
libdir?=$(INSTALL_BASE)/lib
|
libdir?=$(INSTALL_BASE)/lib
|
||||||
SOFLAGS:=-Wl,-h$(DYNAMIC_LIBRARY)
|
SOFLAGS=-Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
|
||||||
LDCONFIG = /sbin/ldconfig
|
LDCONFIG = /sbin/ldconfig
|
||||||
ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX))
|
ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX))
|
||||||
LDCONFIG_FLAGS=-n
|
LDCONFIG_FLAGS=-n
|
||||||
@ -125,9 +125,15 @@ PRIVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
|
|||||||
ifeq ($(PROC),sparc64)
|
ifeq ($(PROC),sparc64)
|
||||||
PROC=ultrasparc
|
PROC=ultrasparc
|
||||||
LIBPRI_OPT = -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
|
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
|
else
|
||||||
LIBPRI_OPT=-O2
|
LIBPRI_OPT=-O2
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CPUARCH),i686)
|
ifeq ($(CPUARCH),i686)
|
||||||
CFLAGS += -m32
|
CFLAGS += -m32
|
||||||
|
Loading…
Reference in New Issue
Block a user