blob: 63c90b4adbc39ad406a149b0b2b6456f43d9b89a [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 Venture33740b92019-06-28 19:22:21 -070048 lpc_handler.cpp
Patrick Venturef0c71df2019-06-26 19:39:36 -070049
Patrick Venturef0c71df2019-06-26 19:39:36 -070050if ENABLE_ASPEED_LPC
51libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
52endif
Patrick Venture33740b92019-06-28 19:22:21 -070053
Patrick Venturef0c71df2019-06-26 19:39:36 -070054if ENABLE_NUVOTON_LPC
55libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
56endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070057
Patrick Venturef0c71df2019-06-26 19:39:36 -070058if ENABLE_ASPEED_P2A
59libfirmwareblob_common_la_SOURCES += pci_handler.cpp
60endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070061
Medad CChien874bdf92019-10-31 14:38:15 +080062if ENABLE_NUVOTON_P2A_VGA
63libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
64endif
65
66if ENABLE_NUVOTON_P2A_MBOX
67libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
68endif
69
Benjamin Fair545f5652019-10-09 14:18:54 -070070if ENABLE_NET_BRIDGE
71libfirmwareblob_common_la_SOURCES += net_handler.cpp
72endif
73
Patrick Venturef0c71df2019-06-26 19:39:36 -070074libfirmwareblob_common_la_CXXFLAGS = \
75 -I$(top_srcdir) \
76 $(SDBUSPLUS_CFLAGS) \
77 $(PHOSPHOR_LOGGING_CFLAGS) \
78 $(CODE_COVERAGE_CXXFLAGS) \
79 -flto
80libfirmwareblob_common_la_LDFLAGS = \
81 $(SDBUSPLUS_LIBS) \
82 $(PHOSPHOR_LOGGING_LIBS) \
83 $(CODE_COVERAGE_LIBS) \
84 -lstdc++fs
Patrick Venture1ff1f932019-06-27 09:57:37 -070085libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
Patrick Venturef0c71df2019-06-26 19:39:36 -070086
87libfirmwareblobdir = ${libdir}/ipmid-providers
88libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
89libfirmwareblob_la_SOURCES = main.cpp
90libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
91libfirmwareblob_la_LDFLAGS = \
92 $(SDBUSPLUS_LIBS) \
93 $(PHOSPHOR_LOGGING_LIBS) \
94 $(CODE_COVERAGE_LIBS) \
95 -lstdc++fs \
96 -version-info 0:0:0 -shared
97libfirmwareblob_la_CXXFLAGS = \
98 -I$(top_srcdir) \
99 $(SDBUSPLUS_CFLAGS) \
100 $(PHOSPHOR_LOGGING_CFLAGS) \
101 $(CODE_COVERAGE_CXXFLAGS) \
102 -flto
103
104SUBDIRS = . test