makefile: add COVERAGE flag

This commit is contained in:
Michael Stapelberg 2011-05-08 19:56:11 +02:00
parent e73c171e0d
commit 78264958c0
1 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
UNAME=$(shell uname)
DEBUG=1
COVERAGE=0
INSTALL=install
PREFIX=/usr
ifeq ($(PREFIX),/usr)
@ -97,6 +98,11 @@ CFLAGS += -O2
CFLAGS += -freorder-blocks-and-partition
endif
ifeq ($(COVERAGE),1)
CFLAGS += -fprofile-arcs -ftest-coverage
LDFLAGS += -lgcov
endif
# Dont print command lines which are run
.SILENT: