Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
362e5025
Commit
362e5025
authored
Feb 08, 2012
by
Moritz Lipp
Browse files
Add gcov target for code coverage
parent
5c93ebcb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
362e5025
...
...
@@ -50,7 +50,7 @@ ${PROJECT}: ${OBJECTS}
clean
:
$(QUIET)
rm
-rf
${PROJECT}
${OBJECTS}
${PROJECT}
-
${VERSION}
.tar.gz
\
${DOBJECTS}
${PROJECT}
-debug
.depend
${PROJECT}
.pc doc
${DOBJECTS}
${PROJECT}
-debug
.depend
${PROJECT}
.pc doc
*
gcda
*
gcno
$(PROJECT)
.info gcov
$(QUIET)
make
-C
tests clean
${PROJECT}-debug
:
${DOBJECTS}
...
...
@@ -87,6 +87,12 @@ dist: clean
doc
:
clean
$(QUIET)
doxygen Doxyfile
gcov
:
clean
$(QUIET)
CFLAGS+
=
"-fprofile-arcs -ftest-coverage"
LDFLAGS+
=
"-fprofile-arcs"
$(MAKE)
$(PROJECT)
$(QUIET)
make
-C
tests
$(QUIET)
lcov
--directory
.
--capture
--output-file
$(PROJECT)
.info
$(QUIET)
genhtml
--output-directory
gcov
$(PROJECT)
.info
install
:
all ${PROJECT}.pc
$(ECHO)
installing executable file
$(QUIET)
mkdir
-p
${DESTDIR}${PREFIX}
/bin
...
...
tests/config.mk
View file @
362e5025
...
...
@@ -4,3 +4,6 @@ CHECK_INC ?= $(shell pkg-config --cflags check)
CHECK_LIB
?=
$(
shell
pkg-config
--libs
check
)
LIBS
+=
${CHECK_LIB}
CFLAGS
+=
-fprofile-arcs
-ftest-coverage
LDFLAGS
+=
-fprofile-arcs
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment