Matt Spinler | e73446e | 2017-04-10 13:55:52 -0500 | [diff] [blame] | 1 | AM_DEFAULT_SOURCE_EXT = .cpp |
Matthew Barth | 54b5a24 | 2021-05-21 11:02:52 -0500 | [diff] [blame] | 2 | AM_CPPFLAGS = -iquote ${top_srcdir} \ |
| 3 | -I${srcdir}/json \ |
| 4 | -I${srcdir}/json/actions \ |
| 5 | -I${srcdir}/json/triggers |
Matt Spinler | e73446e | 2017-04-10 13:55:52 -0500 | [diff] [blame] | 6 | |
Matthew Barth | 058180f | 2021-06-16 11:41:58 -0500 | [diff] [blame] | 7 | systemdsystemunit_DATA= |
| 8 | |
| 9 | if WANT_JSON_CONTROL |
Matthew Barth | ceb75d7 | 2021-08-18 15:18:43 -0500 | [diff] [blame] | 10 | CONFIGSDIR = "${pkgdatadir}/control/" |
| 11 | CONFIGSLOC = "${srcdir}/config_files/$(MACHINE)/" |
| 12 | |
| 13 | EXTRA_DIST = $(CONFIGSLOC) |
| 14 | |
| 15 | # No $(MACHINE) given results in installing entire config_files contents |
| 16 | install-data-hook: |
| 17 | for config in `cd $(CONFIGSLOC) && find * -type f`; do \ |
| 18 | $(MKDIR_P) "$(DESTDIR)$(CONFIGSDIR)`dirname $${config}`"; \ |
| 19 | $(INSTALL_DATA) "$(CONFIGSLOC)$${config}" "$(DESTDIR)$(CONFIGSDIR)`dirname $${config}`"; \ |
| 20 | done |
| 21 | |
| 22 | uninstall-hook: |
| 23 | rm -rf "$(DESTDIR)$(CONFIGSDIR)" |
| 24 | |
Matthew Barth | 058180f | 2021-06-16 11:41:58 -0500 | [diff] [blame] | 25 | systemdsystemunit_DATA += \ |
| 26 | service_files/json/phosphor-fan-control@.service |
| 27 | else |
| 28 | systemdsystemunit_DATA += \ |
| 29 | service_files/yaml/phosphor-fan-control@.service \ |
| 30 | service_files/yaml/phosphor-fan-control-init@.service |
| 31 | endif |
| 32 | |
Patrick Venture | 71779ab | 2019-03-28 11:22:15 -0700 | [diff] [blame] | 33 | bin_PROGRAMS = \ |
Mike Capps | 385b198 | 2021-06-28 10:40:42 -0400 | [diff] [blame] | 34 | phosphor-fan-control \ |
| 35 | fanctl |
Matt Spinler | e73446e | 2017-04-10 13:55:52 -0500 | [diff] [blame] | 36 | |
| 37 | phosphor_fan_control_SOURCES = \ |
Matthew Barth | f8ae7a5 | 2021-03-05 10:23:43 -0600 | [diff] [blame] | 38 | main.cpp |
Matt Spinler | e73446e | 2017-04-10 13:55:52 -0500 | [diff] [blame] | 39 | |
Brad Bishop | 1048401 | 2017-04-24 22:59:18 -0400 | [diff] [blame] | 40 | phosphor_fan_control_LDADD = \ |
Matthew Barth | 93af419 | 2019-01-18 09:30:57 -0600 | [diff] [blame] | 41 | -lstdc++fs \ |
Brad Bishop | 1048401 | 2017-04-24 22:59:18 -0400 | [diff] [blame] | 42 | $(SDBUSPLUS_LIBS) \ |
William A. Kennington III | 1cfc2f1 | 2018-10-19 17:29:46 -0700 | [diff] [blame] | 43 | $(SDEVENTPLUS_LIBS) \ |
Dinesh Chinari | 618027a | 2017-06-26 23:26:50 -0500 | [diff] [blame] | 44 | $(PHOSPHOR_LOGGING_LIBS) \ |
Matthew Barth | 1826c73 | 2020-08-28 08:40:59 -0500 | [diff] [blame] | 45 | ${PHOSPHOR_DBUS_INTERFACES_LIBS} \ |
| 46 | $(FMT_LIBS) |
Brad Bishop | 1048401 | 2017-04-24 22:59:18 -0400 | [diff] [blame] | 47 | |
| 48 | phosphor_fan_control_CXXFLAGS = \ |
| 49 | $(SDBUSPLUS_CFLAGS) \ |
William A. Kennington III | 1cfc2f1 | 2018-10-19 17:29:46 -0700 | [diff] [blame] | 50 | $(SDEVENTPLUS_CFLAGS) \ |
Dinesh Chinari | 618027a | 2017-06-26 23:26:50 -0500 | [diff] [blame] | 51 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
Andrew Geissler | ecd4bc7 | 2018-08-27 10:52:23 -0700 | [diff] [blame] | 52 | ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \ |
| 53 | -flto |
Matt Spinler | 77d32d1 | 2017-04-12 09:51:41 -0500 | [diff] [blame] | 54 | |
Mike Capps | 385b198 | 2021-06-28 10:40:42 -0400 | [diff] [blame] | 55 | fanctl_SOURCES = \ |
| 56 | fanctl.cpp |
| 57 | |
Mike Capps | 385b198 | 2021-06-28 10:40:42 -0400 | [diff] [blame] | 58 | fanctl_LDADD = \ |
| 59 | $(SDBUSPLUS_LIBS) \ |
| 60 | $(FMT_LIBS) |
| 61 | |
Mike Capps | 16aab35 | 2021-06-30 10:17:21 -0400 | [diff] [blame] | 62 | fanctl_CXXFLAGS = \ |
| 63 | $(SDBUSPLUS_CFLAGS) \ |
| 64 | -flto |
Mike Capps | 385b198 | 2021-06-28 10:40:42 -0400 | [diff] [blame] | 65 | |
| 66 | |
Matthew Barth | 8e1b382 | 2020-11-12 11:57:23 -0600 | [diff] [blame] | 67 | if WANT_JSON_CONTROL |
Matthew Barth | e6704b9 | 2020-10-20 16:14:08 -0500 | [diff] [blame] | 68 | phosphor_fan_control_SOURCES += \ |
Matthew Barth | e6704b9 | 2020-10-20 16:14:08 -0500 | [diff] [blame] | 69 | json/manager.cpp \ |
| 70 | json/profile.cpp \ |
| 71 | json/fan.cpp \ |
| 72 | json/zone.cpp \ |
Matthew Barth | bc89a8a | 2021-05-25 15:42:58 -0500 | [diff] [blame] | 73 | json/dbus_zone.cpp \ |
Matthew Barth | e6704b9 | 2020-10-20 16:14:08 -0500 | [diff] [blame] | 74 | json/group.cpp \ |
Matthew Barth | 0c4b157 | 2020-10-22 14:39:46 -0500 | [diff] [blame] | 75 | json/event.cpp \ |
Matthew Barth | baeeb8f | 2021-05-13 16:03:54 -0500 | [diff] [blame] | 76 | json/triggers/timer.cpp \ |
| 77 | json/triggers/signal.cpp \ |
Matthew Barth | e8441c6 | 2021-05-13 16:50:56 -0500 | [diff] [blame] | 78 | json/triggers/init.cpp \ |
Matt Spinler | d0ba86a | 2021-11-09 10:09:13 -0600 | [diff] [blame] | 79 | json/triggers/parameter.cpp \ |
Matthew Barth | 07fecfc | 2021-01-29 09:04:43 -0600 | [diff] [blame] | 80 | json/actions/default_floor.cpp \ |
Matthew Barth | 070ee3c | 2021-01-29 09:58:16 -0600 | [diff] [blame] | 81 | json/actions/request_target_base.cpp \ |
Matthew Barth | 89c2fa1 | 2021-02-04 14:50:40 -0600 | [diff] [blame] | 82 | json/actions/missing_owner_target.cpp \ |
Matthew Barth | dc776c8 | 2021-02-25 16:06:16 -0600 | [diff] [blame] | 83 | json/actions/count_state_target.cpp \ |
Mike Capps | 59af8ca | 2021-10-07 15:42:28 -0400 | [diff] [blame] | 84 | json/actions/override_fan_target.cpp \ |
Matthew Barth | 45c44ea | 2021-03-03 13:16:14 -0600 | [diff] [blame] | 85 | json/actions/net_target_increase.cpp \ |
Matthew Barth | cb112a3 | 2021-06-30 14:23:36 -0500 | [diff] [blame] | 86 | json/actions/net_target_decrease.cpp \ |
Matt Spinler | 848799f | 2021-07-01 12:43:07 -0600 | [diff] [blame] | 87 | json/actions/timer_based_actions.cpp \ |
Matt Spinler | c09b8c8 | 2021-08-05 16:29:47 -0500 | [diff] [blame] | 88 | json/actions/mapped_floor.cpp \ |
Matt Spinler | 81bc880 | 2021-08-06 09:25:45 -0500 | [diff] [blame] | 89 | json/actions/set_parameter_from_group_max.cpp \ |
Matt Spinler | 65dfe1e | 2021-10-26 15:56:01 -0500 | [diff] [blame] | 90 | json/actions/count_state_floor.cpp \ |
Matt Spinler | 41e76f8 | 2021-10-14 16:00:13 -0500 | [diff] [blame] | 91 | json/actions/get_managed_objects.cpp \ |
Matt Spinler | d4c7fb7 | 2021-11-09 16:03:50 -0600 | [diff] [blame] | 92 | json/actions/pcie_card_floors.cpp \ |
Matt Spinler | 1327096 | 2021-10-04 14:49:33 -0500 | [diff] [blame] | 93 | json/utils/flight_recorder.cpp \ |
Matt Spinler | e9d33b6 | 2021-11-09 13:27:26 -0600 | [diff] [blame] | 94 | json/utils/modifier.cpp \ |
| 95 | json/utils/pcie_card_metadata.cpp |
Matthew Barth | d87f89f | 2020-07-30 10:41:32 -0500 | [diff] [blame] | 96 | else |
Matthew Barth | f8ae7a5 | 2021-03-05 10:23:43 -0600 | [diff] [blame] | 97 | phosphor_fan_control_SOURCES += \ |
| 98 | argument.cpp \ |
| 99 | fan.cpp \ |
| 100 | manager.cpp \ |
| 101 | utility.cpp \ |
| 102 | preconditions.cpp \ |
| 103 | actions.cpp \ |
| 104 | triggers.cpp \ |
| 105 | zone.cpp |
Matt Spinler | 77d32d1 | 2017-04-12 09:51:41 -0500 | [diff] [blame] | 106 | BUILT_SOURCES = fan_zone_defs.cpp |
Matthew Barth | d87f89f | 2020-07-30 10:41:32 -0500 | [diff] [blame] | 107 | nodist_phosphor_fan_control_SOURCES = \ |
| 108 | fan_zone_defs.cpp |
Matt Spinler | 77d32d1 | 2017-04-12 09:51:41 -0500 | [diff] [blame] | 109 | |
| 110 | fan_zone_defs.cpp: ${srcdir}/gen-fan-zone-defs.py |
Matthew Barth | 8c8f53d | 2020-02-18 09:40:13 -0600 | [diff] [blame] | 111 | $(AM_V_GEN)$(GEN_FAN_ZONE_DEFS) > ${builddir}/$@ |
Matthew Barth | d87f89f | 2020-07-30 10:41:32 -0500 | [diff] [blame] | 112 | endif |