makefile: add COVERAGE flag
This commit is contained in:
parent
e73c171e0d
commit
78264958c0
|
@ -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
|
||||
|
||||
# Don’t print command lines which are run
|
||||
.SILENT:
|
||||
|
||||
|
|
Loading…
Reference in New Issue