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