blob: b859f32e9bd2f86540cb21e3a97d6c07b5726e40 [file] [log] [blame]
Patrick Venturee6206562018-03-08 15:36:53 -08001AM_DEFAULT_SOURCE_EXT = .cpp
2
Patrick Venture94feffa2019-03-06 09:54:49 -08003# Ignore system headers
4CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
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 Venture90e9dbc2019-03-19 09:10:41 -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 Venture94feffa2019-03-06 09:54:49 -080037AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
38AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
39AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
40
Vijay Khemka55845432019-06-19 14:25:40 -070041if HAVE_SYSTEMD
42systemdsystemunit_DATA = phosphor-pid-control.service
43endif
44
Patrick Venturefe0b8962019-03-28 10:39:40 -070045bin_PROGRAMS = swampd setsensor
Patrick Venturee6206562018-03-08 15:36:53 -080046
Patrick Venturee6206562018-03-08 15:36:53 -080047setsensor_SOURCES = setsensor.cpp
Patrick Ventureba3c8c12018-11-09 08:43:00 -080048setsensor_LDADD = \
49 $(SDBUSPLUS_LIBS) \
50 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -080051 $(PHOSPHOR_LOGGING_LIBS) \
52 $(CODE_COVERAGE_LIBS)
Patrick Ventureba3c8c12018-11-09 08:43:00 -080053setsensor_CXXFLAGS = \
54 $(SDBUSPLUS_CFLAGS) \
55 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturef4274112019-03-06 13:37:46 -080056 $(PHOSPHOR_LOGGING_CFLAGS) \
57 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venturee6206562018-03-08 15:36:53 -080058
Patrick Venturecdd61342020-08-07 15:49:56 -070059swampd_SOURCES = main.cpp
Patrick Ventureba3c8c12018-11-09 08:43:00 -080060swampd_LDADD = \
61 $(SDBUSPLUS_LIBS) \
Patrick Ventureba3c8c12018-11-09 08:43:00 -080062 libswampd.la
63swampd_CXXFLAGS = \
64 $(SDBUSPLUS_CFLAGS) \
Patrick Venturef4274112019-03-06 13:37:46 -080065 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venturee6206562018-03-08 15:36:53 -080066
67noinst_LTLIBRARIES = libswampd.la
68libswampd_la_LDFLAGS = -static
69libswampd_la_LIBADD = \
70 -lstdc++fs \
Patrick Venturee6206562018-03-08 15:36:53 -080071 $(SDBUSPLUS_LIBS) \
72 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -080073 $(PHOSPHOR_LOGGING_LIBS) \
74 $(CODE_COVERAGE_LIBS)
Patrick Venturee6206562018-03-08 15:36:53 -080075libswampd_la_CXXFLAGS = \
76 $(SDBUSPLUS_CFLAGS) \
77 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturef0b7fa32018-11-09 08:40:32 -080078 $(PHOSPHOR_LOGGING_CFLAGS) \
Patrick Venture86a18202019-09-09 12:27:53 -070079 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venturee6206562018-03-08 15:36:53 -080080
81libswampd_la_SOURCES = \
82 notimpl/readonly.cpp \
83 notimpl/writeonly.cpp \
Patrick Venture7f9d6902020-09-10 12:09:57 -070084 dbus/dbusconfiguration.cpp \
Patrick Ventureaadb30d2020-08-10 09:17:11 -070085 dbus/dbusutil.cpp \
86 dbus/dbushelper.cpp \
James Feist98b704e2019-06-03 16:24:53 -070087 dbus/dbuspassiveredundancy.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -080088 dbus/dbuspassive.cpp \
89 dbus/dbusactiveread.cpp \
James Feist7136a5a2018-07-19 09:52:05 -070090 dbus/dbuswrite.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -080091 sysfs/sysfsread.cpp \
92 sysfs/sysfswrite.cpp \
93 sysfs/util.cpp \
94 sensors/pluggable.cpp \
95 sensors/host.cpp \
Patrick Venture5e929092018-06-08 10:55:23 -070096 sensors/builder.cpp \
Patrick Ventureeeeb8672019-02-08 11:47:42 -080097 sensors/buildjson.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -080098 sensors/manager.cpp \
Patrick Venturecdd61342020-08-07 15:49:56 -070099 sensors/build_utils.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -0800100 pid/ec/pid.cpp \
James Feist22c257a2018-08-31 14:07:12 -0700101 pid/ec/stepwise.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -0800102 pid/fancontroller.cpp \
103 pid/thermalcontroller.cpp \
James Feist22c257a2018-08-31 14:07:12 -0700104 pid/pidcontroller.cpp \
105 pid/stepwisecontroller.cpp \
Patrick Venture5c7cc542018-06-11 14:29:38 -0700106 pid/builder.cpp \
Patrick Ventured1491722019-02-08 14:37:45 -0800107 pid/buildjson.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -0800108 pid/zone.cpp \
109 pid/util.cpp \
James Feistce6a3f32019-03-12 11:20:16 -0700110 pid/pidloop.cpp \
Patrick Venturec32e3fc2019-02-28 10:01:11 -0800111 pid/tuning.cpp \
Patrick Venture5426c342019-02-11 12:03:30 -0800112 build/buildjson.cpp \
Patrick Venture18b13112019-02-14 11:43:59 -0800113 experiments/drive.cpp
Patrick Venturee6206562018-03-08 15:36:53 -0800114
Patrick Ventureba003432018-07-27 06:59:05 -0700115libmanualcmdsdir = ${libdir}/ipmid-providers
116libmanualcmds_LTLIBRARIES = libmanualcmds.la
117libmanualcmds_la_SOURCES = \
Patrick Venture9bf5cef2020-08-16 08:59:54 -0700118 ipmi/main_ipmi.cpp \
Patrick Ventured82d0b72020-08-16 09:17:37 -0700119 ipmi/manualcmds.cpp \
120 ipmi/dbus_mode.cpp
Patrick Ventureba3c8c12018-11-09 08:43:00 -0800121libmanualcmds_la_LDFLAGS = \
122 $(SYSTEMD_LIBS) \
123 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
124 $(PHOSPHOR_LOGGING_LIBS) \
William A. Kennington III331143c2019-02-07 15:52:44 -0800125 $(LIBIPMID_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -0800126 $(CODE_COVERAGE_LIBS) \
Patrick Ventureba3c8c12018-11-09 08:43:00 -0800127 -version-info 0:0:0 -shared
128libmanualcmds_la_CXXFLAGS = \
129 $(SYSTEMD_CFLAGS) \
130 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
131 $(PHOSPHOR_LOGGING_CFLAGS) \
William A. Kennington III331143c2019-02-07 15:52:44 -0800132 $(LIBIPMID_CFLAGS) \
Patrick Venture86a18202019-09-09 12:27:53 -0700133 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venturee6206562018-03-08 15:36:53 -0800134
Patrick Venture7a841b62018-06-13 09:39:46 -0700135SUBDIRS = . test