Makefile.am 2.5 KB

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