blob: 993b8811a7dd7990e1ba2add0c673d137b27bcb3 [file] [log] [blame]
Patrick Venturef0c71df2019-06-26 19:39:36 -07001AM_DEFAULT_SOURCE_EXT = .cpp
2
Patrick Venture298930a2019-07-03 11:44:52 -07003pkgdatadir = $(datadir)/phosphor-ipmi-flash
4dist_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).
12if ENABLE_STATIC_LAYOUT
13if ENABLE_REBOOT_UPDATE
14dist_pkgdata_DATA += config-static-bmc-reboot.json
15else
Brandon Kimcec91dd2019-09-16 17:24:40 -070016if ENABLE_UPDATE_STATUS
17dist_pkgdata_DATA += config-static-bmc-with-update-status.json
18else
Patrick Venture298930a2019-07-03 11:44:52 -070019dist_pkgdata_DATA += config-static-bmc.json
20endif
21endif
Brandon Kimcec91dd2019-09-16 17:24:40 -070022endif
Patrick Venture298930a2019-07-03 11:44:52 -070023
24if ENABLE_HOST_BIOS
25dist_pkgdata_DATA += config-bios.json
26endif
27
Patrick Venturefd182162019-07-01 07:39:31 -070028if HAVE_SYSTEMD
29systemdsystemunit_DATA = \
30 phosphor-ipmi-flash-bmc-prepare.target \
31 phosphor-ipmi-flash-bmc-verify.target \
32 phosphor-ipmi-flash-bmc-update.target
Patrick Venture7c2a00e2019-07-01 17:33:03 -070033if ENABLE_HOST_BIOS
34systemdsystemunit_DATA += \
35 phosphor-ipmi-flash-bios-prepare.target \
36 phosphor-ipmi-flash-bios-verify.target \
37 phosphor-ipmi-flash-bios-update.target
38endif
Patrick Venturefd182162019-07-01 07:39:31 -070039endif
40
Patrick Venturef0c71df2019-06-26 19:39:36 -070041noinst_LTLIBRARIES = libfirmwareblob_common.la
42libfirmwareblob_common_la_SOURCES = \
Patrick Venture298930a2019-07-03 11:44:52 -070043 buildjson.cpp \
Patrick Venturea6b4abd2019-07-19 10:58:55 -070044 fs.cpp \
Patrick Venturef0c71df2019-06-26 19:39:36 -070045 firmware_handler.cpp \
46 file_handler.cpp \
Patrick Venturecf066ac2019-08-06 09:03:47 -070047 general_systemd.cpp \
Patrick Ventured53d60a2020-04-07 09:01:34 -070048 lpc_handler.cpp \
49 skip_action.cpp
Patrick Venturef0c71df2019-06-26 19:39:36 -070050
Patrick Venturef0c71df2019-06-26 19:39:36 -070051if ENABLE_ASPEED_LPC
52libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
53endif
Patrick Venture33740b92019-06-28 19:22:21 -070054
Patrick Venturef0c71df2019-06-26 19:39:36 -070055if ENABLE_NUVOTON_LPC
56libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
57endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070058
Patrick Venturef0c71df2019-06-26 19:39:36 -070059if ENABLE_ASPEED_P2A
60libfirmwareblob_common_la_SOURCES += pci_handler.cpp
61endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070062
Medad CChien874bdf92019-10-31 14:38:15 +080063if ENABLE_NUVOTON_P2A_VGA
64libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
65endif
66
67if ENABLE_NUVOTON_P2A_MBOX
68libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
69endif
70
Benjamin Fair545f5652019-10-09 14:18:54 -070071if ENABLE_NET_BRIDGE
72libfirmwareblob_common_la_SOURCES += net_handler.cpp
73endif
74
Patrick Venturef0c71df2019-06-26 19:39:36 -070075libfirmwareblob_common_la_CXXFLAGS = \
76 -I$(top_srcdir) \
77 $(SDBUSPLUS_CFLAGS) \
78 $(PHOSPHOR_LOGGING_CFLAGS) \
79 $(CODE_COVERAGE_CXXFLAGS) \
80 -flto
81libfirmwareblob_common_la_LDFLAGS = \
82 $(SDBUSPLUS_LIBS) \
83 $(PHOSPHOR_LOGGING_LIBS) \
84 $(CODE_COVERAGE_LIBS) \
85 -lstdc++fs
Patrick Venture1ff1f932019-06-27 09:57:37 -070086libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
Patrick Venturef0c71df2019-06-26 19:39:36 -070087
88libfirmwareblobdir = ${libdir}/ipmid-providers
89libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
90libfirmwareblob_la_SOURCES = main.cpp
91libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
92libfirmwareblob_la_LDFLAGS = \
93 $(SDBUSPLUS_LIBS) \
94 $(PHOSPHOR_LOGGING_LIBS) \
95 $(CODE_COVERAGE_LIBS) \
96 -lstdc++fs \
97 -version-info 0:0:0 -shared
98libfirmwareblob_la_CXXFLAGS = \
99 -I$(top_srcdir) \
100 $(SDBUSPLUS_CFLAGS) \
101 $(PHOSPHOR_LOGGING_CFLAGS) \
102 $(CODE_COVERAGE_CXXFLAGS) \
103 -flto
104
105SUBDIRS = . test