Jason Ling | ded66d0 | 2020-10-23 14:13:03 -0700 | [diff] [blame^] | 1 | AM_DEFAULT_SOURCE_EXT = .cpp |
| 2 | |
| 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 | if ENABLE_UPDATE_STATUS |
| 17 | dist_pkgdata_DATA += config-static-bmc-with-update-status.json |
| 18 | else |
| 19 | dist_pkgdata_DATA += config-static-bmc.json |
| 20 | endif |
| 21 | endif |
| 22 | endif |
| 23 | |
| 24 | if ENABLE_HOST_BIOS |
| 25 | dist_pkgdata_DATA += config-bios.json |
| 26 | endif |
| 27 | |
| 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 |
| 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 |
| 39 | endif |
| 40 | # Convenience libraries that are discarded after build |
| 41 | noinst_LTLIBRARIES = libfirmwareblob_common.la |
| 42 | |
| 43 | # firmware blob handler specific |
| 44 | libfirmwareblob_common_la_SOURCES = \ |
| 45 | buildjson.cpp \ |
| 46 | firmware_handler.cpp \ |
| 47 | lpc_handler.cpp |
| 48 | |
| 49 | if ENABLE_ASPEED_LPC |
| 50 | libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp |
| 51 | endif |
| 52 | |
| 53 | if ENABLE_NUVOTON_LPC |
| 54 | libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp |
| 55 | endif |
| 56 | |
| 57 | if ENABLE_ASPEED_P2A |
| 58 | libfirmwareblob_common_la_SOURCES += pci_handler.cpp |
| 59 | endif |
| 60 | |
| 61 | if ENABLE_NUVOTON_P2A_VGA |
| 62 | libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp |
| 63 | endif |
| 64 | |
| 65 | if ENABLE_NUVOTON_P2A_MBOX |
| 66 | libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp |
| 67 | endif |
| 68 | |
| 69 | if ENABLE_NET_BRIDGE |
| 70 | libfirmwareblob_common_la_SOURCES += net_handler.cpp |
| 71 | endif |
| 72 | |
| 73 | libfirmwareblob_common_la_CXXFLAGS = \ |
| 74 | -I$(top_srcdir) \ |
| 75 | -I$(top_srcdir)/bmc \ |
| 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 |
| 85 | libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la |
| 86 | libfirmwareblob_common_la_LIBADD += $(top_builddir)/bmc/libbmc_common.la |
| 87 | |
| 88 | libfirmwareblobdir = ${libdir}/ipmid-providers |
| 89 | libfirmwareblob_LTLIBRARIES = libfirmwareblob.la |
| 90 | libfirmwareblob_la_SOURCES = main.cpp |
| 91 | libfirmwareblob_la_LIBADD = libfirmwareblob_common.la |
| 92 | libfirmwareblob_la_LDFLAGS = \ |
| 93 | $(SDBUSPLUS_LIBS) \ |
| 94 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 95 | $(CODE_COVERAGE_LIBS) \ |
| 96 | -lstdc++fs \ |
| 97 | -version-info 0:0:0 -shared |
| 98 | libfirmwareblob_la_CXXFLAGS = \ |
| 99 | -I$(top_srcdir) \ |
| 100 | -I$(top_srcdir)/bmc \ |
| 101 | $(SDBUSPLUS_CFLAGS) \ |
| 102 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 103 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 104 | -flto |
| 105 | |
| 106 | SUBDIRS = . test |