blob: db8a54ed2903c42b7195fb87a5f77f0ff5da897b [file] [log] [blame]
Patrick Venture2f3b4b62019-03-08 13:22:40 -08001# Ignore system headers
2CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
3# Ignore the real implementation sources for sys
4CODE_COVERAGE_IGNORE_PATTERN += '$(abs_builddir)/internal/sys.*'
5export CODE_COVERAGE_IGNORE_PATTERN
6
7CODE_COVERAGE_LCOV_SHOPTS = $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
8# Use our configuration file for lcov
9CODE_COVERAGE_LCOV_SHOPTS += --config-file $(abs_srcdir)/.lcovrc
10export CODE_COVERAGE_LCOV_SHOPTS
11
12CODE_COVERAGE_LCOV_OPTIONS = $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
13# Use our configuration file for lcov
14CODE_COVERAGE_LCOV_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
15export CODE_COVERAGE_LCOV_OPTIONS
16
17CODE_COVERAGE_LCOV_RMOPTS = $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
18# Use our configuration file for lcov
19CODE_COVERAGE_LCOV_RMOPTS += --config-file $(abs_srcdir)/.lcovrc
20export CODE_COVERAGE_LCOV_RMOPTS
21
22CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
23# Use our configuration file for genhtml
24CODE_COVERAGE_GENHTML_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
25# Don't generate the absolute path for each file in the HTML output
26CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir)
27export CODE_COVERAGE_GENHTML_OPTIONS
28
William A. Kennington III3fed2942020-12-22 12:55:08 -080029export AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
30export AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
31
32export LDADD = $(CODE_COVERAGE_LIBS)
33
Patrick Venture9dc342a2019-03-18 08:43:36 -070034if AUTOCONF_CODE_COVERAGE_2019_01_06
35include $(top_srcdir)/aminclude_static.am
36clean-local: code-coverage-clean
37distclean-local: code-coverage-dist-clean
38else
39@CODE_COVERAGE_RULES@
40endif
41
Patrick Venture30993b32018-11-28 14:52:00 -080042ACLOCAL_AMFLAGS = -I m4
Patrick Venture1ff1f932019-06-27 09:57:37 -070043AM_DEFAULT_SOURCE_EXT = .cpp
Patrick Venturec7ca2912018-11-02 11:38:33 -070044
Patrick Venture1ff1f932019-06-27 09:57:37 -070045noinst_LTLIBRARIES = libfirmware_common.la
46libfirmware_common_la_SOURCES = \
Patrick Venture1ff1f932019-06-27 09:57:37 -070047 internal/sys.cpp
48libfirmware_common_la_CXXFLAGS = \
49 $(CODE_COVERAGE_CXXFLAGS) \
50 -flto
51libfirmware_common_la_LDFLAGS = \
52 $(CODE_COVERAGE_LIBS)
53
54SUBDIRS = .
Patrick Venture0d3b8722019-06-27 07:04:06 -070055
56if BUILD_BMC_HANDLER
57SUBDIRS += bmc
Jason Lingded66d02020-10-23 14:13:03 -070058SUBDIRS += bmc/firmware-handler
Jason Ling85e54f12020-11-05 18:47:21 -080059SUBDIRS += bmc/version-handler
Patrick Venture0d3b8722019-06-27 07:04:06 -070060endif
Patrick Venturecf10cda2019-05-15 10:35:10 -070061
62if BUILD_HOST_TOOL
63SUBDIRS += tools
64endif
Patrick Venture9efef5d2019-06-19 08:45:44 -070065
66if BUILD_CLEANUP_DELETE
67SUBDIRS += cleanup
68endif