blob: 59adc1d56e592867abac35e09e9c4013ce700be1 [file] [log] [blame]
Patrick Venture4d49ae62018-09-17 11:35:32 -07001AM_DEFAULT_SOURCE_EXT = .cpp
2
Patrick Venturef9a19b82018-09-18 10:03:24 -07003if HAVE_SYSTEMD
4systemdsystemunit_DATA = \
5 gbmc-psu-hardreset.target
6endif
7
Patrick Venture6667a642019-03-13 16:39:30 -07008# Ignore system headers
9CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
10export CODE_COVERAGE_IGNORE_PATTERN
11
12CODE_COVERAGE_LCOV_SHOPTS = $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
13# Use our configuration file for lcov
14CODE_COVERAGE_LCOV_SHOPTS += --config-file $(abs_srcdir)/.lcovrc
15export CODE_COVERAGE_LCOV_SHOPTS
16
17CODE_COVERAGE_LCOV_OPTIONS = $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
18# Use our configuration file for lcov
19CODE_COVERAGE_LCOV_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
20export CODE_COVERAGE_LCOV_OPTIONS
21
22CODE_COVERAGE_LCOV_RMOPTS = $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
23# Use our configuration file for lcov
24CODE_COVERAGE_LCOV_RMOPTS += --config-file $(abs_srcdir)/.lcovrc
25export CODE_COVERAGE_LCOV_RMOPTS
26
27CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
28# Use our configuration file for genhtml
29CODE_COVERAGE_GENHTML_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
30# Don't generate the absolute path for each file in the HTML output
31CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir)
32export CODE_COVERAGE_GENHTML_OPTIONS
33
34if 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
William A. Kennington III6eb29402019-03-14 11:03:55 -070042noinst_LTLIBRARIES = libsyscmds_common.la
Patrick Venture92b507d2019-03-15 10:08:28 -070043libsyscmds_common_la_SOURCES = \
44 cable.cpp \
45 cpld.cpp \
46 eth.cpp \
47 psu.cpp \
48 pcie_i2c.cpp \
49 entity_name.cpp \
Patrick Ventureab650002019-03-16 09:08:47 -070050 handler.cpp \
51 util.cpp
William A. Kennington III6eb29402019-03-14 11:03:55 -070052libsyscmds_common_la_CXXFLAGS = \
53 $(SDBUSPLUS_CFLAGS) \
Patrick Venture6667a642019-03-13 16:39:30 -070054 $(PHOSPHOR_LOGGING_CFLAGS) \
55 $(CODE_COVERAGE_CXXFLAGS)
William A. Kennington III6eb29402019-03-14 11:03:55 -070056libsyscmds_common_la_LDFLAGS = \
Patrick Venturea313c402018-11-09 08:25:06 -080057 $(SDBUSPLUS_LIBS) \
58 $(PHOSPHOR_LOGGING_LIBS) \
Patrick Venture6667a642019-03-13 16:39:30 -070059 $(CODE_COVERAGE_LIBS) \
William A. Kennington III6eb29402019-03-14 11:03:55 -070060 -lstdc++fs
61
62libsyscmdsdir = ${libdir}/ipmid-providers
63libsyscmds_LTLIBRARIES = libsyscmds.la
64libsyscmds_la_SOURCES = main.cpp
65libsyscmds_la_LIBADD = libsyscmds_common.la
66libsyscmds_la_LDFLAGS = \
William A. Kennington III2c9e1622019-02-07 15:45:19 -080067 $(LIBIPMID_LIBS) \
Patrick Venturea313c402018-11-09 08:25:06 -080068 -version-info 0:0:0 -shared
Patrick Venture4d49ae62018-09-17 11:35:32 -070069
Patrick Venturea313c402018-11-09 08:25:06 -080070libsyscmds_la_CXXFLAGS = \
William A. Kennington III2c9e1622019-02-07 15:45:19 -080071 $(LIBIPMID_CFLAGS) \
Patrick Venture6667a642019-03-13 16:39:30 -070072 $(CODE_COVERAGE_CXXFLAGS) \
Patrick Ventureff40f272018-11-09 08:38:23 -080073 -flto
Patrick Venture848b9382019-03-13 15:48:23 -070074
75SUBDIRS = . test