blob: b883f9491e96d86b51104c7b895e0704769137e1 [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 \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +05309 occ_finder.hpp \
Edward A. James636577f2017-10-06 10:53:55 -050010 occ_presence.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
Deepak Kodihalli92a63412017-03-17 05:01:00 -050015sbin_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 \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053027 powercap.cpp \
Deepak Kodihalli5f031f32017-07-26 08:25:59 -050028 org/open_power/OCC/Device/error.cpp \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +053029 occ_finder.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
Lei YU6c56a4a2017-07-14 11:07:37 +080033openpower_occ_control_LDADD = libocc_control.la -lstdc++fs
34
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053035BUILT_SOURCES = org/open_power/OCC/Device/error.hpp \
Vishwanatha Subbanna6add0b82017-07-21 19:02:37 +053036 org/open_power/OCC/Device/error.cpp \
37 occ_sensor.hpp
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053038
39CLEANFILES = ${BUILT_SOURCES}
Deepak Kodihalli92a63412017-03-17 05:01:00 -050040
Vishwanatha Subbanna6add0b82017-07-21 19:02:37 +053041REQ_MAKO_FILE ?= ${top_srcdir}/occ_sensor.mako.hpp
42REQ_PY_SCRIPT ?= ${top_srcdir}/sensor_gen.py
43
44EXTRA_DIST = $(REQ_MAKO_FILE) $(REQ_PY_SCRIPT)
45
46occ_sensor.hpp: ${REQ_PY_SCRIPT} ${REQ_MAKO_FILE}
47 $(AM_V_GEN) ${PYTHON} ${REQ_PY_SCRIPT} -i ${YAML_PATH} > $@
48
Lei YU6c56a4a2017-07-14 11:07:37 +080049
50generic_ld_flags = \
Deepak Kodihalli92a63412017-03-17 05:01:00 -050051 $(SDBUSPLUS_LIBS) \
52 $(PHOSPHOR_LOGGING_LIBS) \
Deepak Kodihallifd358d12017-05-08 07:11:22 -050053 $(OPENPOWER_DBUS_INTERFACES_LIBS) \
Lei YU6c56a4a2017-07-14 11:07:37 +080054 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053055
Lei YU6c56a4a2017-07-14 11:07:37 +080056generic_cxx_flags = \
Deepak Kodihalli92a63412017-03-17 05:01:00 -050057 $(SDBUSPLUS_CFLAGS) \
58 $(PHOSPHOR_LOGGING_CFLAGS) \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053059 $(OPENPOWER_DBUS_INTERFACES_CFLAGS) \
60 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053061
Lei YU6c56a4a2017-07-14 11:07:37 +080062libocc_control_la_CXXFLAGS = $(generic_cxx_flags)
63
64libocc_control_la_LDFLAGS = $(generic_ld_flags)
65
66openpower_occ_control_CXXFLAGS = $(generic_cxx_flags)
67
68openpower_occ_control_LDFLAGS = $(generic_ld_flags)
69
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053070org/open_power/OCC/Device/error.hpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053071 @mkdir -p `dirname $@`
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053072 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header org.open_power.OCC.Device > $@
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053073
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053074org/open_power/OCC/Device/error.cpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053075 @mkdir -p `dirname $@`
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053076 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Device > $@
Andrew Geissler4cea4d22017-07-10 15:13:33 -050077
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053078SUBDIRS = . test
Marri Devender Raocf4fdca2017-12-29 03:40:05 -060079endif
80
81# Export error YAML to shared location
82yamldir = ${datadir}/phosphor-dbus-yaml/yaml
83nobase_yaml_DATA = \
84 org/open_power/OCC/Device.errors.yaml \
85 org/open_power/OCC/Device.metadata.yaml