blob: a2b263e647c1d2dd37feb3538a30b01099b22a41 [file] [log] [blame]
Deepak Kodihalli47795312017-03-17 07:12:08 -05001# Build these headers, don't install them
2noinst_HEADERS = \
Vishwanatha Subbanna307d80b2017-06-28 15:56:09 +05303 occ_pass_through.hpp \
Andrew Geissler32016d12017-06-20 15:46:52 -05004 occ_status.hpp \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +05305 powercap.hpp \
6 occ_errors.hpp \
Deepak Kodihalli5f031f32017-07-26 08:25:59 -05007 occ_events.hpp \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +05308 occ_finder.hpp \
9 utils.hpp
Deepak Kodihalli47795312017-03-17 07:12:08 -050010
Lei YU6c56a4a2017-07-14 11:07:37 +080011noinst_LTLIBRARIES = libocc_control.la
12
Deepak Kodihalli92a63412017-03-17 05:01:00 -050013sbin_PROGRAMS = openpower-occ-control
Lei YU6c56a4a2017-07-14 11:07:37 +080014
Deepak Kodihalli92a63412017-03-17 05:01:00 -050015openpower_occ_control_SOURCES = \
Lei YU6c56a4a2017-07-14 11:07:37 +080016 app.cpp
17
18libocc_control_la_SOURCES = \
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -050019 occ_pass_through.cpp \
Vishwanatha Subbannadfc7ec72017-09-07 18:18:01 +053020 occ_manager.cpp \
Vishwanatha Subbanna307d80b2017-06-28 15:56:09 +053021 occ_status.cpp \
Vishwanatha Subbanna32e84e92017-06-28 19:17:28 +053022 occ_device.cpp \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053023 occ_errors.cpp \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053024 powercap.cpp \
Deepak Kodihalli5f031f32017-07-26 08:25:59 -050025 org/open_power/OCC/Device/error.cpp \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +053026 occ_finder.cpp \
Lei YU0ab90ca2017-07-13 17:02:23 +080027 i2c_occ.cpp \
Vishwanatha Subbanna30e329a2017-07-24 23:13:14 +053028 utils.cpp
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053029
Lei YU6c56a4a2017-07-14 11:07:37 +080030openpower_occ_control_LDADD = libocc_control.la -lstdc++fs
31
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053032BUILT_SOURCES = org/open_power/OCC/Device/error.hpp \
Vishwanatha Subbanna6add0b82017-07-21 19:02:37 +053033 org/open_power/OCC/Device/error.cpp \
34 occ_sensor.hpp
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053035
36CLEANFILES = ${BUILT_SOURCES}
Deepak Kodihalli92a63412017-03-17 05:01:00 -050037
Vishwanatha Subbanna6add0b82017-07-21 19:02:37 +053038REQ_MAKO_FILE ?= ${top_srcdir}/occ_sensor.mako.hpp
39REQ_PY_SCRIPT ?= ${top_srcdir}/sensor_gen.py
40
41EXTRA_DIST = $(REQ_MAKO_FILE) $(REQ_PY_SCRIPT)
42
43occ_sensor.hpp: ${REQ_PY_SCRIPT} ${REQ_MAKO_FILE}
44 $(AM_V_GEN) ${PYTHON} ${REQ_PY_SCRIPT} -i ${YAML_PATH} > $@
45
Lei YU6c56a4a2017-07-14 11:07:37 +080046
47generic_ld_flags = \
Deepak Kodihalli92a63412017-03-17 05:01:00 -050048 $(SDBUSPLUS_LIBS) \
49 $(PHOSPHOR_LOGGING_LIBS) \
Deepak Kodihallifd358d12017-05-08 07:11:22 -050050 $(OPENPOWER_DBUS_INTERFACES_LIBS) \
Lei YU6c56a4a2017-07-14 11:07:37 +080051 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053052
Lei YU6c56a4a2017-07-14 11:07:37 +080053generic_cxx_flags = \
Deepak Kodihalli92a63412017-03-17 05:01:00 -050054 $(SDBUSPLUS_CFLAGS) \
55 $(PHOSPHOR_LOGGING_CFLAGS) \
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053056 $(OPENPOWER_DBUS_INTERFACES_CFLAGS) \
57 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053058
Lei YU6c56a4a2017-07-14 11:07:37 +080059libocc_control_la_CXXFLAGS = $(generic_cxx_flags)
60
61libocc_control_la_LDFLAGS = $(generic_ld_flags)
62
63openpower_occ_control_CXXFLAGS = $(generic_cxx_flags)
64
65openpower_occ_control_LDFLAGS = $(generic_ld_flags)
66
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053067org/open_power/OCC/Device/error.hpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053068 @mkdir -p `dirname $@`
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053069 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header org.open_power.OCC.Device > $@
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053070
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053071org/open_power/OCC/Device/error.cpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
Vishwanatha Subbanna9bb065b2017-04-18 14:25:26 +053072 @mkdir -p `dirname $@`
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053073 $(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Device > $@
Andrew Geissler4cea4d22017-07-10 15:13:33 -050074
Vishwanatha Subbannaee4d83d2017-06-29 18:35:00 +053075SUBDIRS = . test