blob: a33a63e1553ce47561dd2f709465ebd829bcefbc [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 Venturef0c71df2019-06-26 19:39:36 -070043 prepare_systemd.cpp \
Patrick Venturecf066ac2019-08-06 09:03:47 -070044 general_systemd.cpp \
Patrick Venture33740b92019-06-28 19:22:21 -070045 update_systemd.cpp \
46 lpc_handler.cpp
Patrick Venturef0c71df2019-06-26 19:39:36 -070047
Patrick Venturef0c71df2019-06-26 19:39:36 -070048if ENABLE_ASPEED_LPC
49libfirmwareblob_common_la_SOURCES += lpc_aspeed.cpp
50endif
Patrick Venture33740b92019-06-28 19:22:21 -070051
Patrick Venturef0c71df2019-06-26 19:39:36 -070052if ENABLE_NUVOTON_LPC
53libfirmwareblob_common_la_SOURCES += lpc_nuvoton.cpp
54endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070055
Patrick Venturef0c71df2019-06-26 19:39:36 -070056if ENABLE_ASPEED_P2A
57libfirmwareblob_common_la_SOURCES += pci_handler.cpp
58endif
Patrick Venturef0c71df2019-06-26 19:39:36 -070059
60libfirmwareblob_common_la_CXXFLAGS = \
61 -I$(top_srcdir) \
62 $(SDBUSPLUS_CFLAGS) \
63 $(PHOSPHOR_LOGGING_CFLAGS) \
64 $(CODE_COVERAGE_CXXFLAGS) \
65 -flto
66libfirmwareblob_common_la_LDFLAGS = \
67 $(SDBUSPLUS_LIBS) \
68 $(PHOSPHOR_LOGGING_LIBS) \
69 $(CODE_COVERAGE_LIBS) \
70 -lstdc++fs
Patrick Venture1ff1f932019-06-27 09:57:37 -070071libfirmwareblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
Patrick Venturef0c71df2019-06-26 19:39:36 -070072
73libfirmwareblobdir = ${libdir}/ipmid-providers
74libfirmwareblob_LTLIBRARIES = libfirmwareblob.la
75libfirmwareblob_la_SOURCES = main.cpp
76libfirmwareblob_la_LIBADD = libfirmwareblob_common.la
77libfirmwareblob_la_LDFLAGS = \
78 $(SDBUSPLUS_LIBS) \
79 $(PHOSPHOR_LOGGING_LIBS) \
80 $(CODE_COVERAGE_LIBS) \
81 -lstdc++fs \
82 -version-info 0:0:0 -shared
83libfirmwareblob_la_CXXFLAGS = \
84 -I$(top_srcdir) \
85 $(SDBUSPLUS_CFLAGS) \
86 $(PHOSPHOR_LOGGING_CFLAGS) \
87 $(CODE_COVERAGE_CXXFLAGS) \
88 -flto
89
90SUBDIRS = . test