blob: 706a6ccc3af8367f363dea0a83efbdef6c239178 [file] [log] [blame]
Patrick Venture69a68ed2019-03-06 10:37:30 -08001# Ignore system headers
2CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
3export CODE_COVERAGE_IGNORE_PATTERN
4
5CODE_COVERAGE_LCOV_SHOPTS = $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
6# Use our configuration file for lcov
7CODE_COVERAGE_LCOV_SHOPTS += --config-file $(abs_srcdir)/.lcovrc
8export CODE_COVERAGE_LCOV_SHOPTS
9
10CODE_COVERAGE_LCOV_OPTIONS = $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
11# Use our configuration file for lcov
12CODE_COVERAGE_LCOV_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
13export CODE_COVERAGE_LCOV_OPTIONS
14
15CODE_COVERAGE_LCOV_RMOPTS = $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
16# Use our configuration file for lcov
17CODE_COVERAGE_LCOV_RMOPTS += --config-file $(abs_srcdir)/.lcovrc
18export CODE_COVERAGE_LCOV_RMOPTS
19
20CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
21# Use our configuration file for genhtml
22CODE_COVERAGE_GENHTML_OPTIONS += --config-file $(abs_srcdir)/.lcovrc
23# Don't generate the absolute path for each file in the HTML output
24CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir)
25export CODE_COVERAGE_GENHTML_OPTIONS
26
27if AUTOCONF_CODE_COVERAGE_2019_01_06
28include $(top_srcdir)/aminclude_static.am
29clean-local: code-coverage-clean
30distclean-local: code-coverage-dist-clean
31else
32@CODE_COVERAGE_RULES@
33endif
34
Patrick Venture1f30ab22019-03-28 13:31:47 -070035bin_PROGRAMS = phosphor-hwmon-readd
Matthew Barth6292aee2016-10-06 10:15:48 -050036
37phosphor_hwmon_readd_SOURCES = readd.cpp
Patrick Venture69a68ed2019-03-06 10:37:30 -080038phosphor_hwmon_readd_LDADD = $(SDBUSPLUS_LIBS) $(CODE_COVERAGE_LIBS) libhwmon.la
39phosphor_hwmon_readd_CXXFLAGS = $(SDBUSPLUS_CFLAGS) $(CODE_COVERAGE_CXXFLAGS)
Matthew Barth6292aee2016-10-06 10:15:48 -050040
Brad Bishop4c9c4542016-12-05 15:07:51 -050041noinst_LTLIBRARIES = libhwmon.la
Brad Bishop0be1f8d2017-03-06 21:52:00 -050042libhwmon_la_LDFLAGS = -static
43libhwmon_la_LIBADD = \
Brad Bishop08379a32017-03-06 21:28:46 -050044 -lstdc++fs \
Brad Bishop4db64422017-02-16 11:33:32 -050045 $(SDBUSPLUS_LIBS) \
William A. Kennington III0fe4cb32018-10-18 19:19:58 -070046 $(SDEVENTPLUS_LIBS) \
Brad Bishop4db64422017-02-16 11:33:32 -050047 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Ventureb28f4322018-09-14 10:19:14 -070048 $(PHOSPHOR_LOGGING_LIBS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -080049 $(GPIOPLUS_LIBS) \
William A. Kennington III2227bd52019-06-19 11:32:22 -070050 $(STDPLUS_LIBS) \
Matt Spinler5e034af2020-06-24 15:21:53 -050051 $(CODE_COVERAGE_LIBS) \
52 $(FMT_LIBS)
Brad Bishop0be1f8d2017-03-06 21:52:00 -050053libhwmon_la_CXXFLAGS = \
54 $(SDBUSPLUS_CFLAGS) \
William A. Kennington III0fe4cb32018-10-18 19:19:58 -070055 $(SDEVENTPLUS_CFLAGS) \
Brad Bishop4db64422017-02-16 11:33:32 -050056 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Ventureb28f4322018-09-14 10:19:14 -070057 $(PHOSPHOR_LOGGING_CFLAGS) \
William A. Kennington III2227bd52019-06-19 11:32:22 -070058 $(STDPLUS_CFLAGS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -080059 $(CODE_COVERAGE_CXXFLAGS)
Brad Bishopbf86e722017-02-16 11:10:40 -050060
Brad Bishop4c9c4542016-12-05 15:07:51 -050061libhwmon_la_SOURCES = \
Brad Bishope55ef3d2016-12-19 09:12:40 -050062 sensorset.cpp \
Brad Bishop6ae03302016-12-19 13:37:43 -050063 mainloop.cpp \
Brad Bishop613a5b32017-01-05 20:58:13 -050064 sysfs.cpp \
Matthew Barth048ac872017-03-09 14:36:08 -060065 env.cpp \
Patrick Venture9331ab72018-01-29 09:48:47 -080066 fan_speed.cpp \
Deepak Kodihalli6aa24d42018-03-07 01:10:03 -060067 fan_pwm.cpp \
Patrick Venture75e56c62018-04-20 18:10:15 -070068 hwmon.cpp \
Matthew Barth35819382018-04-18 14:53:01 -050069 hwmonio.cpp \
Patrick Ventureb28f4322018-09-14 10:19:14 -070070 sensor.cpp \
Carol Wang9bbe6022019-08-01 17:31:30 +080071 gpio_handle.cpp \
72 average.cpp
Brad Bishope9ac8b42016-12-19 09:30:40 -050073
Patrick Venture609fe982018-04-17 17:51:56 -070074SUBDIRS = . msl test tools