]> git.ipfire.org Git - thirdparty/strongswan.git/blame - Makefile.am
gitignore: Don't ignore proposal_keywords.c
[thirdparty/strongswan.git] / Makefile.am
CommitLineData
c75acc4c 1SUBDIRS = src man conf init testing
cf00cffe 2
157742be
TB
3if USE_FUZZING
4 SUBDIRS += fuzz
5endif
6
cf00cffe
TB
7if USE_SCRIPTS
8 SUBDIRS += scripts
9endif
10
d0f01a58
MW
11if USE_SILENT_RULES
12 AM_MAKEFLAGS = -s
13endif
14
c0e56a66 15ACLOCAL_AMFLAGS = -I m4/config
e455ae13 16
3fa8d773 17EXTRA_DIST = Doxyfile.in LICENSE Android.common.mk.in Android.common.mk Android.mk
dcb4651d 18CLEANFILES = Doxyfile
3fa8d773
TB
19BUILT_SOURCES = Android.common.mk
20MAINTAINERCLEANFILES = Android.common.mk
807c12ce 21
b188f231 22if USE_DEV_HEADERS
7300eb29
MW
23config_includedir = $(ipseclibdir)/include
24nodist_config_include_HEADERS = config.h
b188f231 25endif
7300eb29 26
d8d756e3
TB
27# we can't (and shouldn't) install/uninstall system files during make distcheck,
28# so override the autodetected path for systemd units
29AM_DISTCHECK_CONFIGURE_FLAGS = \
30 --with-systemdsystemunitdir='$$(prefix)/lib/systemd/system'
31
127f65db 32# we leave config files behind intentionally so prevent distcheck from complaining
9691e537 33distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print
127f65db 34
c577b5eb 35Android.common.mk : Android.common.mk.in configure.ac
0be946dc 36 $(AM_V_GEN) \
807c12ce
TB
37 sed \
38 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
39 $(srcdir)/$@.in > $@
b1e69188 40
2e522952
TB
41dist-hook:
42 @echo $(GIT_VERSION) > $(distdir)/.tarball-git-version
43
b1e69188 44Doxyfile : Doxyfile.in
0be946dc 45 $(AM_V_GEN) \
b1e69188
MW
46 sed \
47 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
48 -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
945fdeb9 49 -e "s:\@SRC_DIR\@:$(srcdir):g" \
ea7e89c7 50 $(srcdir)/$@.in > $@
b1e69188
MW
51
52apidoc : Doxyfile
882c993b 53 @test -d apidoc || doxygen
1f3dbb1b 54 @! find Doxyfile $(top_srcdir)/src/ \( -name '*.h' -o -name '*.md' \) -newer apidoc | \
882c993b 55 grep -q '' || doxygen && touch apidoc
dcb4651d 56
ab73ae67 57cov-reset-common:
1f14b4a1 58 @rm -rf $(top_builddir)/coverage
6122bfd2 59 @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcda" -delete
ab73ae67
TB
60
61if COVERAGE
62cov-reset: cov-reset-common
1f14b4a1
TB
63 @lcov --zerocounters --directory $(top_builddir)
64
65cov-report:
66 @mkdir $(top_builddir)/coverage
906a4fd1
TB
67 lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir) \
68 --rc lcov_branch_coverage=1
3bc8a4a5 69 lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' '*/suites/*' '/usr*' \
0d11d7b1 70 -o $(abs_top_builddir)/coverage/coverage.cleaned.info \
906a4fd1 71 --rc lcov_branch_coverage=1
b98551c7 72 genhtml --num-spaces 4 --legend --branch-coverage --ignore-errors source \
1f14b4a1
TB
73 -t "$(PACKAGE_STRING)" \
74 -o $(top_builddir)/coverage/html \
75 -p `readlink -m $(abs_top_srcdir)`/src \
ab73ae67 76 $(top_builddir)/coverage/coverage.cleaned.info
1f14b4a1
TB
77 @echo "Coverage Report at $(top_builddir)/coverage/html" >&2
78
79coverage:
80 @$(MAKE) cov-reset
81 @$(MAKE) check
82 @$(MAKE) cov-report
83else
1f14b4a1
TB
84coverage:
85 @echo "reconfigure with --enable-coverage"
86endif
87
ab73ae67 88clean-local: cov-reset-common
6122bfd2 89 @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcno" -delete
ab73ae67
TB
90 @rm -rf apidoc
91
882c993b 92.PHONY: cov-reset-common cov-reset cov-report coverage apidoc