-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
32 lines (28 loc) · 866 Bytes
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SUBDIRS = doc src test
CTAGSFLAGS= -R src
test: check
if WITH_COVERAGE
COV_INFO_FILE = $(top_builddir)/coverage.info
COV_DIR = $(top_builddir)/coverage
cov:
@mkdir coverage || :
$(MAKE) $(AM_MAKEFLAGS) \
CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS) $(COVERAGE_OPTFLAGS)"
$(MAKE) $(AM_MAKEFLAGS) check \
CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS) $(COVERAGE_OPTFLAGS)"
@echo "Generating coverage report..."
$(LCOV) --capture \
--directory "$(top_builddir)/src" \
--output-file $(COV_INFO_FILE) \
--gcov-tool $(GCOV)
$(GENHTML) --prefix "$(top_builddir)" \
--output-directory $(COV_DIR) \
--title $(PACKAGE_NAME) \
--legend --show-details \
$(COV_INFO_FILE)
clean-local:
@echo "Cleaning lcov files."
@find $(top_builddir) -name "*.gcno" -exec rm -v {} \;
@find $(top_builddir) -name "*.gcda" -exec rm -v {} \;
@rm -rf $(top_builddir)/coverage*
endif