blob: 9583fac76894bff615126267cf40309957425e12 [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
Patrick Venturee6206562018-03-08 15:36:53 -080041sbin_PROGRAMS = swampd setsensor
42
Patrick Venturee6206562018-03-08 15:36:53 -080043setsensor_SOURCES = setsensor.cpp
Patrick Ventureba3c8c12018-11-09 08:43:00 -080044setsensor_LDADD = \
45 $(SDBUSPLUS_LIBS) \
46 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -080047 $(PHOSPHOR_LOGGING_LIBS) \
48 $(CODE_COVERAGE_LIBS)
Patrick Ventureba3c8c12018-11-09 08:43:00 -080049setsensor_CXXFLAGS = \
50 $(SDBUSPLUS_CFLAGS) \
51 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturef4274112019-03-06 13:37:46 -080052 $(PHOSPHOR_LOGGING_CFLAGS) \
53 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venturee6206562018-03-08 15:36:53 -080054
55swampd_SOURCES = main.cpp util.cpp
Patrick Ventureba3c8c12018-11-09 08:43:00 -080056swampd_LDADD = \
57 $(SDBUSPLUS_LIBS) \
58 $(PTHREAD_LIBS) \
59 libswampd.la
60swampd_CXXFLAGS = \
61 $(SDBUSPLUS_CFLAGS) \
Patrick Venturef4274112019-03-06 13:37:46 -080062 $(PTHREAD_CFLAGS) \
63 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venturee6206562018-03-08 15:36:53 -080064
65noinst_LTLIBRARIES = libswampd.la
66libswampd_la_LDFLAGS = -static
67libswampd_la_LIBADD = \
68 -lstdc++fs \
Patrick Venturee6206562018-03-08 15:36:53 -080069 $(SDBUSPLUS_LIBS) \
70 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -080071 $(PHOSPHOR_LOGGING_LIBS) \
72 $(CODE_COVERAGE_LIBS)
Patrick Venturee6206562018-03-08 15:36:53 -080073libswampd_la_CXXFLAGS = \
74 $(SDBUSPLUS_CFLAGS) \
75 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venturef0b7fa32018-11-09 08:40:32 -080076 $(PHOSPHOR_LOGGING_CFLAGS) \
Patrick Venturef4274112019-03-06 13:37:46 -080077 $(CODE_COVERAGE_CXXFLAGS) \
Patrick Venturef0b7fa32018-11-09 08:40:32 -080078 -flto
Patrick Venturee6206562018-03-08 15:36:53 -080079
80libswampd_la_SOURCES = \
81 notimpl/readonly.cpp \
82 notimpl/writeonly.cpp \
83 dbus/util.cpp \
84 dbus/dbuspassive.cpp \
85 dbus/dbusactiveread.cpp \
James Feist7136a5a2018-07-19 09:52:05 -070086 dbus/dbuswrite.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -080087 sysfs/sysfsread.cpp \
88 sysfs/sysfswrite.cpp \
89 sysfs/util.cpp \
90 sensors/pluggable.cpp \
91 sensors/host.cpp \
Patrick Venture5e929092018-06-08 10:55:23 -070092 sensors/builder.cpp \
Patrick Ventureeeeb8672019-02-08 11:47:42 -080093 sensors/buildjson.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -080094 sensors/manager.cpp \
95 pid/ec/pid.cpp \
James Feist22c257a2018-08-31 14:07:12 -070096 pid/ec/stepwise.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -080097 pid/fancontroller.cpp \
98 pid/thermalcontroller.cpp \
James Feist22c257a2018-08-31 14:07:12 -070099 pid/pidcontroller.cpp \
100 pid/stepwisecontroller.cpp \
Patrick Venture5c7cc542018-06-11 14:29:38 -0700101 pid/builder.cpp \
Patrick Ventured1491722019-02-08 14:37:45 -0800102 pid/buildjson.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -0800103 pid/zone.cpp \
104 pid/util.cpp \
105 pid/pidthread.cpp \
Patrick Venturec32e3fc2019-02-28 10:01:11 -0800106 pid/tuning.cpp \
Patrick Venturee6206562018-03-08 15:36:53 -0800107 threads/busthread.cpp \
Patrick Venture5426c342019-02-11 12:03:30 -0800108 build/buildjson.cpp \
Patrick Venture18b13112019-02-14 11:43:59 -0800109 experiments/drive.cpp
Patrick Venturee6206562018-03-08 15:36:53 -0800110
Patrick Venture9f044412018-09-20 19:49:55 -0700111if CONFIGURE_DBUS
112libswampd_la_SOURCES += dbus/dbusconfiguration.cpp
113endif
114
Patrick Ventureba003432018-07-27 06:59:05 -0700115libmanualcmdsdir = ${libdir}/ipmid-providers
116libmanualcmds_LTLIBRARIES = libmanualcmds.la
117libmanualcmds_la_SOURCES = \
118 ipmi/manualcmds.cpp
Patrick Ventureba3c8c12018-11-09 08:43:00 -0800119libmanualcmds_la_LDFLAGS = \
120 $(SYSTEMD_LIBS) \
121 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
122 $(PHOSPHOR_LOGGING_LIBS) \
William A. Kennington III331143c2019-02-07 15:52:44 -0800123 $(LIBIPMID_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -0800124 $(CODE_COVERAGE_LIBS) \
Patrick Ventureba3c8c12018-11-09 08:43:00 -0800125 -version-info 0:0:0 -shared
126libmanualcmds_la_CXXFLAGS = \
127 $(SYSTEMD_CFLAGS) \
128 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
129 $(PHOSPHOR_LOGGING_CFLAGS) \
William A. Kennington III331143c2019-02-07 15:52:44 -0800130 $(LIBIPMID_CFLAGS) \
Patrick Venturef4274112019-03-06 13:37:46 -0800131 $(CODE_COVERAGE_CXXFLAGS) \
Patrick Ventureba3c8c12018-11-09 08:43:00 -0800132 -flto
Patrick Venturee6206562018-03-08 15:36:53 -0800133
Patrick Venture7a841b62018-06-13 09:39:46 -0700134SUBDIRS = . test