makefile: add 'coverage' make target

This commit is contained in:
Steffen Jaeckel 2015-04-25 14:13:16 +02:00
parent 39e348b2e2
commit 036d697caa
2 changed files with 11 additions and 0 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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