blob: 8367952dd783560d57087bc2ab92c314a40a0ded [file] [log] [blame]
Matt Spinlere73446e2017-04-10 13:55:52 -05001AM_DEFAULT_SOURCE_EXT = .cpp
Matthew Barthe6704b92020-10-20 16:14:08 -05002AM_CPPFLAGS = -iquote ${top_srcdir} -I${srcdir}/json -I${srcdir}/json/actions
Matt Spinlere73446e2017-04-10 13:55:52 -05003
Patrick Venture71779ab2019-03-28 11:22:15 -07004bin_PROGRAMS = \
Matt Spinlere73446e2017-04-10 13:55:52 -05005 phosphor-fan-control
6
7phosphor_fan_control_SOURCES = \
Matthew Barthf8ae7a52021-03-05 10:23:43 -06008 main.cpp
Matt Spinlere73446e2017-04-10 13:55:52 -05009
Brad Bishop10484012017-04-24 22:59:18 -040010phosphor_fan_control_LDADD = \
Matthew Barth93af4192019-01-18 09:30:57 -060011 -lstdc++fs \
Brad Bishop10484012017-04-24 22:59:18 -040012 $(SDBUSPLUS_LIBS) \
William A. Kennington III1cfc2f12018-10-19 17:29:46 -070013 $(SDEVENTPLUS_LIBS) \
Dinesh Chinari618027a2017-06-26 23:26:50 -050014 $(PHOSPHOR_LOGGING_LIBS) \
Matthew Barth1826c732020-08-28 08:40:59 -050015 ${PHOSPHOR_DBUS_INTERFACES_LIBS} \
16 $(FMT_LIBS)
Brad Bishop10484012017-04-24 22:59:18 -040017
18phosphor_fan_control_CXXFLAGS = \
19 $(SDBUSPLUS_CFLAGS) \
William A. Kennington III1cfc2f12018-10-19 17:29:46 -070020 $(SDEVENTPLUS_CFLAGS) \
Dinesh Chinari618027a2017-06-26 23:26:50 -050021 $(PHOSPHOR_LOGGING_CFLAGS) \
Andrew Geisslerecd4bc72018-08-27 10:52:23 -070022 ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
23 -flto
Matt Spinler77d32d12017-04-12 09:51:41 -050024
Matthew Barth8e1b3822020-11-12 11:57:23 -060025if WANT_JSON_CONTROL
Matthew Barthe6704b92020-10-20 16:14:08 -050026phosphor_fan_control_SOURCES += \
Matthew Barthf8ae7a52021-03-05 10:23:43 -060027 fan.cpp \
28 zone.cpp \
Matthew Barthe6704b92020-10-20 16:14:08 -050029 json_parser.cpp \
30 json/manager.cpp \
31 json/profile.cpp \
32 json/fan.cpp \
33 json/zone.cpp \
34 json/group.cpp \
Matthew Barth0c4b1572020-10-22 14:39:46 -050035 json/event.cpp \
36 json/actions/default_floor.cpp
Matthew Barthd87f89f2020-07-30 10:41:32 -050037else
Matthew Barthf8ae7a52021-03-05 10:23:43 -060038phosphor_fan_control_SOURCES += \
39 argument.cpp \
40 fan.cpp \
41 manager.cpp \
42 utility.cpp \
43 preconditions.cpp \
44 actions.cpp \
45 triggers.cpp \
46 zone.cpp
Matt Spinler77d32d12017-04-12 09:51:41 -050047BUILT_SOURCES = fan_zone_defs.cpp
Matthew Barthd87f89f2020-07-30 10:41:32 -050048nodist_phosphor_fan_control_SOURCES = \
49 fan_zone_defs.cpp
Matt Spinler77d32d12017-04-12 09:51:41 -050050
51fan_zone_defs.cpp: ${srcdir}/gen-fan-zone-defs.py
Matthew Barth8c8f53d2020-02-18 09:40:13 -060052 $(AM_V_GEN)$(GEN_FAN_ZONE_DEFS) > ${builddir}/$@
Matthew Barthd87f89f2020-07-30 10:41:32 -050053endif