]> git.ipfire.org Git - people/ms/strongswan.git/blob - Makefile.am
traffic-selector: Avoid out-of-bound array access when calculating range
[people/ms/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 can't (and shouldn't) install/uninstall system files during make distcheck,
28 # so override the autodetected path for systemd units
29 AM_DISTCHECK_CONFIGURE_FLAGS = \
30 --with-systemdsystemunitdir='$$(prefix)/lib/systemd/system'
31
32 # we leave config files behind intentionally so prevent distcheck from complaining
33 distuninstallcheck_listfiles = find . -type f \! -name '*.conf' \! -name '*.secrets' -print
34
35 Android.common.mk : Android.common.mk.in configure.ac
36 $(AM_V_GEN) \
37 sed \
38 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
39 $(srcdir)/$@.in > $@
40
41 dist-hook:
42 @echo $(GIT_VERSION) > $(distdir)/.tarball-git-version
43
44 Doxyfile : Doxyfile.in
45 $(AM_V_GEN) \
46 sed \
47 -e "s:\@PACKAGE_VERSION\@:$(PACKAGE_VERSION):" \
48 -e "s:\@PACKAGE_NAME\@:$(PACKAGE_NAME):" \
49 -e "s:\@SRC_DIR\@:$(srcdir):g" \
50 $(srcdir)/$@.in > $@
51
52 apidoc : Doxyfile
53 @test -d apidoc || doxygen
54 @! find Doxyfile $(top_srcdir)/src/ \( -name '*.h' -o -name '*.md' \) -newer apidoc | \
55 grep -q '' || doxygen && touch apidoc
56
57 cov-reset-common:
58 @rm -rf $(top_builddir)/coverage
59 @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcda" -delete
60
61 if COVERAGE
62 cov-reset: cov-reset-common
63 @lcov --zerocounters --directory $(top_builddir)
64
65 cov-report:
66 @mkdir $(top_builddir)/coverage
67 lcov -c -o $(top_builddir)/coverage/coverage.info -d $(top_builddir) \
68 --rc lcov_branch_coverage=1
69 lcov -r $(top_builddir)/coverage/coverage.info '*/tests/*' '*/suites/*' '/usr*' \
70 -o $(abs_top_builddir)/coverage/coverage.cleaned.info \
71 --rc lcov_branch_coverage=1
72 genhtml --num-spaces 4 --legend --branch-coverage --ignore-errors source \
73 -t "$(PACKAGE_STRING)" \
74 -o $(top_builddir)/coverage/html \
75 -p `readlink -m $(abs_top_srcdir)`/src \
76 $(top_builddir)/coverage/coverage.cleaned.info
77 @echo "Coverage Report at $(top_builddir)/coverage/html" >&2
78
79 coverage:
80 @$(MAKE) cov-reset
81 @$(MAKE) check
82 @$(MAKE) cov-report
83 else
84 coverage:
85 @echo "reconfigure with --enable-coverage"
86 endif
87
88 clean-local: cov-reset-common
89 @find $(top_builddir)/src $(top_builddir)/scripts -name "*.gcno" -delete
90 @rm -rf apidoc
91
92 .PHONY: cov-reset-common cov-reset cov-report coverage apidoc