blob: 7510e1e032f298192414d87e11783875283ace3e [file] [log] [blame]
Matt Spinlere73446e2017-04-10 13:55:52 -05001AM_DEFAULT_SOURCE_EXT = .cpp
Matthew Barth54b5a242021-05-21 11:02:52 -05002AM_CPPFLAGS = -iquote ${top_srcdir} \
3 -I${srcdir}/json \
4 -I${srcdir}/json/actions \
5 -I${srcdir}/json/triggers
Matt Spinlere73446e2017-04-10 13:55:52 -05006
Matthew Barth058180f2021-06-16 11:41:58 -05007systemdsystemunit_DATA=
8
9if WANT_JSON_CONTROL
10systemdsystemunit_DATA += \
11 service_files/json/phosphor-fan-control@.service
12else
13systemdsystemunit_DATA += \
14 service_files/yaml/phosphor-fan-control@.service \
15 service_files/yaml/phosphor-fan-control-init@.service
16endif
17
Patrick Venture71779ab2019-03-28 11:22:15 -070018bin_PROGRAMS = \
Matt Spinlere73446e2017-04-10 13:55:52 -050019 phosphor-fan-control
20
21phosphor_fan_control_SOURCES = \
Matthew Barthf8ae7a52021-03-05 10:23:43 -060022 main.cpp
Matt Spinlere73446e2017-04-10 13:55:52 -050023
Brad Bishop10484012017-04-24 22:59:18 -040024phosphor_fan_control_LDADD = \
Matthew Barth93af4192019-01-18 09:30:57 -060025 -lstdc++fs \
Brad Bishop10484012017-04-24 22:59:18 -040026 $(SDBUSPLUS_LIBS) \
William A. Kennington III1cfc2f12018-10-19 17:29:46 -070027 $(SDEVENTPLUS_LIBS) \
Dinesh Chinari618027a2017-06-26 23:26:50 -050028 $(PHOSPHOR_LOGGING_LIBS) \
Matthew Barth1826c732020-08-28 08:40:59 -050029 ${PHOSPHOR_DBUS_INTERFACES_LIBS} \
30 $(FMT_LIBS)
Brad Bishop10484012017-04-24 22:59:18 -040031
32phosphor_fan_control_CXXFLAGS = \
33 $(SDBUSPLUS_CFLAGS) \
William A. Kennington III1cfc2f12018-10-19 17:29:46 -070034 $(SDEVENTPLUS_CFLAGS) \
Dinesh Chinari618027a2017-06-26 23:26:50 -050035 $(PHOSPHOR_LOGGING_CFLAGS) \
Andrew Geisslerecd4bc72018-08-27 10:52:23 -070036 ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
37 -flto
Matt Spinler77d32d12017-04-12 09:51:41 -050038
Matthew Barth8e1b3822020-11-12 11:57:23 -060039if WANT_JSON_CONTROL
Matthew Barthe6704b92020-10-20 16:14:08 -050040phosphor_fan_control_SOURCES += \
Matthew Barthe6704b92020-10-20 16:14:08 -050041 json/manager.cpp \
42 json/profile.cpp \
43 json/fan.cpp \
44 json/zone.cpp \
Matthew Barthbc89a8a2021-05-25 15:42:58 -050045 json/dbus_zone.cpp \
Matthew Barthe6704b92020-10-20 16:14:08 -050046 json/group.cpp \
Matthew Barth0c4b1572020-10-22 14:39:46 -050047 json/event.cpp \
Matthew Barthbaeeb8f2021-05-13 16:03:54 -050048 json/triggers/timer.cpp \
49 json/triggers/signal.cpp \
Matthew Barthe8441c62021-05-13 16:50:56 -050050 json/triggers/init.cpp \
Matthew Barth07fecfc2021-01-29 09:04:43 -060051 json/actions/default_floor.cpp \
Matthew Barth070ee3c2021-01-29 09:58:16 -060052 json/actions/request_target_base.cpp \
Matthew Barth89c2fa12021-02-04 14:50:40 -060053 json/actions/missing_owner_target.cpp \
Matthew Barthdc776c82021-02-25 16:06:16 -060054 json/actions/count_state_target.cpp \
Matthew Barth45c44ea2021-03-03 13:16:14 -060055 json/actions/net_target_increase.cpp \
Matthew Barthbaeeb8f2021-05-13 16:03:54 -050056 json/actions/net_target_decrease.cpp
Matthew Barthd87f89f2020-07-30 10:41:32 -050057else
Matthew Barthf8ae7a52021-03-05 10:23:43 -060058phosphor_fan_control_SOURCES += \
59 argument.cpp \
60 fan.cpp \
61 manager.cpp \
62 utility.cpp \
63 preconditions.cpp \
64 actions.cpp \
65 triggers.cpp \
66 zone.cpp
Matt Spinler77d32d12017-04-12 09:51:41 -050067BUILT_SOURCES = fan_zone_defs.cpp
Matthew Barthd87f89f2020-07-30 10:41:32 -050068nodist_phosphor_fan_control_SOURCES = \
69 fan_zone_defs.cpp
Matt Spinler77d32d12017-04-12 09:51:41 -050070
71fan_zone_defs.cpp: ${srcdir}/gen-fan-zone-defs.py
Matthew Barth8c8f53d2020-02-18 09:40:13 -060072 $(AM_V_GEN)$(GEN_FAN_ZONE_DEFS) > ${builddir}/$@
Matthew Barthd87f89f2020-07-30 10:41:32 -050073endif