Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 1 | AM_DEFAULT_SOURCE_EXT = .cpp |
| 2 | AM_CPPFLAGS = -iquote ${top_srcdir} |
| 3 | |
Patrick Venture | 71779ab | 2019-03-28 11:22:15 -0700 | [diff] [blame] | 4 | bin_PROGRAMS = \ |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 5 | phosphor-fan-presence-tach |
| 6 | |
Matt Spinler | 00db950 | 2021-02-04 16:43:31 -0600 | [diff] [blame] | 7 | systemdsystemunit_DATA= |
| 8 | |
| 9 | if WANT_JSON |
Matthew Barth | 8bf1c42 | 2021-08-05 11:30:09 -0500 | [diff] [blame] | 10 | CONFIGSDIR = "${pkgdatadir}/presence/" |
| 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 | |
Matt Spinler | 00db950 | 2021-02-04 16:43:31 -0600 | [diff] [blame] | 25 | systemdsystemunit_DATA += \ |
| 26 | service_files/json/phosphor-fan-presence-tach@.service |
| 27 | else |
| 28 | systemdsystemunit_DATA += \ |
| 29 | service_files/yaml/phosphor-fan-presence-tach@.service |
| 30 | endif |
| 31 | |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 32 | phosphor_fan_presence_tach_SOURCES = \ |
Brad Bishop | 00b5208 | 2017-07-25 19:52:22 -0400 | [diff] [blame] | 33 | anyof.cpp \ |
Matt Spinler | e812239 | 2020-09-24 13:22:18 -0500 | [diff] [blame] | 34 | error_reporter.cpp \ |
Brad Bishop | bfb8160 | 2017-06-14 21:14:32 -0400 | [diff] [blame] | 35 | fallback.cpp \ |
Brad Bishop | 825e31e | 2017-06-14 16:38:22 -0400 | [diff] [blame] | 36 | fan.cpp \ |
Matt Spinler | 76e73c2 | 2021-04-21 11:03:05 -0500 | [diff] [blame] | 37 | get_power_state.cpp \ |
Brad Bishop | 5c58948 | 2017-06-14 22:32:20 -0400 | [diff] [blame] | 38 | gpio.cpp \ |
Matt Spinler | 635de8c | 2020-09-24 13:51:40 -0500 | [diff] [blame] | 39 | logging.cpp \ |
Brad Bishop | 6174951 | 2017-07-25 19:02:15 -0400 | [diff] [blame] | 40 | psensor.cpp \ |
Brad Bishop | dd62e36 | 2017-06-14 16:54:03 -0400 | [diff] [blame] | 41 | tach.cpp \ |
Matthew Barth | fd05d64 | 2019-11-14 15:01:57 -0600 | [diff] [blame] | 42 | tach_detect.cpp \ |
Jolie Ku | 1a56865 | 2020-08-24 16:32:15 +0800 | [diff] [blame] | 43 | json_parser.cpp |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 44 | |
| 45 | phosphor_fan_presence_tach_LDADD = \ |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 46 | $(SDBUSPLUS_LIBS) \ |
William A. Kennington III | 1cfc2f1 | 2018-10-19 17:29:46 -0700 | [diff] [blame] | 47 | $(SDEVENTPLUS_LIBS) \ |
Dinesh Chinari | 618027a | 2017-06-26 23:26:50 -0500 | [diff] [blame] | 48 | $(PHOSPHOR_LOGGING_LIBS) \ |
Brad Bishop | 8a502f5 | 2017-06-14 23:46:15 -0400 | [diff] [blame] | 49 | ${PHOSPHOR_DBUS_INTERFACES_LIBS} \ |
Matthew Barth | f3e7047 | 2019-12-03 13:33:20 -0600 | [diff] [blame] | 50 | $(LIBEVDEV_LIBS) \ |
Matthew Barth | 1826c73 | 2020-08-28 08:40:59 -0500 | [diff] [blame] | 51 | $(STDPLUS_LIBS) \ |
| 52 | $(FMT_LIBS) |
| 53 | |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 54 | phosphor_fan_presence_tach_CXXFLAGS = \ |
| 55 | $(SDBUSPLUS_CFLAGS) \ |
William A. Kennington III | 1cfc2f1 | 2018-10-19 17:29:46 -0700 | [diff] [blame] | 56 | $(SDEVENTPLUS_CFLAGS) \ |
Dinesh Chinari | 618027a | 2017-06-26 23:26:50 -0500 | [diff] [blame] | 57 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
Brad Bishop | 8a502f5 | 2017-06-14 23:46:15 -0400 | [diff] [blame] | 58 | ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \ |
Andrew Geissler | ecd4bc7 | 2018-08-27 10:52:23 -0700 | [diff] [blame] | 59 | $(LIBEVDEV_CFLAGS) \ |
Matthew Barth | f3e7047 | 2019-12-03 13:33:20 -0600 | [diff] [blame] | 60 | -flto \ |
| 61 | $(STDPLUS_CFLAGS) |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 62 | |
Matthew Barth | cc19480 | 2020-01-09 13:55:34 -0600 | [diff] [blame] | 63 | if !WANT_JSON |
Brad Bishop | 372b22c | 2017-07-12 15:57:14 -0400 | [diff] [blame] | 64 | BUILT_SOURCES = generated.hpp |
Brad Bishop | 76596b2 | 2017-06-13 14:39:13 -0400 | [diff] [blame] | 65 | TEMPLATES = \ |
| 66 | templates/generated.mako.hpp |
Brad Bishop | 9df0e16 | 2017-04-22 14:19:45 -0400 | [diff] [blame] | 67 | |
Brad Bishop | 76596b2 | 2017-06-13 14:39:13 -0400 | [diff] [blame] | 68 | generated.hpp: $(TEMPLATES) ${srcdir}/pfpgen.py $(PRESENCE_CONFIG) |
| 69 | $(AM_V_GEN)$(PFPGEN) > $(builddir)/$@ |
Matthew Barth | cc19480 | 2020-01-09 13:55:34 -0600 | [diff] [blame] | 70 | endif |