From 036d697caa206224f3766c05d3e736cbca36f577 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 25 Apr 2015 14:13:16 +0200 Subject: [PATCH] makefile: add 'coverage' make target --- .gitignore | 2 ++ makefile | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 6bf2b63..aef5fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,12 @@ *.obj *.gcda *.gcno +*.gcov *.lib Debug/ Release/ .libs/ +.coveralls.yml # suppress output of build process and *nix/windows test executables ltmtest diff --git a/makefile b/makefile index cbccd97..1a485c8 100644 --- a/makefile +++ b/makefile @@ -66,6 +66,15 @@ $(LIBNAME): $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS) $(RANLIB) $@ + +#make the code coverage of the library +# +coverage: CFLAGS += -fprofile-arcs -ftest-coverage +coverage: LFLAGS += -lgcov + +coverage: test_standalone + ./test + #make a profiled library (takes a while!!!) # # This will build the library with profile generation