blob: 293867efa23ff6a92cc07e457430c82290968741 [file] [log] [blame]
Gunnar Mills01a323b2017-01-18 09:48:13 -06001AM_DEFAULT_SOURCE_EXT = .cpp
2
Deepak Kodihalli059e2332017-04-12 06:40:53 -05003# Build these headers, don't install them
4noinst_HEADERS = \
Deepak Kodihalli059e2332017-04-12 06:40:53 -05005 download_manager.hpp \
Gunnar Millse91d3212017-04-19 15:42:47 -05006 watch.hpp \
7 version.hpp \
Lei YU1be8d502018-06-20 11:48:36 +08008 images.hpp \
Gunnar Millsec1b41c2017-05-02 12:20:36 -05009 image_manager.hpp \
Saqib Khanb0774702017-05-23 16:02:41 -050010 item_updater.hpp \
Lei YU56aaf452018-06-21 16:09:44 +080011 activation.hpp \
12 flash.hpp \
Jayashankar Padatha0135602019-04-22 16:22:58 +053013 item_updater_helper.hpp \
14 utils.hpp
Deepak Kodihalli059e2332017-04-12 06:40:53 -050015
Patrick Ventureab8231c2019-03-28 12:41:34 -070016bin_PROGRAMS = \
Gunnar Mills701e0212017-04-03 11:21:27 -050017 phosphor-version-software-manager \
Gunnar Millsec1b41c2017-05-02 12:20:36 -050018 phosphor-download-manager \
19 phosphor-image-updater
Gunnar Mills01a323b2017-01-18 09:48:13 -060020
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050021dist_bin_SCRIPTS = \
22 obmc-flash-bmc
23
Gunnar Mills01a323b2017-01-18 09:48:13 -060024phosphor_version_software_manager_SOURCES = \
Deepak Kodihalli059e2332017-04-12 06:40:53 -050025 image_manager_main.cpp \
Gunnar Millse91d3212017-04-19 15:42:47 -050026 watch.cpp \
27 version.cpp \
28 image_manager.cpp
Gunnar Mills01a323b2017-01-18 09:48:13 -060029
Gunnar Mills93c12d32017-05-10 13:11:53 -050030BUILT_SOURCES = \
Adriana Kobylak43699ca2018-10-17 14:56:29 -050031 xyz/openbmc_project/Software/Image/error.cpp \
John Wang85c356f2019-09-11 16:20:13 +080032 xyz/openbmc_project/Software/Image/error.hpp
Gunnar Mills93c12d32017-05-10 13:11:53 -050033
34CLEANFILES = ${BUILT_SOURCES}
35
Gunnar Mills701e0212017-04-03 11:21:27 -050036phosphor_download_manager_SOURCES = \
37 download_manager.cpp \
38 download_manager_main.cpp
39
Gunnar Millsec1b41c2017-05-02 12:20:36 -050040phosphor_image_updater_SOURCES = \
Saqib Khanb0774702017-05-23 16:02:41 -050041 activation.cpp \
Saqib Khan705f1bf2017-06-09 23:58:38 -050042 version.cpp \
Saqib Khan5d532672017-08-09 10:44:50 -050043 serialize.cpp \
Gunnar Millsec1b41c2017-05-02 12:20:36 -050044 item_updater.cpp \
Jayashankar Padatha0135602019-04-22 16:22:58 +053045 item_updater_main.cpp \
46 utils.cpp
Jayanth Othayoth0e0c1272018-02-21 05:46:36 -060047
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050048if HAVE_SYSTEMD
49systemdsystemunit_DATA = \
50 obmc-flash-bmc-setenv@.service \
Adriana Kobylak375547c2019-10-25 12:59:57 -050051 usr-local.mount \
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050052 xyz.openbmc_project.Software.BMC.Updater.service \
53 xyz.openbmc_project.Software.Download.service \
54 xyz.openbmc_project.Software.Sync.service \
55 xyz.openbmc_project.Software.Version.service
56
Vijay Khemka93416182020-01-23 10:18:06 -080057if HOST_BIOS_UPGRADE
58systemdsystemunit_DATA += obmc-flash-host-bios@.service
59endif
60
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050061tmpfilesdir=${exec_prefix}/lib/tmpfiles.d/
62dist_tmpfiles_DATA = \
63 software.conf
64endif
65
Lei YUa7853ee2018-05-23 11:13:12 +080066if UBIFS_LAYOUT
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -050067include ubi/Makefile.am.include
Lei YUa7853ee2018-05-23 11:13:12 +080068else
69include static/Makefile.am.include
70endif
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -050071
Jayanth Othayoth0e0c1272018-02-21 05:46:36 -060072if WANT_SIGNATURE_VERIFY_BUILD
Adriana Kobylak5ed9b2d2018-09-06 13:15:34 -050073noinst_HEADERS += \
74 image_verify.hpp \
Jayashankar Padatha0135602019-04-22 16:22:58 +053075 openssl_alloc.hpp
Adriana Kobylak5ed9b2d2018-09-06 13:15:34 -050076phosphor_image_updater_SOURCES += \
77 image_verify.cpp \
Jayashankar Padatha0135602019-04-22 16:22:58 +053078 openssl_alloc.cpp
Jayanth Othayoth0e0c1272018-02-21 05:46:36 -060079endif
Gunnar Mills652da832017-08-29 08:34:54 -050080
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050081if WANT_SYNC
Adriana Kobylakb072d1b2018-04-24 11:37:21 -050082noinst_HEADERS += \
83 sync_manager.hpp \
84 sync_watch.hpp
Patrick Ventureab8231c2019-03-28 12:41:34 -070085bin_PROGRAMS += phosphor-sync-software-manager
Adriana Kobylakb072d1b2018-04-24 11:37:21 -050086phosphor_sync_software_manager_SOURCES = \
87 sync_manager.cpp \
88 sync_watch.cpp \
89 sync_manager_main.cpp
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050090phosphor_sync_software_manager_CXXFLAGS = $(generic_cxxflags)
91phosphor_sync_software_manager_LDFLAGS = $(generic_ldflags)
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050092dist_sysconf_DATA = \
93 synclist
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050094endif
95
Deepak Kodihalli059e2332017-04-12 06:40:53 -050096generic_cxxflags = \
97 $(SYSTEMD_CFLAGS) \
98 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
99 $(SDBUSPLUS_CFLAGS) \
Andrew Geisslere4c06322018-08-27 11:27:54 -0700100 $(PHOSPHOR_LOGGING_CFLAGS) \
101 -flto
Deepak Kodihalli059e2332017-04-12 06:40:53 -0500102generic_ldflags = \
103 $(SYSTEMD_LIBS) \
104 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
105 $(SDBUSPLUS_LIBS) \
Gunnar Mills3a482f62017-04-20 16:07:20 -0500106 $(PHOSPHOR_LOGGING_LIBS) \
Saqib Khan26a960d2017-09-19 14:23:28 -0500107 -lstdc++fs \
108 -lssl \
109 -lcrypto
Gunnar Mills32159fb2017-01-31 21:44:36 -0600110
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500111xyz/openbmc_project/Software/Image/error.hpp: ${top_srcdir}/xyz/openbmc_project/Software/Image.errors.yaml
Gunnar Mills93c12d32017-05-10 13:11:53 -0500112 @mkdir -p `dirname $@`
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500113 $(SDBUSPLUSPLUS) -r $(srcdir) error exception-header xyz.openbmc_project.Software.Image > $@
Gunnar Mills93c12d32017-05-10 13:11:53 -0500114
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500115xyz/openbmc_project/Software/Image/error.cpp: ${top_srcdir}/xyz/openbmc_project/Software/Image.errors.yaml
Gunnar Mills93c12d32017-05-10 13:11:53 -0500116 @mkdir -p `dirname $@`
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500117 $(SDBUSPLUSPLUS) -r $(srcdir) error exception-cpp xyz.openbmc_project.Software.Image > $@
Gunnar Mills93c12d32017-05-10 13:11:53 -0500118
Gunnar Mills32159fb2017-01-31 21:44:36 -0600119phosphor_version_software_manager_CXXFLAGS = $(generic_cxxflags)
120phosphor_version_software_manager_LDFLAGS = $(generic_ldflags)
Gunnar Mills701e0212017-04-03 11:21:27 -0500121phosphor_download_manager_CXXFLAGS = $(generic_cxxflags)
122phosphor_download_manager_LDFLAGS = $(generic_ldflags)
Gunnar Millsec1b41c2017-05-02 12:20:36 -0500123phosphor_image_updater_CXXFLAGS = $(generic_cxxflags)
124phosphor_image_updater_LDFLAGS = $(generic_ldflags)
Gunnar Mills01d55c32017-04-20 10:52:15 -0500125
126SUBDIRS = test