blob: c78a537a8c72280c2150558233fddf6d6fd8a119 [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
Patrick Venture9dc342a2019-03-18 08:43:36 -070029if AUTOCONF_CODE_COVERAGE_2019_01_06
30include $(top_srcdir)/aminclude_static.am
31clean-local: code-coverage-clean
32distclean-local: code-coverage-dist-clean
33else
34@CODE_COVERAGE_RULES@
35endif
36
Patrick Venture30993b32018-11-28 14:52:00 -080037ACLOCAL_AMFLAGS = -I m4
Patrick Venturec7ca2912018-11-02 11:38:33 -070038AM_DEFAULT_SOURCE_EXT = .cpp
39
Patrick Venturec8977382019-03-19 08:48:28 -070040noinst_LTLIBRARIES = libfirmwareblob_common.la
41libfirmwareblob_common_la_SOURCES = \
Patrick Venture7dad86f2019-05-17 08:52:20 -070042 util.cpp \
Patrick Venture6cb4dc72018-11-07 15:31:16 -080043 firmware_handler.cpp \
Patrick Venture09114c12018-11-16 20:55:54 -080044 file_handler.cpp \
Patrick Venture3ecb3502019-05-17 11:03:51 -070045 internal/sys.cpp \
Patrick Venture6d7735d2019-06-21 10:03:19 -070046 prepare_systemd.cpp \
Patrick Venture6f81b162019-05-20 14:02:59 -070047 verify_systemd.cpp \
48 update_systemd.cpp
Patrick Ventureac570a12019-05-08 08:53:16 -070049
50if ENABLE_LPC_BRIDGE
51libfirmwareblob_common_la_SOURCES += lpc_handler.cpp
52if ENABLE_ASPEED_LPC
53libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
54endif
55if ENABLE_NUVOTON_LPC
56libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
57endif
58endif
59
60if ENABLE_PCI_BRIDGE
61if ENABLE_ASPEED_P2A
62libfirmwareblob_common_la_SOURCES += pci_handler.cpp
63endif
64endif
65
Patrick Venturec8977382019-03-19 08:48:28 -070066libfirmwareblob_common_la_CXXFLAGS = \
67 $(SDBUSPLUS_CFLAGS) \
68 $(PHOSPHOR_LOGGING_CFLAGS) \
69 $(CODE_COVERAGE_CXXFLAGS) \
70 -flto
71libfirmwareblob_common_la_LDFLAGS = \
72 $(SDBUSPLUS_LIBS) \
73 $(PHOSPHOR_LOGGING_LIBS) \
74 $(CODE_COVERAGE_LIBS) \
75 -lstdc++fs
76
77libfirmwareblobdir = ${libdir}/ipmid-providers
78libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
79libfirmwareblob_la_SOURCES = main.cpp
80libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
Patrick Venture6cb4dc72018-11-07 15:31:16 -080081libfirmwareblob_la_LDFLAGS = \
Patrick Venture4eb55952018-11-16 15:36:24 -080082 $(SDBUSPLUS_LIBS) \
Patrick Venture6cb4dc72018-11-07 15:31:16 -080083 $(PHOSPHOR_LOGGING_LIBS) \
Patrick Venture2f3b4b62019-03-08 13:22:40 -080084 $(CODE_COVERAGE_LIBS) \
Patrick Venture4cbb5a22018-12-14 16:09:16 -080085 -lstdc++fs \
Patrick Venture6cb4dc72018-11-07 15:31:16 -080086 -version-info 0:0:0 -shared
87libfirmwareblob_la_CXXFLAGS = \
Patrick Venture4eb55952018-11-16 15:36:24 -080088 $(SDBUSPLUS_CFLAGS) \
Patrick Venture6cb4dc72018-11-07 15:31:16 -080089 $(PHOSPHOR_LOGGING_CFLAGS) \
Patrick Venture2f3b4b62019-03-08 13:22:40 -080090 $(CODE_COVERAGE_CXXFLAGS) \
Patrick Venture6cb4dc72018-11-07 15:31:16 -080091 -flto
Patrick Venture21be45a2018-11-06 12:08:52 -080092
Patrick Venturecf10cda2019-05-15 10:35:10 -070093SUBDIRS = . test
94
95if BUILD_HOST_TOOL
96SUBDIRS += tools
97endif
Patrick Venture9efef5d2019-06-19 08:45:44 -070098
99if BUILD_CLEANUP_DELETE
100SUBDIRS += cleanup
101endif