blob: ef1a45596099ab0fa79112d09106868bc3af0d7a [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 Venturef0c71df2019-06-26 19:39:36 -070040 firmware_handler.cpp \
41 file_handler.cpp \
Patrick Venturef0c71df2019-06-26 19:39:36 -070042 prepare_systemd.cpp \
43 verify_systemd.cpp \
Patrick Venture33740b92019-06-28 19:22:21 -070044 update_systemd.cpp \
45 lpc_handler.cpp
Patrick Venturef0c71df2019-06-26 19:39:36 -070046
Patrick Venturef0c71df2019-06-26 19:39:36 -070047if ENABLE_ASPEED_LPC
48libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
49endif
Patrick Venture33740b92019-06-28 19:22:21 -070050
Patrick Venturef0c71df2019-06-26 19:39:36 -070051if ENABLE_NUVOTON_LPC
52libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
53endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070054
Patrick Venturef0c71df2019-06-26 19:39:36 -070055if ENABLE_ASPEED_P2A
56libfirmwareblob_common_la_SOURCES += pci_handler.cpp
57endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070058
59libfirmwareblob_common_la_CXXFLAGS = \
60 -I$(top_srcdir) \
61 $(SDBUSPLUS_CFLAGS) \
62 $(PHOSPHOR_LOGGING_CFLAGS) \
63 $(CODE_COVERAGE_CXXFLAGS) \
64 -flto
65libfirmwareblob_common_la_LDFLAGS = \
66 $(SDBUSPLUS_LIBS) \
67 $(PHOSPHOR_LOGGING_LIBS) \
68 $(CODE_COVERAGE_LIBS) \
69 -lstdc++fs
Patrick Venture1ff1f932019-06-27 09:57:37 -070070libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
Patrick Venturef0c71df2019-06-26 19:39:36 -070071
72libfirmwareblobdir = ${libdir}/ipmid-providers
73libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
74libfirmwareblob_la_SOURCES = main.cpp
75libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
76libfirmwareblob_la_LDFLAGS = \
77 $(SDBUSPLUS_LIBS) \
78 $(PHOSPHOR_LOGGING_LIBS) \
79 $(CODE_COVERAGE_LIBS) \
80 -lstdc++fs \
81 -version-info 0:0:0 -shared
82libfirmwareblob_la_CXXFLAGS = \
83 -I$(top_srcdir) \
84 $(SDBUSPLUS_CFLAGS) \
85 $(PHOSPHOR_LOGGING_CFLAGS) \
86 $(CODE_COVERAGE_CXXFLAGS) \
87 -flto
88
89SUBDIRS = . test