makefile: add COVERAGE flag
This commit is contained in:
parent
e73c171e0d
commit
78264958c0
|
@ -1,5 +1,6 @@
|
||||||
UNAME=$(shell uname)
|
UNAME=$(shell uname)
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
|
COVERAGE=0
|
||||||
INSTALL=install
|
INSTALL=install
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
ifeq ($(PREFIX),/usr)
|
ifeq ($(PREFIX),/usr)
|
||||||
|
@ -97,6 +98,11 @@ CFLAGS += -O2
|
||||||
CFLAGS += -freorder-blocks-and-partition
|
CFLAGS += -freorder-blocks-and-partition
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(COVERAGE),1)
|
||||||
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||||
|
LDFLAGS += -lgcov
|
||||||
|
endif
|
||||||
|
|
||||||
# Don’t print command lines which are run
|
# Don’t print command lines which are run
|
||||||
.SILENT:
|
.SILENT:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue