From: Michael Stapelberg Date: Sun, 8 May 2011 17:56:11 +0000 (+0200) Subject: makefile: add COVERAGE flag X-Git-Tag: tree-pr3~48 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=78264958c0451dd7e28743efed36733743ae761e;p=i3%2Fi3 makefile: add COVERAGE flag --- diff --git a/common.mk b/common.mk index 86585e59..fed147b8 100644 --- a/common.mk +++ b/common.mk @@ -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: