Patrick Venture | 2f3b4b6 | 2019-03-08 13:22:40 -0800 | [diff] [blame] | 1 | # Ignore system headers |
| 2 | CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*' |
| 3 | # Ignore the real implementation sources for sys |
| 4 | CODE_COVERAGE_IGNORE_PATTERN += '$(abs_builddir)/internal/sys.*' |
| 5 | export CODE_COVERAGE_IGNORE_PATTERN |
| 6 | |
| 7 | CODE_COVERAGE_LCOV_SHOPTS = $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) |
| 8 | # Use our configuration file for lcov |
| 9 | CODE_COVERAGE_LCOV_SHOPTS += --config-file $(abs_srcdir)/.lcovrc |
| 10 | export CODE_COVERAGE_LCOV_SHOPTS |
| 11 | |
| 12 | CODE_COVERAGE_LCOV_OPTIONS = $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) |
| 13 | # Use our configuration file for lcov |
| 14 | CODE_COVERAGE_LCOV_OPTIONS += --config-file $(abs_srcdir)/.lcovrc |
| 15 | export CODE_COVERAGE_LCOV_OPTIONS |
| 16 | |
| 17 | CODE_COVERAGE_LCOV_RMOPTS = $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) |
| 18 | # Use our configuration file for lcov |
| 19 | CODE_COVERAGE_LCOV_RMOPTS += --config-file $(abs_srcdir)/.lcovrc |
| 20 | export CODE_COVERAGE_LCOV_RMOPTS |
| 21 | |
| 22 | CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) |
| 23 | # Use our configuration file for genhtml |
| 24 | CODE_COVERAGE_GENHTML_OPTIONS += --config-file $(abs_srcdir)/.lcovrc |
| 25 | # Don't generate the absolute path for each file in the HTML output |
| 26 | CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir) |
| 27 | export CODE_COVERAGE_GENHTML_OPTIONS |
| 28 | |
Patrick Venture | 9dc342a | 2019-03-18 08:43:36 -0700 | [diff] [blame] | 29 | if AUTOCONF_CODE_COVERAGE_2019_01_06 |
| 30 | include $(top_srcdir)/aminclude_static.am |
| 31 | clean-local: code-coverage-clean |
| 32 | distclean-local: code-coverage-dist-clean |
| 33 | else |
| 34 | @CODE_COVERAGE_RULES@ |
| 35 | endif |
| 36 | |
Patrick Venture | 30993b3 | 2018-11-28 14:52:00 -0800 | [diff] [blame] | 37 | ACLOCAL_AMFLAGS = -I m4 |
Patrick Venture | c7ca291 | 2018-11-02 11:38:33 -0700 | [diff] [blame] | 38 | AM_DEFAULT_SOURCE_EXT = .cpp |
| 39 | |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 40 | noinst_LTLIBRARIES = libfirmwareblob_common.la |
| 41 | libfirmwareblob_common_la_SOURCES = \ |
Patrick Venture | 6cb4dc7 | 2018-11-07 15:31:16 -0800 | [diff] [blame] | 42 | firmware_handler.cpp \ |
Patrick Venture | 09114c1 | 2018-11-16 20:55:54 -0800 | [diff] [blame] | 43 | file_handler.cpp \ |
Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 44 | internal/sys.cpp |
Patrick Venture | ac570a1 | 2019-05-08 08:53:16 -0700 | [diff] [blame] | 45 | |
| 46 | if ENABLE_LPC_BRIDGE |
| 47 | libfirmwareblob_common_la_SOURCES += lpc_handler.cpp |
| 48 | if ENABLE_ASPEED_LPC |
| 49 | libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp |
| 50 | endif |
| 51 | if ENABLE_NUVOTON_LPC |
| 52 | libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp |
| 53 | endif |
| 54 | endif |
| 55 | |
| 56 | if ENABLE_PCI_BRIDGE |
| 57 | if ENABLE_ASPEED_P2A |
| 58 | libfirmwareblob_common_la_SOURCES += pci_handler.cpp |
| 59 | endif |
| 60 | endif |
| 61 | |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 62 | libfirmwareblob_common_la_CXXFLAGS = \ |
| 63 | $(SDBUSPLUS_CFLAGS) \ |
| 64 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 65 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 66 | -flto |
| 67 | libfirmwareblob_common_la_LDFLAGS = \ |
| 68 | $(SDBUSPLUS_LIBS) \ |
| 69 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 70 | $(CODE_COVERAGE_LIBS) \ |
| 71 | -lstdc++fs |
| 72 | |
| 73 | libfirmwareblobdir = ${libdir}/ipmid-providers |
| 74 | libfirmwareblob_LTLIBRARIES = libfirmwareblob.la |
| 75 | libfirmwareblob_la_SOURCES = main.cpp |
| 76 | libfirmwareblob_la_LIBADD = libfirmwareblob_common.la |
Patrick Venture | 6cb4dc7 | 2018-11-07 15:31:16 -0800 | [diff] [blame] | 77 | libfirmwareblob_la_LDFLAGS = \ |
Patrick Venture | 4eb5595 | 2018-11-16 15:36:24 -0800 | [diff] [blame] | 78 | $(SDBUSPLUS_LIBS) \ |
Patrick Venture | 6cb4dc7 | 2018-11-07 15:31:16 -0800 | [diff] [blame] | 79 | $(PHOSPHOR_LOGGING_LIBS) \ |
Patrick Venture | 2f3b4b6 | 2019-03-08 13:22:40 -0800 | [diff] [blame] | 80 | $(CODE_COVERAGE_LIBS) \ |
Patrick Venture | 4cbb5a2 | 2018-12-14 16:09:16 -0800 | [diff] [blame] | 81 | -lstdc++fs \ |
Patrick Venture | 6cb4dc7 | 2018-11-07 15:31:16 -0800 | [diff] [blame] | 82 | -version-info 0:0:0 -shared |
| 83 | libfirmwareblob_la_CXXFLAGS = \ |
Patrick Venture | 4eb5595 | 2018-11-16 15:36:24 -0800 | [diff] [blame] | 84 | $(SDBUSPLUS_CFLAGS) \ |
Patrick Venture | 6cb4dc7 | 2018-11-07 15:31:16 -0800 | [diff] [blame] | 85 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
Patrick Venture | 2f3b4b6 | 2019-03-08 13:22:40 -0800 | [diff] [blame] | 86 | $(CODE_COVERAGE_CXXFLAGS) \ |
Patrick Venture | 6cb4dc7 | 2018-11-07 15:31:16 -0800 | [diff] [blame] | 87 | -flto |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 88 | |
Patrick Venture | bf58cd6 | 2018-12-11 09:05:46 -0800 | [diff] [blame] | 89 | SUBDIRS = . test tools |