blob: f8db30b22fc0dcf432e7eb72ac1dafa5254aa1ee [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
16dist_pkgdata_DATA += config-static-bmc.json
17endif
18endif
19
20if ENABLE_HOST_BIOS
21dist_pkgdata_DATA += config-bios.json
22endif
23
Patrick Venturefd182162019-07-01 07:39:31 -070024if HAVE_SYSTEMD
25systemdsystemunit_DATA = \
26 phosphor-ipmi-flash-bmc-prepare.target \
27 phosphor-ipmi-flash-bmc-verify.target \
28 phosphor-ipmi-flash-bmc-update.target
Patrick Venture7c2a00e2019-07-01 17:33:03 -070029if ENABLE_HOST_BIOS
30systemdsystemunit_DATA += \
31 phosphor-ipmi-flash-bios-prepare.target \
32 phosphor-ipmi-flash-bios-verify.target \
33 phosphor-ipmi-flash-bios-update.target
34endif
Patrick Venturefd182162019-07-01 07:39:31 -070035endif
36
Patrick Venturef0c71df2019-06-26 19:39:36 -070037noinst_LTLIBRARIES = libfirmwareblob_common.la
38libfirmwareblob_common_la_SOURCES = \
Patrick Venture298930a2019-07-03 11:44:52 -070039 buildjson.cpp \
Patrick Venturea6b4abd2019-07-19 10:58:55 -070040 fs.cpp \
Patrick Venturef0c71df2019-06-26 19:39:36 -070041 firmware_handler.cpp \
42 file_handler.cpp \
Patrick Venturecf066ac2019-08-06 09:03:47 -070043 general_systemd.cpp \
Patrick Venture33740b92019-06-28 19:22:21 -070044 lpc_handler.cpp
Patrick Venturef0c71df2019-06-26 19:39:36 -070045
Patrick Venturef0c71df2019-06-26 19:39:36 -070046if ENABLE_ASPEED_LPC
47libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
48endif
Patrick Venture33740b92019-06-28 19:22:21 -070049
Patrick Venturef0c71df2019-06-26 19:39:36 -070050if ENABLE_NUVOTON_LPC
51libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
52endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070053
Patrick Venturef0c71df2019-06-26 19:39:36 -070054if ENABLE_ASPEED_P2A
55libfirmwareblob_common_la_SOURCES += pci_handler.cpp
56endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070057
58libfirmwareblob_common_la_CXXFLAGS = \
59 -I$(top_srcdir) \
60 $(SDBUSPLUS_CFLAGS) \
61 $(PHOSPHOR_LOGGING_CFLAGS) \
62 $(CODE_COVERAGE_CXXFLAGS) \
63 -flto
64libfirmwareblob_common_la_LDFLAGS = \
65 $(SDBUSPLUS_LIBS) \
66 $(PHOSPHOR_LOGGING_LIBS) \
67 $(CODE_COVERAGE_LIBS) \
68 -lstdc++fs
Patrick Venture1ff1f932019-06-27 09:57:37 -070069libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
Patrick Venturef0c71df2019-06-26 19:39:36 -070070
71libfirmwareblobdir = ${libdir}/ipmid-providers
72libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
73libfirmwareblob_la_SOURCES = main.cpp
74libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
75libfirmwareblob_la_LDFLAGS = \
76 $(SDBUSPLUS_LIBS) \
77 $(PHOSPHOR_LOGGING_LIBS) \
78 $(CODE_COVERAGE_LIBS) \
79 -lstdc++fs \
80 -version-info 0:0:0 -shared
81libfirmwareblob_la_CXXFLAGS = \
82 -I$(top_srcdir) \
83 $(SDBUSPLUS_CFLAGS) \
84 $(PHOSPHOR_LOGGING_CFLAGS) \
85 $(CODE_COVERAGE_CXXFLAGS) \
86 -flto
87
88SUBDIRS = . test