blob: 1ec7aa3531d26f9812cefdc900e15ade551bbefe [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
William A. Kennington III43344a12021-01-29 11:48:31 -080028if HAVE_TMPFILESDIR
29tmpfiles_DATA = \
30 phosphor-ipmi-flash.conf
31endif
32
William A. Kennington III22f8bf32021-01-29 03:15:25 -080033if HAVE_SYSTEMUNITDIR
Jason Lingded66d02020-10-23 14:13:03 -070034systemdsystemunit_DATA = \
35 phosphor-ipmi-flash-bmc-prepare.target \
36 phosphor-ipmi-flash-bmc-verify.target \
37 phosphor-ipmi-flash-bmc-update.target
38if ENABLE_HOST_BIOS
39systemdsystemunit_DATA += \
40 phosphor-ipmi-flash-bios-prepare.target \
41 phosphor-ipmi-flash-bios-verify.target \
42 phosphor-ipmi-flash-bios-update.target
43endif
44endif
William A. Kennington III22f8bf32021-01-29 03:15:25 -080045
Jason Lingded66d02020-10-23 14:13:03 -070046# Convenience libraries that are discarded after build
47noinst_LTLIBRARIES = libfirmwareblob_common.la
48
49# firmware blob handler specific
50libfirmwareblob_common_la_SOURCES = \
Jason Lingc893f432020-10-24 19:31:44 -070051 firmware_handlers_builder.cpp \
Jason Lingded66d02020-10-23 14:13:03 -070052 firmware_handler.cpp \
53 lpc_handler.cpp
54
55if ENABLE_ASPEED_LPC
56libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
57endif
58
59if ENABLE_NUVOTON_LPC
60libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
61endif
62
63if ENABLE_ASPEED_P2A
64libfirmwareblob_common_la_SOURCES += pci_handler.cpp
65endif
66
67if ENABLE_NUVOTON_P2A_VGA
68libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
69endif
70
71if ENABLE_NUVOTON_P2A_MBOX
72libfirmwareblob_common_la_SOURCES += pci_nuvoton_handler.cpp
73endif
74
75if ENABLE_NET_BRIDGE
76libfirmwareblob_common_la_SOURCES += net_handler.cpp
77endif
78
79libfirmwareblob_common_la_CXXFLAGS = \
80 -I$(top_srcdir) \
81 -I$(top_srcdir)/bmc \
82 $(SDBUSPLUS_CFLAGS) \
William A. Kennington III6ee93c62020-12-22 13:01:15 -080083 $(PHOSPHOR_LOGGING_CFLAGS) \
84 $(CODE_COVERAGE_CXXFLAGS) \
85 -flto
Jason Lingded66d02020-10-23 14:13:03 -070086libfirmwareblob_common_la_LDFLAGS = \
William A. Kennington III6ee93c62020-12-22 13:01:15 -080087 $(SDBUSPLUS_LIBS) \
88 $(PHOSPHOR_LOGGING_LIBS) \
89 $(CODE_COVERAGE_LIBS) \
90 -lstdc++fs
Jason Lingded66d02020-10-23 14:13:03 -070091libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
92libfirmwareblob_common_la_LIBADD += $(top_builddir)/bmc/libbmc_common.la
93
94libfirmwareblobdir = ${libdir}/ipmid-providers
95libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
96libfirmwareblob_la_SOURCES = main.cpp
97libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
98libfirmwareblob_la_LDFLAGS = \
99 $(SDBUSPLUS_LIBS) \
100 $(PHOSPHOR_LOGGING_LIBS) \
101 $(CODE_COVERAGE_LIBS) \
102 -lstdc++fs \
103 -version-info 0:0:0 -shared
104libfirmwareblob_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
112SUBDIRS = . test