summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile8
2 files changed, 9 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 7a60b0c..3356bfa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
*.o
*.d
+*.gcda
+*.gcno
/bfs
/tests/mksock
/tests/trie
diff --git a/Makefile b/Makefile
index 4e67cf6..70a78ef 100644
--- a/Makefile
+++ b/Makefile
@@ -86,6 +86,10 @@ ifdef SANITIZE
LOCAL_CFLAGS += -fno-sanitize-recover=all
endif
+ifneq ($(filter gcov,$(MAKECMDGOALS)),)
+LOCAL_CFLAGS += --coverage
+endif
+
ifneq ($(filter release,$(MAKECMDGOALS)),)
CFLAGS := -g $(WFLAGS) -O3 -flto -DNDEBUG
endif
@@ -130,6 +134,8 @@ ubsan: bfs
@:
msan: bfs
@:
+gcov: bfs
+ @:
release: bfs
@:
@@ -166,7 +172,7 @@ endif
+$(MAKE) -B check $(DISTCHECK_FLAGS)
clean:
- $(RM) bfs *.[od] tests/mksock tests/trie tests/xtimegm tests/*.[od]
+ $(RM) bfs *.[od] *.gcda *.gcno tests/mksock tests/trie tests/xtimegm tests/*.[od] tests/*.gcda tests/*.gcno
install:
$(MKDIR) $(DESTDIR)$(PREFIX)/bin