blob: fa74dc8492fad7c582dd126cf23289f066fea535 [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 \
Bright Cheng0d7198f2019-11-18 16:45:01 +080055 xyz.openbmc_project.Software.Version.service \
56 reboot-guard-disable.service \
57 reboot-guard-enable.service \
58 force-reboot.service
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050059
Vijay Khemka93416182020-01-23 10:18:06 -080060if HOST_BIOS_UPGRADE
61systemdsystemunit_DATA += obmc-flash-host-bios@.service
62endif
63
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050064tmpfilesdir=${exec_prefix}/lib/tmpfiles.d/
65dist_tmpfiles_DATA = \
66 software.conf
67endif
68
Lei YUa7853ee2018-05-23 11:13:12 +080069if UBIFS_LAYOUT
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -050070include ubi/Makefile.am.include
Lei YUa7853ee2018-05-23 11:13:12 +080071else
72include static/Makefile.am.include
73endif
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -050074
Jayanth Othayoth0e0c1272018-02-21 05:46:36 -060075if WANT_SIGNATURE_VERIFY_BUILD
Adriana Kobylak5ed9b2d2018-09-06 13:15:34 -050076noinst_HEADERS += \
77 image_verify.hpp \
Jayashankar Padatha0135602019-04-22 16:22:58 +053078 openssl_alloc.hpp
Adriana Kobylak5ed9b2d2018-09-06 13:15:34 -050079phosphor_image_updater_SOURCES += \
80 image_verify.cpp \
Jayashankar Padatha0135602019-04-22 16:22:58 +053081 openssl_alloc.cpp
Jayanth Othayoth0e0c1272018-02-21 05:46:36 -060082endif
Gunnar Mills652da832017-08-29 08:34:54 -050083
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050084if WANT_SYNC
Adriana Kobylakb072d1b2018-04-24 11:37:21 -050085noinst_HEADERS += \
86 sync_manager.hpp \
87 sync_watch.hpp
Patrick Ventureab8231c2019-03-28 12:41:34 -070088bin_PROGRAMS += phosphor-sync-software-manager
Adriana Kobylakb072d1b2018-04-24 11:37:21 -050089phosphor_sync_software_manager_SOURCES = \
90 sync_manager.cpp \
91 sync_watch.cpp \
92 sync_manager_main.cpp
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050093phosphor_sync_software_manager_CXXFLAGS = $(generic_cxxflags)
94phosphor_sync_software_manager_LDFLAGS = $(generic_ldflags)
Adriana Kobylak9cbfa2e2019-04-25 14:02:37 -050095dist_sysconf_DATA = \
96 synclist
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050097endif
98
Deepak Kodihalli059e2332017-04-12 06:40:53 -050099generic_cxxflags = \
100 $(SYSTEMD_CFLAGS) \
101 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
102 $(SDBUSPLUS_CFLAGS) \
Andrew Geisslere4c06322018-08-27 11:27:54 -0700103 $(PHOSPHOR_LOGGING_CFLAGS) \
104 -flto
Deepak Kodihalli059e2332017-04-12 06:40:53 -0500105generic_ldflags = \
106 $(SYSTEMD_LIBS) \
107 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
108 $(SDBUSPLUS_LIBS) \
Gunnar Mills3a482f62017-04-20 16:07:20 -0500109 $(PHOSPHOR_LOGGING_LIBS) \
Saqib Khan26a960d2017-09-19 14:23:28 -0500110 -lstdc++fs \
111 -lssl \
112 -lcrypto
Gunnar Mills32159fb2017-01-31 21:44:36 -0600113
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500114xyz/openbmc_project/Software/Image/error.hpp: ${top_srcdir}/xyz/openbmc_project/Software/Image.errors.yaml
Gunnar Mills93c12d32017-05-10 13:11:53 -0500115 @mkdir -p `dirname $@`
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500116 $(SDBUSPLUSPLUS) -r $(srcdir) error exception-header xyz.openbmc_project.Software.Image > $@
Gunnar Mills93c12d32017-05-10 13:11:53 -0500117
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500118xyz/openbmc_project/Software/Image/error.cpp: ${top_srcdir}/xyz/openbmc_project/Software/Image.errors.yaml
Gunnar Mills93c12d32017-05-10 13:11:53 -0500119 @mkdir -p `dirname $@`
Adriana Kobylak43699ca2018-10-17 14:56:29 -0500120 $(SDBUSPLUSPLUS) -r $(srcdir) error exception-cpp xyz.openbmc_project.Software.Image > $@
Gunnar Mills93c12d32017-05-10 13:11:53 -0500121
Gunnar Mills32159fb2017-01-31 21:44:36 -0600122phosphor_version_software_manager_CXXFLAGS = $(generic_cxxflags)
123phosphor_version_software_manager_LDFLAGS = $(generic_ldflags)
Gunnar Mills701e0212017-04-03 11:21:27 -0500124phosphor_download_manager_CXXFLAGS = $(generic_cxxflags)
125phosphor_download_manager_LDFLAGS = $(generic_ldflags)
Gunnar Millsec1b41c2017-05-02 12:20:36 -0500126phosphor_image_updater_CXXFLAGS = $(generic_cxxflags)
127phosphor_image_updater_LDFLAGS = $(generic_ldflags)
Gunnar Mills01d55c32017-04-20 10:52:15 -0500128
129SUBDIRS = test