aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2017-07-19 22:31:48 +0200
committerJ08nY2017-07-19 22:31:48 +0200
commit33228408435a112bb0f0232a2001689beb431b77 (patch)
treea6d5d61462d085cdb644bd35d57b91b62fc6d63b
parentef80820cf9f4cf8b45a2895029599ebb36df5806 (diff)
downloadecgen-33228408435a112bb0f0232a2001689beb431b77.tar.gz
ecgen-33228408435a112bb0f0232a2001689beb431b77.tar.zst
ecgen-33228408435a112bb0f0232a2001689beb431b77.zip
Enable building with GCC test options for gcov.
-rw-r--r--src/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 7d0c83f..0fc33d8 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -14,6 +14,9 @@ ifeq ($(DEBUG), 1)
else
CFLAGS += -DNDEBUG -O3
endif
+ifeq ($(TEST), 1)
+ CFLAGS += -fprofile-arcs -ftest-coverage
+endif
LDFLAGS = -L../lib/parson -L../lib/sha1 -L../lib/pari
INCLUDES = -I. -I../lib
@@ -53,6 +56,9 @@ clean-all: clean
clean:
find . -type f -name '*.o' -exec rm {} +
+ find . -type f -name '*.gcda' -exec rm {} +
+ find . -type f -name '*.gcno' -exec rm {} +
+ find . -type f -name '*.gcov' -exec rm {} +
format:
clang-format -i $(SRC)