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 | |
William A. Kennington III | 22f8bf3 | 2021-01-29 03:15:25 -0800 | [diff] [blame^] | 28 | if HAVE_SYSTEMUNITDIR |
Jason Ling | ded66d0 | 2020-10-23 14:13:03 -0700 | [diff] [blame] | 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 |
William A. Kennington III | 22f8bf3 | 2021-01-29 03:15:25 -0800 | [diff] [blame^] | 40 | |
Jason Ling | ded66d0 | 2020-10-23 14:13:03 -0700 | [diff] [blame] | 41 | # Convenience libraries that are discarded after build |
| 42 | noinst_LTLIBRARIES = libfirmwareblob_common.la |
| 43 | |
| 44 | # firmware blob handler specific |
| 45 | libfirmwareblob_common_la_SOURCES = \ |
Jason Ling | c893f43 | 2020-10-24 19:31:44 -0700 | [diff] [blame] | 46 | firmware_handlers_builder.cpp \ |
Jason Ling | ded66d0 | 2020-10-23 14:13:03 -0700 | [diff] [blame] | 47 | firmware_handler.cpp \ |
| 48 | lpc_handler.cpp |
| 49 | |
| 50 | if ENABLE_ASPEED_LPC |
| 51 | libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp |
| 52 | endif |
| 53 | |
| 54 | if ENABLE_NUVOTON_LPC |
| 55 | libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp |
| 56 | endif |
| 57 | |
| 58 | if ENABLE_ASPEED_P2A |
| 59 | libfirmwareblob_common_la_SOURCES += pci_handler.cpp |
| 60 | endif |
| 61 | |
| 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 | |
| 70 | if ENABLE_NET_BRIDGE |
| 71 | libfirmwareblob_common_la_SOURCES += net_handler.cpp |
| 72 | endif |
| 73 | |
| 74 | libfirmwareblob_common_la_CXXFLAGS = \ |
| 75 | -I$(top_srcdir) \ |
| 76 | -I$(top_srcdir)/bmc \ |
| 77 | $(SDBUSPLUS_CFLAGS) \ |
William A. Kennington III | 6ee93c6 | 2020-12-22 13:01:15 -0800 | [diff] [blame] | 78 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 79 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 80 | -flto |
Jason Ling | ded66d0 | 2020-10-23 14:13:03 -0700 | [diff] [blame] | 81 | libfirmwareblob_common_la_LDFLAGS = \ |
William A. Kennington III | 6ee93c6 | 2020-12-22 13:01:15 -0800 | [diff] [blame] | 82 | $(SDBUSPLUS_LIBS) \ |
| 83 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 84 | $(CODE_COVERAGE_LIBS) \ |
| 85 | -lstdc++fs |
Jason Ling | ded66d0 | 2020-10-23 14:13:03 -0700 | [diff] [blame] | 86 | libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la |
| 87 | libfirmwareblob_common_la_LIBADD += $(top_builddir)/bmc/libbmc_common.la |
| 88 | |
| 89 | libfirmwareblobdir = ${libdir}/ipmid-providers |
| 90 | libfirmwareblob_LTLIBRARIES = libfirmwareblob.la |
| 91 | libfirmwareblob_la_SOURCES = main.cpp |
| 92 | libfirmwareblob_la_LIBADD = libfirmwareblob_common.la |
| 93 | libfirmwareblob_la_LDFLAGS = \ |
| 94 | $(SDBUSPLUS_LIBS) \ |
| 95 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 96 | $(CODE_COVERAGE_LIBS) \ |
| 97 | -lstdc++fs \ |
| 98 | -version-info 0:0:0 -shared |
| 99 | libfirmwareblob_la_CXXFLAGS = \ |
| 100 | -I$(top_srcdir) \ |
| 101 | -I$(top_srcdir)/bmc \ |
| 102 | $(SDBUSPLUS_CFLAGS) \ |
| 103 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 104 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 105 | -flto |
| 106 | |
| 107 | SUBDIRS = . test |