botan: Add helper function for signature verification
[strongswan.git] / Makefile.am
1 SUBDIRS = src man conf init testing
2
3 if USE_FUZZING
4   SUBDIRS += fuzz
5 endif
6
7 if USE_SCRIPTS
8   SUBDIRS += scripts
9 endif
10
11 if USE_SILENT_RULES
12   AM_MAKEFLAGS = -s
13 endif
14
15 ACLOCAL_AMFLAGS = -I m4/config
16
17 EXTRA_DIST = Doxyfile.in LICENSE Android.common.mk.in Android.common.mk Android.mk
18 CLEANFILES = Doxyfile
19 BUILT_SOURCES = Android.common.mk
20 MAINTAINERCLEANFILES = Android.common.mk
21
22 if USE_DEV_HEADERS
23 config_includedir = $(ipseclibdir)/include
24 nodist_config_include_HEADERS = config.h
25 endif
26
27 # we leave config files behind intentionally so prevent distcheck from complaining
28 distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print
29
30 Android.common.mk :     Android.common.mk.in configure.ac
31                 $(AM_V_GEN) \
32                 sed \
33                 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
34                 $(srcdir)/$@.in > $@
35
36 Doxyfile :      Doxyfile.in
37                 $(AM_V_GEN) \
38                 sed \
39                 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
40                 -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
41                 -e "s:\@SRC_DIR\@:$(srcdir):g" \
42                 $(srcdir)/$@.in > $@
43
44 apidoc :        Doxyfile
45                 @test -d apidoc || doxygen
46                 @! find Doxyfile $(top_srcdir)/src/ \( -name '*.h' -o -name '*.md' \) -newer apidoc | \
47                         grep -q '' || doxygen && touch apidoc
48
49 cov-reset-common:
50                 @rm -rf $(top_builddir)/coverage
51                 @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcda" -delete
52
53 if COVERAGE
54 cov-reset: cov-reset-common
55                 @lcov --zerocounters --directory $(top_builddir)
56
57 cov-report:
58                 @mkdir $(top_builddir)/coverage
59                 lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir) \
60                          --rc lcov_branch_coverage=1
61                 lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' '*/suites/*' '/usr*' \
62                          -o $(abs_top_builddir)/coverage/coverage.cleaned.info \
63                          --rc lcov_branch_coverage=1
64                 genhtml --num-spaces 4 --legend --branch-coverage --ignore-errors source \
65                                 -t "$(PACKAGE_STRING)" \
66                                 -o $(top_builddir)/coverage/html \
67                                 -p `readlink -m $(abs_top_srcdir)`/src \
68                                 $(top_builddir)/coverage/coverage.cleaned.info
69                 @echo "Coverage Report at $(top_builddir)/coverage/html" >&2
70
71 coverage:
72                 @$(MAKE) cov-reset
73                 @$(MAKE) check
74                 @$(MAKE) cov-report
75 else
76 coverage:
77                 @echo "reconfigure with --enable-coverage"
78 endif
79
80 clean-local: cov-reset-common
81                 @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcno" -delete
82                 @rm -rf apidoc
83
84 .PHONY: cov-reset-common cov-reset cov-report coverage apidoc