blob: fc8f1bbae6021dc56d2b30f7f84a416d15f8618b [file] [log] [blame]
Andrew Geissler36529022016-11-29 15:23:54 -06001AM_DEFAULT_SOURCE_EXT = .cpp
2
Andrew Geissler693eaed2019-08-02 14:12:28 -05003if AUTOCONF_CODE_COVERAGE_2019_01_06
4include $(top_srcdir)/aminclude_static.am
5clean-local: code-coverage-clean
6distclean-local: code-coverage-dist-clean
7else
8@CODE_COVERAGE_RULES@
9endif
10
Andrew Geissler64400062019-08-13 13:43:23 -050011systemdsystemunit_DATA = \
Andrew Geissler1cf61622019-12-10 14:39:32 -060012 ./service_files/phosphor-systemd-target-monitor.service
Andrew Geissler64400062019-08-13 13:43:23 -050013
Andrew Geissler693eaed2019-08-02 14:12:28 -050014AM_LIBS = $(CODE_COVERAGE_LIBS)
15AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) -UNDEBUG $(GTEST_CPPFLAGS)
16AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
17AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) \
18 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY \
Andrew Geissler234a3172019-08-09 14:30:02 -050019 -DBOOST_ALL_NO_LIB $(SDEVENTPLUS_CFLAGS) \
20 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) $(PHOSPHOR_LOGGING_CFLAGS)
Andrew Geissler693eaed2019-08-02 14:12:28 -050021AM_LDFLAGS = $(GMOCK_LIBS) -lgmock_main \
22 $(GTEST_LIBS) $(OESDK_TESTCASE_FLAGS) $(PTHREAD_LIBS) \
Andrew Geisslerc543af22019-12-12 09:23:27 -060023 $(SDBUSPLUS_LIBS) $(SDEVENTPLUS_LIBS) \
Andrew Geissler234a3172019-08-09 14:30:02 -050024 $(PHOSPHOR_DBUS_INTERFACES_LIBS) $(PHOSPHOR_LOGGING_LIBS)
Andrew Geissler693eaed2019-08-02 14:12:28 -050025
Patrick Venture19096262019-03-28 11:25:14 -070026bin_PROGRAMS = \
Andrew Geissler794baed2017-01-16 13:12:21 -060027 phosphor-host-state-manager \
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060028 phosphor-chassis-state-manager \
Michael Tritz3ed10082017-03-20 23:28:09 -050029 phosphor-bmc-state-manager \
Andrew Geisslerb09463d2017-03-24 15:55:17 -050030 phosphor-discover-system-state \
Andrew Geissler891213b2019-07-30 14:08:17 -050031 phosphor-host-check \
32 phosphor-systemd-target-monitor
Andrew Geissler36529022016-11-29 15:23:54 -060033
Patrick Venture19096262019-03-28 11:25:14 -070034dist_bin_SCRIPTS = \
Anthony Wilsondc305232019-02-04 02:47:45 -060035 obmcutil
36
Andrew Geissler794baed2017-01-16 13:12:21 -060037phosphor_host_state_manager_SOURCES = \
Andrew Geissler36529022016-11-29 15:23:54 -060038 host_state_manager.cpp \
Dhruvaraj Subhashchandran3f475242017-07-12 00:44:27 -050039 host_state_manager_main.cpp \
Deepak Kodihalli3dd08a52017-07-25 07:34:44 -050040 settings.cpp
Andrew Geissler36529022016-11-29 15:23:54 -060041
Andrew Geissler794baed2017-01-16 13:12:21 -060042phosphor_chassis_state_manager_SOURCES = \
Andrew Geisslera90a31a2016-12-13 16:16:28 -060043 chassis_state_manager.cpp \
William A. Kennington IIId998f822018-10-17 23:17:57 -070044 chassis_state_manager_main.cpp
Andrew Geisslera90a31a2016-12-13 16:16:28 -060045
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060046phosphor_bmc_state_manager_SOURCES = \
47 bmc_state_manager.cpp \
Josh D. Kingbdd9cb72016-12-19 11:13:43 -060048 bmc_state_manager_main.cpp
49
Michael Tritz3ed10082017-03-20 23:28:09 -050050phosphor_discover_system_state_SOURCES = \
Deepak Kodihalli55f132b2017-07-25 07:36:06 -050051 discover_system_state.cpp \
52 settings.cpp
Michael Tritz3ed10082017-03-20 23:28:09 -050053
Andrew Geisslerb09463d2017-03-24 15:55:17 -050054phosphor_host_check_SOURCES = \
55 host_check_main.cpp
56
Andrew Geissler891213b2019-07-30 14:08:17 -050057phosphor_systemd_target_monitor_SOURCES = \
Andrew Geissler693eaed2019-08-02 14:12:28 -050058 systemd_target_monitor.cpp \
Andrew Geissler234a3172019-08-09 14:30:02 -050059 systemd_target_parser.cpp \
60 systemd_target_signal.cpp
Andrew Geissler891213b2019-07-30 14:08:17 -050061
Deepak Kodihalli3dd08a52017-07-25 07:34:44 -050062generic_cxxflags = \
63 $(SYSTEMD_CFLAGS) \
64 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
65 $(SDBUSPLUS_CFLAGS) \
66 $(PHOSPHOR_LOGGING_CFLAGS)
67
68generic_ldflags = \
69 $(SYSTEMD_LIBS) \
70 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Nagaraju Goruganticb781fe2018-04-06 13:41:01 -050071 $(SDBUSPLUS_LIBS) \
Deepak Kodihalli3dd08a52017-07-25 07:34:44 -050072 $(PHOSPHOR_LOGGING_LIBS)
Patrick Williams515f74b2017-01-30 10:56:09 -060073
74phosphor_host_state_manager_CXXFLAGS = $(generic_cxxflags)
Dhruvaraj Subhashchandran3f475242017-07-12 00:44:27 -050075phosphor_host_state_manager_LDFLAGS = $(generic_ldflags) -lstdc++fs
Patrick Williams515f74b2017-01-30 10:56:09 -060076
William A. Kennington IIId998f822018-10-17 23:17:57 -070077phosphor_chassis_state_manager_CXXFLAGS = \
78 $(generic_cxxflags) \
79 $(SDEVENTPLUS_CFLAGS)
80phosphor_chassis_state_manager_LDFLAGS = \
81 $(generic_ldflags) \
82 $(SDEVENTPLUS_LIBS) \
83 -lstdc++fs
Patrick Williams515f74b2017-01-30 10:56:09 -060084
85phosphor_bmc_state_manager_CXXFLAGS = $(generic_cxxflags)
86phosphor_bmc_state_manager_LDFLAGS = $(generic_ldflags)
Michael Tritz3ed10082017-03-20 23:28:09 -050087
88phosphor_discover_system_state_CXXFLAGS = $(generic_cxxflags)
89phosphor_discover_system_state_LDFLAGS = $(generic_ldflags)
Andrew Geisslerb09463d2017-03-24 15:55:17 -050090
91phosphor_host_check_CXXFLAGS = $(generic_cxxflags)
92phosphor_host_check_LDFLAGS = $(generic_ldflags)
Andrew Geissler891213b2019-07-30 14:08:17 -050093
94phosphor_systemd_target_monitor_CXXFLAGS = \
95 $(generic_cxxflags) \
96 $(SDEVENTPLUS_CFLAGS)
97phosphor_systemd_target_monitor_LDFLAGS = \
98 $(generic_ldflags) \
99 $(SDEVENTPLUS_LIBS) \
100 -lstdc++fs
Andrew Geissler693eaed2019-08-02 14:12:28 -0500101
Andrew Geissler64400062019-08-13 13:43:23 -0500102install-data-local:
103 mkdir -p ${DESTDIR}/$(sysconfdir)/phosphor-systemd-target-monitor
104 cp $(srcdir)/phosphor-target-monitor-default.json ${DESTDIR}/$(sysconfdir)/phosphor-systemd-target-monitor
Andrew Geissler693eaed2019-08-02 14:12:28 -0500105
106check_PROGRAMS =
107XFAIL_TESTS =
108
109# Ignore system headers
110CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
111
112include test/Makefile.am.include
113
114TESTS = $(check_PROGRAMS)