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 |
Brandon Kim | cec91dd | 2019-09-16 17:24:40 -0700 | [diff] [blame] | 16 | if ENABLE_UPDATE_STATUS |
| 17 | dist_pkgdata_DATA += config-static-bmc-with-update-status.json |
| 18 | else |
Patrick Venture | 298930a | 2019-07-03 11:44:52 -0700 | [diff] [blame] | 19 | dist_pkgdata_DATA += config-static-bmc.json |
| 20 | endif |
| 21 | endif |
Brandon Kim | cec91dd | 2019-09-16 17:24:40 -0700 | [diff] [blame] | 22 | endif |
Patrick Venture | 298930a | 2019-07-03 11:44:52 -0700 | [diff] [blame] | 23 | |
| 24 | if ENABLE_HOST_BIOS |
| 25 | dist_pkgdata_DATA += config-bios.json |
| 26 | endif |
| 27 | |
Patrick Venture | fd18216 | 2019-07-01 07:39:31 -0700 | [diff] [blame] | 28 | if HAVE_SYSTEMD |
| 29 | systemdsystemunit_DATA = \ |
| 30 | phosphor-ipmi-flash-bmc-prepare.target \ |
| 31 | phosphor-ipmi-flash-bmc-verify.target \ |
| 32 | phosphor-ipmi-flash-bmc-update.target |
Patrick Venture | 7c2a00e | 2019-07-01 17:33:03 -0700 | [diff] [blame] | 33 | if ENABLE_HOST_BIOS |
| 34 | systemdsystemunit_DATA += \ |
| 35 | phosphor-ipmi-flash-bios-prepare.target \ |
| 36 | phosphor-ipmi-flash-bios-verify.target \ |
| 37 | phosphor-ipmi-flash-bios-update.target |
| 38 | endif |
Patrick Venture | fd18216 | 2019-07-01 07:39:31 -0700 | [diff] [blame] | 39 | endif |
| 40 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 41 | noinst_LTLIBRARIES = libfirmwareblob_common.la |
| 42 | libfirmwareblob_common_la_SOURCES = \ |
Patrick Venture | 298930a | 2019-07-03 11:44:52 -0700 | [diff] [blame] | 43 | buildjson.cpp \ |
Patrick Venture | a6b4abd | 2019-07-19 10:58:55 -0700 | [diff] [blame] | 44 | fs.cpp \ |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 45 | firmware_handler.cpp \ |
| 46 | file_handler.cpp \ |
Patrick Venture | cf066ac | 2019-08-06 09:03:47 -0700 | [diff] [blame] | 47 | general_systemd.cpp \ |
Patrick Venture | 33740b9 | 2019-06-28 19:22:21 -0700 | [diff] [blame] | 48 | lpc_handler.cpp |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 49 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 50 | if ENABLE_ASPEED_LPC |
| 51 | libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp |
| 52 | endif |
Patrick Venture | 33740b9 | 2019-06-28 19:22:21 -0700 | [diff] [blame] | 53 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 54 | if ENABLE_NUVOTON_LPC |
| 55 | libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp |
| 56 | endif |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 57 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 58 | if ENABLE_ASPEED_P2A |
| 59 | libfirmwareblob_common_la_SOURCES += pci_handler.cpp |
| 60 | endif |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 61 | |
Medad CChien | 874bdf9 | 2019-10-31 14:38:15 +0800 | [diff] [blame] | 62 | if ENABLE_NUVOTON_P2A_VGA |
| 63 | libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp |
| 64 | endif |
| 65 | |
| 66 | if ENABLE_NUVOTON_P2A_MBOX |
| 67 | libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp |
| 68 | endif |
| 69 | |
Benjamin Fair | 545f565 | 2019-10-09 14:18:54 -0700 | [diff] [blame^] | 70 | if ENABLE_NET_BRIDGE |
| 71 | libfirmwareblob_common_la_SOURCES += net_handler.cpp |
| 72 | endif |
| 73 | |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 74 | libfirmwareblob_common_la_CXXFLAGS = \ |
| 75 | -I$(top_srcdir) \ |
| 76 | $(SDBUSPLUS_CFLAGS) \ |
| 77 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 78 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 79 | -flto |
| 80 | libfirmwareblob_common_la_LDFLAGS = \ |
| 81 | $(SDBUSPLUS_LIBS) \ |
| 82 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 83 | $(CODE_COVERAGE_LIBS) \ |
| 84 | -lstdc++fs |
Patrick Venture | 1ff1f93 | 2019-06-27 09:57:37 -0700 | [diff] [blame] | 85 | libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la |
Patrick Venture | f0c71df | 2019-06-26 19:39:36 -0700 | [diff] [blame] | 86 | |
| 87 | libfirmwareblobdir = ${libdir}/ipmid-providers |
| 88 | libfirmwareblob_LTLIBRARIES = libfirmwareblob.la |
| 89 | libfirmwareblob_la_SOURCES = main.cpp |
| 90 | libfirmwareblob_la_LIBADD = libfirmwareblob_common.la |
| 91 | libfirmwareblob_la_LDFLAGS = \ |
| 92 | $(SDBUSPLUS_LIBS) \ |
| 93 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 94 | $(CODE_COVERAGE_LIBS) \ |
| 95 | -lstdc++fs \ |
| 96 | -version-info 0:0:0 -shared |
| 97 | libfirmwareblob_la_CXXFLAGS = \ |
| 98 | -I$(top_srcdir) \ |
| 99 | $(SDBUSPLUS_CFLAGS) \ |
| 100 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 101 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 102 | -flto |
| 103 | |
| 104 | SUBDIRS = . test |