blob: 7ae42636406a9ba88be2d3281815dac9bf74205c [file] [log] [blame]
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -05001AM_DEFAULT_SOURCE_EXT = .cpp
2AM_CPPFLAGS = -I$(top_srcdir)
3
George Liuee1c19e2021-04-01 15:02:57 +08004if WANTS_OPERATIONAL_STATUS
5noinst_HEADERS = operational-status-monitor.hpp
6else
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -05007noinst_HEADERS = fru-fault-monitor.hpp
George Liuee1c19e2021-04-01 15:02:57 +08008endif
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -05009
Patrick Ventureab3b2472019-03-28 11:35:44 -070010bin_PROGRAMS = phosphor-fru-fault-monitor
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -050011
12phosphor_fru_fault_monitor_SOURCES = \
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050013 monitor-main.cpp \
14 xyz/openbmc_project/Led/Mapper/error.cpp \
15 xyz/openbmc_project/Led/Fru/Monitor/error.cpp
16
George Liuee1c19e2021-04-01 15:02:57 +080017if WANTS_OPERATIONAL_STATUS
18phosphor_fru_fault_monitor_SOURCES += \
19 ../utils.cpp \
20 operational-status-monitor.cpp
21else
22phosphor_fru_fault_monitor_SOURCES += \
23 fru-fault-monitor.cpp
24endif
25
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050026BUILT_SOURCES = xyz/openbmc_project/Led/Mapper/error.hpp \
27 xyz/openbmc_project/Led/Mapper/error.cpp \
28 xyz/openbmc_project/Led/Fru/Monitor/error.hpp \
29 xyz/openbmc_project/Led/Fru/Monitor/error.cpp
30
31CLEANFILES = ${BUILT_SOURCES}
Dhruvaraj Subhashchandran59b86cd2017-04-13 00:19:44 -050032
33phosphor_fru_fault_monitor_LDFLAGS = $(SDBUSPLUS_LIBS) \
34 $(PHOSPHOR_LOGGING_LIBS) \
35 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
36phosphor_fru_fault_monitor_CFLAGS = $(SDBUSPLUS_CFLAGS) \
37 $(PHOSPHOR_LOGGING_CFLAGS) \
38 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Dhruvaraj Subhashchandran3c6f29a2017-04-20 09:47:28 -050039
40xyz/openbmc_project/Led/Mapper/error.hpp: ${top_srcdir}/xyz/openbmc_project/Led/Mapper.errors.yaml
41 @mkdir -p `dirname $@`
42 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header xyz.openbmc_project.Led.Mapper > $@
43
44xyz/openbmc_project/Led/Mapper/error.cpp: ${top_srcdir}/xyz/openbmc_project/Led/Mapper.errors.yaml
45 @mkdir -p `dirname $@`
46 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp xyz.openbmc_project.Led.Mapper > $@
47
48xyz/openbmc_project/Led/Fru/Monitor/error.hpp: ${top_srcdir}/xyz/openbmc_project/Led/Fru/Monitor.errors.yaml
49 @mkdir -p `dirname $@`
50 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header xyz.openbmc_project.Led.Fru.Monitor > $@
51
52xyz/openbmc_project/Led/Fru/Monitor/error.cpp: ${top_srcdir}/xyz/openbmc_project/Led/Fru/Monitor.errors.yaml
53 @mkdir -p `dirname $@`
54 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp xyz.openbmc_project.Led.Fru.Monitor > $@