diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-11-10 12:46:14 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-11-10 12:46:14 -0500 |
commit | 44b8d752a133df7abfa5b17dde78e3f5c5450022 (patch) | |
tree | 689acbce0ee0198e73848d934c2c4a0d2620bdbb | |
parent | 7c79c741bf8ef87d269c470867cfa77637be8b8f (diff) | |
download | bfs-44b8d752a133df7abfa5b17dde78e3f5c5450022.tar.xz |
Makefile: New gcov target
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,7 @@ *.o *.d +*.gcda +*.gcno /bfs /tests/mksock /tests/trie @@ -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 |