blob: f3863dd970a67e613c44cc188f1c6b7de838b5ca [file] [log] [blame]
Marri Devender Raocf4fdca2017-12-29 03:40:05 -06001if !INSTALL_ERROR_YAML
Deepak Kodihalli47795312017-03-17 07:12:08 -05002# Build these headers, don't install them
3noinst_HEADERS = \
Vishwanatha Subbanna307d80b2017-06-28 15:56:09 +05304 occ_pass_through.hpp \
Andrew Geissler32016d12017-06-20 15:46:52 -05005 occ_status.hpp \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05306 powercap.hpp \
7 occ_errors.hpp \
Deepak Kodihalli5f031f32017-07-26 08:25:59 -05008 occ_events.hpp \
Edward A. James636577f2017-10-06 10:53:55 -05009 occ_presence.hpp \
Chris Caina8857c52021-01-27 11:53:05 -060010 occ_command.hpp \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +053011 utils.hpp
Deepak Kodihalli47795312017-03-17 07:12:08 -050012
Lei YU6c56a4a2017-07-14 11:07:37 +080013noinst_LTLIBRARIES = libocc_control.la
14
Patrick Ventureb35cd0d2019-03-28 12:51:28 -070015bin_PROGRAMS = openpower-occ-control
Lei YU6c56a4a2017-07-14 11:07:37 +080016
Deepak Kodihalli92a63412017-03-17 05:01:00 -050017openpower_occ_control_SOURCES = \
Lei YU6c56a4a2017-07-14 11:07:37 +080018 app.cpp
19
20libocc_control_la_SOURCES = \
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -050021 occ_pass_through.cpp \
Vishwanatha Subbannadfc7ec72017-09-07 18:18:01 +053022 occ_manager.cpp \
Vishwanatha Subbanna307d80b2017-06-28 15:56:09 +053023 occ_status.cpp \
Vishwanatha Subbanna32e84e92017-06-28 19:17:28 +053024 occ_device.cpp \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053025 occ_errors.cpp \
Edward A. James636577f2017-10-06 10:53:55 -050026 occ_presence.cpp \
Chris Caina8857c52021-01-27 11:53:05 -060027 occ_command.cpp \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053028 powercap.cpp \
Deepak Kodihalli5f031f32017-07-26 08:25:59 -050029 org/open_power/OCC/Device/error.cpp \
Lei YU0ab90ca2017-07-13 17:02:23 +080030 i2c_occ.cpp \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +053031 utils.cpp
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053032
Chris Caina8857c52021-01-27 11:53:05 -060033openpower_occ_control_LDADD = \
34 libocc_control.la \
35 -lstdc++fs \
36 $(SDBUSPLUS_LIBS) \
37 $(SDEVENTPLUS_LIBS) \
38 $(FMT_LIBS)
Lei YU6c56a4a2017-07-14 11:07:37 +080039
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053040BUILT_SOURCES = org/open_power/OCC/Device/error.hpp \
Vishwanatha Subbanna6add0b82017-07-21 19:02:37 +053041 org/open_power/OCC/Device/error.cpp \
42 occ_sensor.hpp
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053043
44CLEANFILES = ${BUILT_SOURCES}
Deepak Kodihalli92a63412017-03-17 05:01:00 -050045
Vishwanatha Subbanna6add0b82017-07-21 19:02:37 +053046REQ_MAKO_FILE ?= ${top_srcdir}/occ_sensor.mako.hpp
47REQ_PY_SCRIPT ?= ${top_srcdir}/sensor_gen.py
48
49EXTRA_DIST = $(REQ_MAKO_FILE) $(REQ_PY_SCRIPT)
50
51occ_sensor.hpp: ${REQ_PY_SCRIPT} ${REQ_MAKO_FILE}
52 $(AM_V_GEN) ${PYTHON} ${REQ_PY_SCRIPT} -i ${YAML_PATH} > $@
53
Lei YU6c56a4a2017-07-14 11:07:37 +080054
55generic_ld_flags = \
Deepak Kodihalli92a63412017-03-17 05:01:00 -050056 $(SDBUSPLUS_LIBS) \
57 $(PHOSPHOR_LOGGING_LIBS) \
Lei YU6c56a4a2017-07-14 11:07:37 +080058 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053059
Lei YU6c56a4a2017-07-14 11:07:37 +080060generic_cxx_flags = \
Deepak Kodihalli92a63412017-03-17 05:01:00 -050061 $(SDBUSPLUS_CFLAGS) \
62 $(PHOSPHOR_LOGGING_CFLAGS) \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053063 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053064
Lei YU6c56a4a2017-07-14 11:07:37 +080065libocc_control_la_CXXFLAGS = $(generic_cxx_flags)
66
67libocc_control_la_LDFLAGS = $(generic_ld_flags)
68
69openpower_occ_control_CXXFLAGS = $(generic_cxx_flags)
70
71openpower_occ_control_LDFLAGS = $(generic_ld_flags)
72
Tom Joseph815f9f52020-07-27 12:12:13 +053073include pldm.mk
74
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053075org/open_power/OCC/Device/error.hpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053076 @mkdir -p `dirname $@`
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053077 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header org.open_power.OCC.Device > $@
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053078
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053079org/open_power/OCC/Device/error.cpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053080 @mkdir -p `dirname $@`
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053081 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Device > $@
Andrew Geissler4cea4d22017-07-10 15:13:33 -050082
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053083SUBDIRS = . test
Marri Devender Raocf4fdca2017-12-29 03:40:05 -060084endif
85
86# Export error YAML to shared location
87yamldir = ${datadir}/phosphor-dbus-yaml/yaml
88nobase_yaml_DATA = \
89 org/open_power/OCC/Device.errors.yaml \
90 org/open_power/OCC/Device.metadata.yaml