blob: c4fe3921329ab88a1ea0aa846c63960a84eb04d6 [file] [log] [blame]
Jason Lingded66d02020-10-23 14:13:03 -07001AM_DEFAULT_SOURCE_EXT = .cpp
2
3pkgdatadir = $(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
16if ENABLE_UPDATE_STATUS
17dist_pkgdata_DATA += config-static-bmc-with-update-status.json
18else
19dist_pkgdata_DATA += config-static-bmc.json
20endif
21endif
22endif
23
24if ENABLE_HOST_BIOS
25dist_pkgdata_DATA += config-bios.json
26endif
27
28if 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
33if 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
39endif
40# Convenience libraries that are discarded after build
41noinst_LTLIBRARIES = libfirmwareblob_common.la
42
43# firmware blob handler specific
44libfirmwareblob_common_la_SOURCES = \
45 buildjson.cpp \
46 firmware_handler.cpp \
47 lpc_handler.cpp
48
49if ENABLE_ASPEED_LPC
50libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
51endif
52
53if ENABLE_NUVOTON_LPC
54libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
55endif
56
57if ENABLE_ASPEED_P2A
58libfirmwareblob_common_la_SOURCES += pci_handler.cpp
59endif
60
61if ENABLE_NUVOTON_P2A_VGA
62libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
63endif
64
65if ENABLE_NUVOTON_P2A_MBOX
66libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
67endif
68
69if ENABLE_NET_BRIDGE
70libfirmwareblob_common_la_SOURCES += net_handler.cpp
71endif
72
73libfirmwareblob_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
80libfirmwareblob_common_la_LDFLAGS = \
81 $(SDBUSPLUS_LIBS) \
82 $(PHOSPHOR_LOGGING_LIBS) \
83 $(CODE_COVERAGE_LIBS) \
84 -lstdc++fs
85libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
86libfirmwareblob_common_la_LIBADD += $(top_builddir)/bmc/libbmc_common.la
87
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 -I$(top_srcdir)/bmc \
101 $(SDBUSPLUS_CFLAGS) \
102 $(PHOSPHOR_LOGGING_CFLAGS) \
103 $(CODE_COVERAGE_CXXFLAGS) \
104 -flto
105
106SUBDIRS = . test