Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 1 | AM_DEFAULT_SOURCE_EXT = .cpp |
| 2 | |
Patrick Venture | 298930a | 2019-07-03 11:44:52 -0700 | [diff] [blame^] | 3 | pkgdatadir = $(datadir)/phosphor-ipmi-flash |
| 4 | dist_pkgdata_DATA = |
| 5 | |
| 6 | # reboot update is only effective for static layout |
| 7 | # static layout is also possible with a tarball+bmc-code-mgmt |
| 8 | # |
| 9 | # the bmc-code-mgmt will reboot for us or if we need to support this |
| 10 | # variation (via the ApplyTime to immediate) (only currently supported for |
| 11 | # ubi). |
| 12 | if ENABLE_STATIC_LAYOUT |
| 13 | if ENABLE_REBOOT_UPDATE |
| 14 | dist_pkgdata_DATA += config-static-bmc-reboot.json |
| 15 | else |
| 16 | dist_pkgdata_DATA += config-static-bmc.json |
| 17 | endif |
| 18 | endif |
| 19 | |
| 20 | if ENABLE_HOST_BIOS |
| 21 | dist_pkgdata_DATA += config-bios.json |
| 22 | endif |
| 23 | |
Patrick Venture | fd18216 | 2019-07-01 07:39:31 -0700 | [diff] [blame] | 24 | if HAVE_SYSTEMD |
| 25 | systemdsystemunit_DATA = \ |
| 26 | phosphor-ipmi-flash-bmc-prepare.target \ |
| 27 | phosphor-ipmi-flash-bmc-verify.target \ |
| 28 | phosphor-ipmi-flash-bmc-update.target |
Patrick Venture | 7c2a00e | 2019-07-01 17:33:03 -0700 | [diff] [blame] | 29 | if ENABLE_HOST_BIOS |
| 30 | systemdsystemunit_DATA += \ |
| 31 | phosphor-ipmi-flash-bios-prepare.target \ |
| 32 | phosphor-ipmi-flash-bios-verify.target \ |
| 33 | phosphor-ipmi-flash-bios-update.target |
| 34 | endif |
Patrick Venture | fd18216 | 2019-07-01 07:39:31 -0700 | [diff] [blame] | 35 | endif |
| 36 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 37 | noinst_LTLIBRARIES = libfirmwareblob_common.la |
| 38 | libfirmwareblob_common_la_SOURCES = \ |
Patrick Venture | 298930a | 2019-07-03 11:44:52 -0700 | [diff] [blame^] | 39 | buildjson.cpp \ |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 40 | firmware_handler.cpp \ |
| 41 | file_handler.cpp \ |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 42 | prepare_systemd.cpp \ |
| 43 | verify_systemd.cpp \ |
Patrick Venture | 33740b9 | 2019-06-28 19:22:21 -0700 | [diff] [blame] | 44 | update_systemd.cpp \ |
| 45 | lpc_handler.cpp |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 46 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 47 | if ENABLE_ASPEED_LPC |
| 48 | libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp |
| 49 | endif |
Patrick Venture | 33740b9 | 2019-06-28 19:22:21 -0700 | [diff] [blame] | 50 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 51 | if ENABLE_NUVOTON_LPC |
| 52 | libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp |
| 53 | endif |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 54 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 55 | if ENABLE_ASPEED_P2A |
| 56 | libfirmwareblob_common_la_SOURCES += pci_handler.cpp |
| 57 | endif |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 58 | |
| 59 | libfirmwareblob_common_la_CXXFLAGS = \ |
| 60 | -I$(top_srcdir) \ |
| 61 | $(SDBUSPLUS_CFLAGS) \ |
| 62 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 63 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 64 | -flto |
| 65 | libfirmwareblob_common_la_LDFLAGS = \ |
| 66 | $(SDBUSPLUS_LIBS) \ |
| 67 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 68 | $(CODE_COVERAGE_LIBS) \ |
| 69 | -lstdc++fs |
Patrick Venture | 1ff1f93 | 2019-06-27 09:57:37 -0700 | [diff] [blame] | 70 | libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 71 | |
| 72 | libfirmwareblobdir = ${libdir}/ipmid-providers |
| 73 | libfirmwareblob_LTLIBRARIES = libfirmwareblob.la |
| 74 | libfirmwareblob_la_SOURCES = main.cpp |
| 75 | libfirmwareblob_la_LIBADD = libfirmwareblob_common.la |
| 76 | libfirmwareblob_la_LDFLAGS = \ |
| 77 | $(SDBUSPLUS_LIBS) \ |
| 78 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 79 | $(CODE_COVERAGE_LIBS) \ |
| 80 | -lstdc++fs \ |
| 81 | -version-info 0:0:0 -shared |
| 82 | libfirmwareblob_la_CXXFLAGS = \ |
| 83 | -I$(top_srcdir) \ |
| 84 | $(SDBUSPLUS_CFLAGS) \ |
| 85 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 86 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 87 | -flto |
| 88 | |
| 89 | SUBDIRS = . test |