Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
Daniel Cardenas | 0c37e31 | 2017-11-06 12:01:33 -0800 | [diff] [blame] | 17 | ifneq ($(TARGET_BUILD_PDK),true) |
| 18 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 19 | LOCAL_PATH := $(my-dir) |
| 20 | |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 21 | # Default values for the USE flags. Override these USE flags from your product |
| 22 | # by setting BRILLO_USE_* values. Note that we define local variables like |
| 23 | # local_use_* to prevent leaking our default setting for other packages. |
| 24 | local_use_binder := $(if $(BRILLO_USE_BINDER),$(BRILLO_USE_BINDER),1) |
Alex Deymo | 51c264e | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 25 | local_use_fec := 1 |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 26 | local_use_hwid_override := \ |
| 27 | $(if $(BRILLO_USE_HWID_OVERRIDE),$(BRILLO_USE_HWID_OVERRIDE),0) |
| 28 | local_use_mtd := $(if $(BRILLO_USE_MTD),$(BRILLO_USE_MTD),0) |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 29 | local_use_chrome_network_proxy := 0 |
| 30 | local_use_chrome_kiosk_app := 0 |
Alex Deymo | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 31 | |
Alex Deymo | 49d6445 | 2016-10-31 16:56:58 -0700 | [diff] [blame] | 32 | # IoT devices use Omaha for updates. |
| 33 | local_use_omaha := $(if $(filter true,$(PRODUCT_IOT)),1,0) |
| 34 | |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 35 | ue_common_cflags := \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 36 | -DUSE_BINDER=$(local_use_binder) \ |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 37 | -DUSE_CHROME_NETWORK_PROXY=$(local_use_chrome_network_proxy) \ |
| 38 | -DUSE_CHROME_KIOSK_APP=$(local_use_chrome_kiosk_app) \ |
Alex Deymo | 51c264e | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 39 | -DUSE_FEC=$(local_use_fec) \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 40 | -DUSE_HWID_OVERRIDE=$(local_use_hwid_override) \ |
| 41 | -DUSE_MTD=$(local_use_mtd) \ |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 42 | -DUSE_OMAHA=$(local_use_omaha) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 43 | -D_FILE_OFFSET_BITS=64 \ |
| 44 | -D_POSIX_C_SOURCE=199309L \ |
| 45 | -Wa,--noexecstack \ |
| 46 | -Wall \ |
| 47 | -Werror \ |
| 48 | -Wextra \ |
| 49 | -Wformat=2 \ |
| 50 | -Wno-psabi \ |
| 51 | -Wno-unused-parameter \ |
| 52 | -ffunction-sections \ |
| 53 | -fstack-protector-strong \ |
| 54 | -fvisibility=hidden |
| 55 | ue_common_cppflags := \ |
| 56 | -Wnon-virtual-dtor \ |
Elliott Hughes | 063863b | 2016-10-10 13:37:53 -0700 | [diff] [blame] | 57 | -fno-strict-aliasing |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 58 | ue_common_ldflags := \ |
| 59 | -Wl,--gc-sections |
| 60 | ue_common_c_includes := \ |
| 61 | $(LOCAL_PATH)/client_library/include \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 62 | system |
| 63 | ue_common_shared_libraries := \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 64 | libbrillo-stream \ |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 65 | libbrillo \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 66 | libchrome |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 67 | ue_common_static_libraries := \ |
| 68 | libgtest_prod \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 69 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 70 | # update_metadata-protos (type: static_library) |
| 71 | # ======================================================== |
| 72 | # Protobufs. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 73 | ue_update_metadata_protos_exported_static_libraries := \ |
| 74 | update_metadata-protos |
| 75 | ue_update_metadata_protos_exported_shared_libraries := \ |
Alex Vakulenko | ab5bd66 | 2015-12-21 12:24:45 -0800 | [diff] [blame] | 76 | libprotobuf-cpp-lite |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 77 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 78 | ue_update_metadata_protos_src_files := \ |
| 79 | update_metadata.proto |
| 80 | |
| 81 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 82 | include $(CLEAR_VARS) |
| 83 | LOCAL_MODULE := update_metadata-protos |
| 84 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Ying Wang | dbd1711 | 2015-12-17 11:59:09 -0800 | [diff] [blame] | 85 | LOCAL_IS_HOST_MODULE := true |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 86 | generated_sources_dir := $(call local-generated-sources-dir) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 87 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 88 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
Chih-Hung Hsieh | 908da19 | 2017-10-20 15:14:48 -0700 | [diff] [blame] | 89 | LOCAL_CFLAGS := -Wall -Werror |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 90 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 91 | |
| 92 | # Build for the target. |
| 93 | include $(CLEAR_VARS) |
| 94 | LOCAL_MODULE := update_metadata-protos |
| 95 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 96 | generated_sources_dir := $(call local-generated-sources-dir) |
| 97 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
| 98 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
Chih-Hung Hsieh | 908da19 | 2017-10-20 15:14:48 -0700 | [diff] [blame] | 99 | LOCAL_CFLAGS := -Wall -Werror |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 100 | include $(BUILD_STATIC_LIBRARY) |
| 101 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 102 | # libpayload_consumer (type: static_library) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 103 | # ======================================================== |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 104 | # The payload application component and common dependencies. |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 105 | ue_libpayload_consumer_exported_static_libraries := \ |
| 106 | update_metadata-protos \ |
Steven Moreland | 0571c80 | 2017-05-12 14:10:55 -0700 | [diff] [blame] | 107 | libxz \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 108 | libbz \ |
Sen Jiang | 26dfa32 | 2016-05-10 15:31:46 -0700 | [diff] [blame] | 109 | libbspatch \ |
Tianjie Xu | 13df600 | 2017-10-28 22:05:20 -0700 | [diff] [blame] | 110 | libbrotli \ |
Amin Hassani | 02855c2 | 2017-09-06 22:34:50 -0700 | [diff] [blame] | 111 | libpuffpatch \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 112 | $(ue_update_metadata_protos_exported_static_libraries) |
| 113 | ue_libpayload_consumer_exported_shared_libraries := \ |
Dan Willemsen | 097288e | 2016-07-21 14:16:29 -0700 | [diff] [blame] | 114 | libcrypto \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 115 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 116 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 117 | ue_libpayload_consumer_src_files := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 118 | common/action_processor.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 119 | common/boot_control_stub.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 120 | common/clock.cc \ |
| 121 | common/constants.cc \ |
Alex Deymo | ab0d976 | 2016-02-02 10:52:56 -0800 | [diff] [blame] | 122 | common/cpu_limiter.cc \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 123 | common/error_code_utils.cc \ |
Alex Deymo | d6ece53 | 2016-06-21 17:00:05 -0700 | [diff] [blame] | 124 | common/file_fetcher.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 125 | common/hash_calculator.cc \ |
| 126 | common/http_common.cc \ |
| 127 | common/http_fetcher.cc \ |
| 128 | common/hwid_override.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 129 | common/multi_range_http_fetcher.cc \ |
| 130 | common/platform_constants_android.cc \ |
| 131 | common/prefs.cc \ |
| 132 | common/subprocess.cc \ |
| 133 | common/terminator.cc \ |
| 134 | common/utils.cc \ |
| 135 | payload_consumer/bzip_extent_writer.cc \ |
Amin Hassani | acd7be8 | 2017-08-25 15:32:13 -0700 | [diff] [blame] | 136 | payload_consumer/cached_file_descriptor.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 137 | payload_consumer/delta_performer.cc \ |
| 138 | payload_consumer/download_action.cc \ |
Amin Hassani | ee6d9a1 | 2017-08-31 14:09:15 -0700 | [diff] [blame] | 139 | payload_consumer/extent_reader.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 140 | payload_consumer/extent_writer.cc \ |
| 141 | payload_consumer/file_descriptor.cc \ |
Alex Deymo | a48f630 | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 142 | payload_consumer/file_descriptor_utils.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 143 | payload_consumer/file_writer.cc \ |
| 144 | payload_consumer/filesystem_verifier_action.cc \ |
| 145 | payload_consumer/install_plan.cc \ |
HÃ¥kan Kvist | 4e13cf4 | 2018-01-23 12:57:55 +0100 | [diff] [blame] | 146 | payload_consumer/mount_history.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 147 | payload_consumer/payload_constants.cc \ |
Sen Jiang | b5f601d | 2018-02-02 13:51:21 -0800 | [diff] [blame] | 148 | payload_consumer/payload_metadata.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 149 | payload_consumer/payload_verifier.cc \ |
| 150 | payload_consumer/postinstall_runner_action.cc \ |
| 151 | payload_consumer/xz_extent_writer.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 152 | |
Alex Deymo | 51c264e | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 153 | ifeq ($(local_use_fec),1) |
| 154 | ue_libpayload_consumer_src_files += \ |
| 155 | payload_consumer/fec_file_descriptor.cc |
| 156 | ue_libpayload_consumer_exported_shared_libraries += \ |
| 157 | libfec |
| 158 | endif # local_use_fec == 1 |
| 159 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 160 | ifeq ($(HOST_OS),linux) |
| 161 | # Build for the host. |
| 162 | include $(CLEAR_VARS) |
| 163 | LOCAL_MODULE := libpayload_consumer |
| 164 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 165 | LOCAL_CPP_EXTENSION := .cc |
Sen Jiang | 5520b2d | 2018-05-11 11:38:43 -0700 | [diff] [blame] | 166 | LOCAL_CFLAGS := $(filter-out -DUSE_FEC=%,$(ue_common_cflags)) -DUSE_FEC=0 |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 167 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 168 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 169 | LOCAL_C_INCLUDES := \ |
Sen Jiang | dcbc0ae | 2016-03-18 15:33:19 -0700 | [diff] [blame] | 170 | $(ue_common_c_includes) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 171 | LOCAL_STATIC_LIBRARIES := \ |
| 172 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 173 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 174 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 175 | $(ue_update_metadata_protos_exported_static_libraries) |
| 176 | LOCAL_SHARED_LIBRARIES := \ |
| 177 | $(ue_common_shared_libraries) \ |
| 178 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 179 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 180 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
| 181 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 182 | endif # HOST_OS == linux |
| 183 | |
| 184 | # Build for the target. |
| 185 | include $(CLEAR_VARS) |
| 186 | LOCAL_MODULE := libpayload_consumer |
| 187 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 188 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 189 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 190 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 191 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 192 | LOCAL_C_INCLUDES := \ |
Sen Jiang | dcbc0ae | 2016-03-18 15:33:19 -0700 | [diff] [blame] | 193 | $(ue_common_c_includes) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 194 | LOCAL_STATIC_LIBRARIES := \ |
| 195 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 196 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 197 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 198 | $(ue_update_metadata_protos_exported_static_libraries) |
| 199 | LOCAL_SHARED_LIBRARIES := \ |
| 200 | $(ue_common_shared_libraries) \ |
| 201 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 202 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 203 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 204 | include $(BUILD_STATIC_LIBRARY) |
| 205 | |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 206 | # libupdate_engine_boot_control (type: static_library) |
| 207 | # ======================================================== |
| 208 | # A BootControl class implementation using Android's HIDL boot_control HAL. |
| 209 | ue_libupdate_engine_boot_control_exported_static_libraries := \ |
| 210 | update_metadata-protos \ |
| 211 | $(ue_update_metadata_protos_exported_static_libraries) |
| 212 | |
| 213 | ue_libupdate_engine_boot_control_exported_shared_libraries := \ |
| 214 | libhwbinder \ |
Connor O'Brien | 25cea5e | 2016-11-28 12:44:10 -0800 | [diff] [blame] | 215 | libhidlbase \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 216 | libutils \ |
| 217 | android.hardware.boot@1.0 \ |
| 218 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 219 | |
| 220 | include $(CLEAR_VARS) |
| 221 | LOCAL_MODULE := libupdate_engine_boot_control |
| 222 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 223 | LOCAL_CPP_EXTENSION := .cc |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 224 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 225 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 226 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 227 | LOCAL_C_INCLUDES := \ |
Tao Bao | 304680c | 2018-03-31 10:36:52 -0700 | [diff] [blame] | 228 | $(ue_common_c_includes) |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 229 | LOCAL_STATIC_LIBRARIES := \ |
| 230 | $(ue_common_static_libraries) \ |
| 231 | $(ue_libupdate_engine_boot_control_exported_static_libraries) |
| 232 | LOCAL_SHARED_LIBRARIES := \ |
| 233 | $(ue_common_shared_libraries) \ |
| 234 | $(ue_libupdate_engine_boot_control_exported_shared_libraries) |
| 235 | LOCAL_SRC_FILES := \ |
| 236 | boot_control_android.cc |
| 237 | include $(BUILD_STATIC_LIBRARY) |
| 238 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 239 | ifeq ($(local_use_omaha),1) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 240 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 241 | # libupdate_engine (type: static_library) |
| 242 | # ======================================================== |
| 243 | # The main daemon static_library with all the code used to check for updates |
| 244 | # with Omaha and expose a DBus daemon. |
| 245 | ue_libupdate_engine_exported_c_includes := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 246 | external/cros/system_api/dbus |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 247 | ue_libupdate_engine_exported_static_libraries := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 248 | libpayload_consumer \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 249 | update_metadata-protos \ |
Tao Bao | 304680c | 2018-03-31 10:36:52 -0700 | [diff] [blame] | 250 | libbootloader_message \ |
David Zeuthen | 753fadc | 2015-09-15 16:34:09 -0400 | [diff] [blame] | 251 | libbz \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 252 | libfs_mgr \ |
bowgotsai | 763e17c | 2017-01-24 16:59:57 +0800 | [diff] [blame] | 253 | libbase \ |
bowgotsai | cd67f91 | 2017-01-27 14:50:26 +0800 | [diff] [blame] | 254 | liblog \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 255 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 256 | $(ue_update_metadata_protos_exported_static_libraries) \ |
| 257 | libupdate_engine_boot_control \ |
| 258 | $(ue_libupdate_engine_boot_control_exported_static_libraries) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 259 | ue_libupdate_engine_exported_shared_libraries := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 260 | libmetrics \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 261 | libexpat \ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 262 | libbrillo-policy \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 263 | libcurl \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 264 | libcutils \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 265 | libssl \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 266 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 267 | $(ue_update_metadata_protos_exported_shared_libraries) \ |
| 268 | $(ue_libupdate_engine_boot_control_exported_shared_libraries) |
Alex Deymo | c003790 | 2016-01-23 17:29:02 -0800 | [diff] [blame] | 269 | ifeq ($(local_use_binder),1) |
| 270 | ue_libupdate_engine_exported_shared_libraries += \ |
| 271 | libbinder \ |
| 272 | libbinderwrapper \ |
| 273 | libbrillo-binder \ |
| 274 | libutils |
| 275 | endif # local_use_binder == 1 |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 276 | |
| 277 | include $(CLEAR_VARS) |
| 278 | LOCAL_MODULE := libupdate_engine |
| 279 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 280 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 281 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(ue_libupdate_engine_exported_c_includes) |
| 282 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 283 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 284 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 285 | LOCAL_C_INCLUDES := \ |
| 286 | $(ue_common_c_includes) \ |
Tao Bao | 304680c | 2018-03-31 10:36:52 -0700 | [diff] [blame] | 287 | $(ue_libupdate_engine_exported_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 288 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 289 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 290 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 291 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 292 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 293 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 294 | $(ue_update_metadata_protos_exported_static_libraries) |
| 295 | LOCAL_SHARED_LIBRARIES := \ |
| 296 | $(ue_common_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 297 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 298 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 299 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 300 | LOCAL_SRC_FILES := \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 301 | certificate_checker.cc \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 302 | common_service.cc \ |
Sen Jiang | a7c4de2 | 2017-03-02 15:53:54 -0800 | [diff] [blame] | 303 | connection_manager_android.cc \ |
Sen Jiang | 255e22b | 2016-05-20 16:15:29 -0700 | [diff] [blame] | 304 | connection_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 305 | daemon.cc \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 306 | hardware_android.cc \ |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 307 | image_properties_android.cc \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 308 | libcurl_http_fetcher.cc \ |
Tianjie Xu | 098f702 | 2017-08-24 21:37:16 -0700 | [diff] [blame] | 309 | metrics_reporter_omaha.cc \ |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 310 | metrics_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 311 | omaha_request_action.cc \ |
| 312 | omaha_request_params.cc \ |
| 313 | omaha_response_handler_action.cc \ |
Alex Deymo | b3fa53b | 2016-04-18 19:57:58 -0700 | [diff] [blame] | 314 | omaha_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 315 | p2p_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 316 | payload_state.cc \ |
Sen Jiang | b8c6a8f | 2016-06-07 17:33:17 -0700 | [diff] [blame] | 317 | power_manager_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 318 | proxy_resolver.cc \ |
| 319 | real_system_state.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 320 | update_attempter.cc \ |
Amin Hassani | 0882a51 | 2018-04-05 16:25:44 -0700 | [diff] [blame] | 321 | update_boot_flags_action.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 322 | update_manager/android_things_policy.cc \ |
Aaron Wood | bf5a252 | 2017-10-04 10:58:36 -0700 | [diff] [blame] | 323 | update_manager/api_restricted_downloads_policy_impl.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 324 | update_manager/boxed_value.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 325 | update_manager/default_policy.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 326 | update_manager/enough_slots_ab_updates_policy_impl.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 327 | update_manager/evaluation_context.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 328 | update_manager/interactive_update_policy_impl.cc \ |
| 329 | update_manager/next_update_check_policy_impl.cc \ |
| 330 | update_manager/official_build_check_policy_impl.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 331 | update_manager/policy.cc \ |
| 332 | update_manager/real_config_provider.cc \ |
| 333 | update_manager/real_device_policy_provider.cc \ |
| 334 | update_manager/real_random_provider.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 335 | update_manager/real_system_provider.cc \ |
| 336 | update_manager/real_time_provider.cc \ |
| 337 | update_manager/real_updater_provider.cc \ |
Adolfo Victoria | 5a0a82c | 2018-07-16 14:37:48 -0700 | [diff] [blame] | 338 | update_manager/staging_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 339 | update_manager/state_factory.cc \ |
| 340 | update_manager/update_manager.cc \ |
Adolfo Victoria | 94ffe13 | 2018-06-28 16:14:56 -0700 | [diff] [blame] | 341 | update_manager/update_time_restrictions_policy_impl.cc \ |
| 342 | update_manager/weekly_time.cc \ |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 343 | update_status_utils.cc \ |
Alex Deymo | dc066f1 | 2017-03-27 13:01:29 -0700 | [diff] [blame] | 344 | utils_android.cc |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 345 | ifeq ($(local_use_binder),1) |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 346 | LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/binder_bindings |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 347 | LOCAL_SRC_FILES += \ |
| 348 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 349 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 350 | binder_service_brillo.cc \ |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 351 | parcelable_update_engine_status.cc |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 352 | endif # local_use_binder == 1 |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 353 | ifeq ($(local_use_chrome_network_proxy),1) |
Alex Deymo | 0cd976d | 2016-02-11 18:45:01 -0800 | [diff] [blame] | 354 | LOCAL_SRC_FILES += \ |
| 355 | chrome_browser_proxy_resolver.cc |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 356 | endif # local_use_chrome_network_proxy == 1 |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 357 | include $(BUILD_STATIC_LIBRARY) |
| 358 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 359 | else # local_use_omaha == 1 |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 360 | |
| 361 | ifneq ($(local_use_binder),1) |
| 362 | $(error USE_BINDER is disabled but is required in non-Brillo devices.) |
| 363 | endif # local_use_binder == 1 |
| 364 | |
| 365 | # libupdate_engine_android (type: static_library) |
| 366 | # ======================================================== |
| 367 | # The main daemon static_library used in Android (non-Brillo). This only has a |
| 368 | # loop to apply payloads provided by the upper layer via a Binder interface. |
| 369 | ue_libupdate_engine_android_exported_static_libraries := \ |
| 370 | libpayload_consumer \ |
Tao Bao | 304680c | 2018-03-31 10:36:52 -0700 | [diff] [blame] | 371 | libbootloader_message \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 372 | libfs_mgr \ |
bowgotsai | 763e17c | 2017-01-24 16:59:57 +0800 | [diff] [blame] | 373 | libbase \ |
bowgotsai | cd67f91 | 2017-01-27 14:50:26 +0800 | [diff] [blame] | 374 | liblog \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 375 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 376 | libupdate_engine_boot_control \ |
| 377 | $(ue_libupdate_engine_boot_control_exported_static_libraries) |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 378 | ue_libupdate_engine_android_exported_shared_libraries := \ |
| 379 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 380 | $(ue_libupdate_engine_boot_control_exported_shared_libraries) \ |
Alex Deymo | b8437be | 2016-12-09 16:28:12 -0800 | [diff] [blame] | 381 | libandroid_net \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 382 | libbinder \ |
| 383 | libbinderwrapper \ |
| 384 | libbrillo-binder \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 385 | libcutils \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 386 | libcurl \ |
Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 387 | libmetricslogger \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 388 | libssl \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 389 | libutils |
| 390 | |
| 391 | include $(CLEAR_VARS) |
| 392 | LOCAL_MODULE := libupdate_engine_android |
| 393 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 394 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 395 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 396 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 397 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | fb905d9 | 2016-06-03 19:26:58 -0700 | [diff] [blame] | 398 | LOCAL_C_INCLUDES := \ |
Tao Bao | 304680c | 2018-03-31 10:36:52 -0700 | [diff] [blame] | 399 | $(ue_common_c_includes) |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 400 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 401 | # out of the DBus interface. |
| 402 | LOCAL_C_INCLUDES += \ |
| 403 | external/cros/system_api/dbus |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 404 | LOCAL_STATIC_LIBRARIES := \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 405 | $(ue_common_static_libraries) \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 406 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
| 407 | LOCAL_SHARED_LIBRARIES += \ |
| 408 | $(ue_common_shared_libraries) \ |
| 409 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
| 410 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 411 | LOCAL_SRC_FILES += \ |
| 412 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 413 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
| 414 | binder_service_android.cc \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 415 | certificate_checker.cc \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 416 | daemon.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 417 | daemon_state_android.cc \ |
| 418 | hardware_android.cc \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 419 | libcurl_http_fetcher.cc \ |
Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 420 | metrics_reporter_android.cc \ |
| 421 | metrics_utils.cc \ |
Alex Deymo | 87792ea | 2016-07-25 15:40:36 -0700 | [diff] [blame] | 422 | network_selector_android.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 423 | proxy_resolver.cc \ |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 424 | update_attempter_android.cc \ |
Amin Hassani | 667cf7b | 2018-07-25 14:32:00 -0700 | [diff] [blame] | 425 | update_boot_flags_action.cc \ |
Alex Deymo | fb905d9 | 2016-06-03 19:26:58 -0700 | [diff] [blame] | 426 | update_status_utils.cc \ |
| 427 | utils_android.cc |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 428 | include $(BUILD_STATIC_LIBRARY) |
| 429 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 430 | endif # local_use_omaha == 1 |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 431 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 432 | # update_engine (type: executable) |
| 433 | # ======================================================== |
| 434 | # update_engine daemon. |
| 435 | include $(CLEAR_VARS) |
| 436 | LOCAL_MODULE := update_engine |
| 437 | LOCAL_MODULE_CLASS := EXECUTABLES |
Sen Jiang | 5609277 | 2015-11-23 14:41:00 -0800 | [diff] [blame] | 438 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | ab49446 | 2015-11-30 17:07:36 -0300 | [diff] [blame] | 439 | cacerts_google |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 440 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 441 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 442 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 443 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 444 | LOCAL_C_INCLUDES := \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 445 | $(ue_common_c_includes) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 446 | LOCAL_SHARED_LIBRARIES := \ |
| 447 | $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 448 | LOCAL_STATIC_LIBRARIES := \ |
| 449 | $(ue_common_static_libraries) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 450 | LOCAL_SRC_FILES := \ |
| 451 | main.cc |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 452 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 453 | ifeq ($(local_use_omaha),1) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 454 | LOCAL_C_INCLUDES += \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 455 | $(ue_libupdate_engine_exported_c_includes) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 456 | LOCAL_STATIC_LIBRARIES += \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 457 | libupdate_engine \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 458 | $(ue_libupdate_engine_exported_static_libraries:-host=) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 459 | LOCAL_SHARED_LIBRARIES += \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 460 | $(ue_libupdate_engine_exported_shared_libraries:-host=) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 461 | else # local_use_omaha == 1 |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 462 | LOCAL_STATIC_LIBRARIES += \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 463 | libupdate_engine_android \ |
| 464 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 465 | LOCAL_SHARED_LIBRARIES += \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 466 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 467 | endif # local_use_omaha == 1 |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 468 | |
Gilad Arnold | 70141f2 | 2015-09-17 09:06:30 -0700 | [diff] [blame] | 469 | LOCAL_INIT_RC := update_engine.rc |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 470 | include $(BUILD_EXECUTABLE) |
| 471 | |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 472 | # update_engine_sideload (type: executable) |
| 473 | # ======================================================== |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame^] | 474 | # A binary executable equivalent to update_engine daemon that installs an update |
| 475 | # from a local file directly instead of running in the background. Used in |
| 476 | # recovery image. |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 477 | include $(CLEAR_VARS) |
| 478 | LOCAL_MODULE := update_engine_sideload |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame^] | 479 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 480 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 481 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 482 | LOCAL_CFLAGS := \ |
| 483 | $(ue_common_cflags) \ |
| 484 | -D_UE_SIDELOAD |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 485 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 486 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 487 | LOCAL_C_INCLUDES := \ |
Tao Bao | 304680c | 2018-03-31 10:36:52 -0700 | [diff] [blame] | 488 | $(ue_common_c_includes) |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 489 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 490 | # out of the DBus interface. |
| 491 | LOCAL_C_INCLUDES += \ |
| 492 | external/cros/system_api/dbus |
| 493 | LOCAL_SRC_FILES := \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 494 | boot_control_recovery.cc \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 495 | hardware_android.cc \ |
Tianjie Xu | d4c5deb | 2017-10-24 11:17:03 -0700 | [diff] [blame] | 496 | metrics_reporter_stub.cc \ |
Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 497 | metrics_utils.cc \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 498 | network_selector_stub.cc \ |
| 499 | proxy_resolver.cc \ |
| 500 | sideload_main.cc \ |
| 501 | update_attempter_android.cc \ |
Amin Hassani | 667cf7b | 2018-07-25 14:32:00 -0700 | [diff] [blame] | 502 | update_boot_flags_action.cc \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 503 | update_status_utils.cc \ |
| 504 | utils_android.cc |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame^] | 505 | # Use commonly used shared libraries. libprotobuf-cpp-lite.so is filtered out, |
| 506 | # as it doesn't look beneficial to be installed separately due to its size. Note |
| 507 | # that we explicitly request their recovery variants, so that the expected files |
| 508 | # will be used and installed. |
| 509 | LOCAL_SHARED_LIBRARIES := \ |
| 510 | libbase.recovery \ |
| 511 | libbootloader_message.recovery \ |
| 512 | libfs_mgr.recovery \ |
| 513 | liblog.recovery \ |
| 514 | $(filter-out libprotobuf-cpp-lite.recovery,$(ue_libpayload_consumer_exported_shared_libraries:=.recovery)) |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 515 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 516 | libpayload_consumer \ |
| 517 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 518 | $(ue_common_static_libraries) \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 519 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 520 | $(ue_update_metadata_protos_exported_static_libraries) |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame^] | 521 | # We add the static versions of the shared libraries that are not installed to |
| 522 | # recovery image due to size concerns. Need to include all the static library |
| 523 | # dependencies of these static libraries. |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 524 | LOCAL_STATIC_LIBRARIES += \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 525 | $(ue_common_shared_libraries) \ |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 526 | $(ue_update_metadata_protos_exported_shared_libraries) \ |
| 527 | libevent \ |
| 528 | libmodpb64 \ |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame^] | 529 | libgtest_prod \ |
| 530 | libprotobuf-cpp-lite |
Alex Deymo | 51c264e | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 531 | |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 532 | ifeq ($(strip $(PRODUCT_STATIC_BOOT_CONTROL_HAL)),) |
| 533 | # No static boot_control HAL defined, so no sideload support. We use a fake |
| 534 | # boot_control HAL to allow compiling update_engine_sideload for test purposes. |
| 535 | ifeq ($(strip $(AB_OTA_UPDATER)),true) |
| 536 | $(warning No PRODUCT_STATIC_BOOT_CONTROL_HAL configured but AB_OTA_UPDATER is \ |
| 537 | true, no update sideload support.) |
| 538 | endif # AB_OTA_UPDATER == true |
| 539 | LOCAL_SRC_FILES += \ |
| 540 | boot_control_recovery_stub.cc |
| 541 | else # PRODUCT_STATIC_BOOT_CONTROL_HAL != "" |
| 542 | LOCAL_STATIC_LIBRARIES += \ |
| 543 | $(PRODUCT_STATIC_BOOT_CONTROL_HAL) |
| 544 | endif # PRODUCT_STATIC_BOOT_CONTROL_HAL != "" |
| 545 | |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 546 | include $(BUILD_EXECUTABLE) |
| 547 | |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 548 | # libupdate_engine_client (type: shared_library) |
| 549 | # ======================================================== |
| 550 | include $(CLEAR_VARS) |
| 551 | LOCAL_MODULE := libupdate_engine_client |
| 552 | LOCAL_CFLAGS := \ |
| 553 | -Wall \ |
| 554 | -Werror \ |
| 555 | -Wno-unused-parameter \ |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 556 | -DUSE_BINDER=$(local_use_binder) |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 557 | LOCAL_CPP_EXTENSION := .cc |
| 558 | # TODO(deymo): Remove "external/cros/system_api/dbus" when dbus is not used. |
| 559 | LOCAL_C_INCLUDES := \ |
| 560 | $(LOCAL_PATH)/client_library/include \ |
| 561 | external/cros/system_api/dbus \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 562 | system |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 563 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/client_library/include |
| 564 | LOCAL_SHARED_LIBRARIES := \ |
| 565 | libchrome \ |
| 566 | libbrillo |
| 567 | LOCAL_SRC_FILES := \ |
| 568 | client_library/client.cc \ |
| 569 | update_status_utils.cc |
| 570 | |
Sen Jiang | a7c4de2 | 2017-03-02 15:53:54 -0800 | [diff] [blame] | 571 | # We only support binder IPC mechanism in Android. |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 572 | ifeq ($(local_use_binder),1) |
| 573 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 574 | LOCAL_SHARED_LIBRARIES += \ |
| 575 | libbinder \ |
| 576 | libbrillo-binder \ |
| 577 | libutils |
| 578 | LOCAL_SRC_FILES += \ |
| 579 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 580 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
| 581 | client_library/client_binder.cc \ |
| 582 | parcelable_update_engine_status.cc |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 583 | endif # local_use_binder == 1 |
| 584 | |
| 585 | include $(BUILD_SHARED_LIBRARY) |
| 586 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 587 | # update_engine_client (type: executable) |
| 588 | # ======================================================== |
| 589 | # update_engine console client. |
| 590 | include $(CLEAR_VARS) |
| 591 | LOCAL_MODULE := update_engine_client |
| 592 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 593 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 594 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 595 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 596 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Casey Dahlin | ce90f44 | 2016-01-25 16:55:28 -0800 | [diff] [blame] | 597 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 598 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 599 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 600 | ifeq ($(local_use_omaha),1) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 601 | LOCAL_SHARED_LIBRARIES += \ |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 602 | libupdate_engine_client |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 603 | LOCAL_SRC_FILES := \ |
Shuqian Zhao | 2997173 | 2016-02-05 11:29:32 -0800 | [diff] [blame] | 604 | update_engine_client.cc \ |
Alex Deymo | b3fa53b | 2016-04-18 19:57:58 -0700 | [diff] [blame] | 605 | common/error_code_utils.cc \ |
| 606 | omaha_utils.cc |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 607 | else # local_use_omaha == 1 |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 608 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 609 | # out of the DBus interface. |
| 610 | LOCAL_C_INCLUDES += \ |
| 611 | external/cros/system_api/dbus |
| 612 | LOCAL_SHARED_LIBRARIES += \ |
| 613 | libbinder \ |
Alex Deymo | 2130ee0 | 2016-02-02 18:35:50 -0800 | [diff] [blame] | 614 | libbinderwrapper \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 615 | libbrillo-binder \ |
| 616 | libutils |
| 617 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 618 | LOCAL_SRC_FILES := \ |
| 619 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 620 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 621 | common/error_code_utils.cc \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 622 | update_engine_client_android.cc \ |
| 623 | update_status_utils.cc |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 624 | endif # local_use_omaha == 1 |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 625 | include $(BUILD_EXECUTABLE) |
| 626 | |
| 627 | # libpayload_generator (type: static_library) |
| 628 | # ======================================================== |
| 629 | # server-side code. This is used for delta_generator and unittests but not |
| 630 | # for any client code. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 631 | ue_libpayload_generator_exported_static_libraries := \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 632 | libbsdiff \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 633 | libdivsufsort \ |
| 634 | libdivsufsort64 \ |
Tianjie Xu | 13df600 | 2017-10-28 22:05:20 -0700 | [diff] [blame] | 635 | libbrotli \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 636 | liblzma \ |
Amin Hassani | 3cd4df1 | 2017-08-25 11:21:53 -0700 | [diff] [blame] | 637 | libpayload_consumer \ |
| 638 | libpuffdiff \ |
Tianjie Xu | 1a7bb2c | 2018-01-22 17:56:57 -0800 | [diff] [blame] | 639 | libz \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 640 | update_metadata-protos \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 641 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 642 | $(ue_update_metadata_protos_exported_static_libraries) |
| 643 | ue_libpayload_generator_exported_shared_libraries := \ |
Alex Deymo | 89f6d67 | 2017-01-13 17:26:52 -0800 | [diff] [blame] | 644 | libext2fs \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 645 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 646 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 647 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 648 | ue_libpayload_generator_src_files := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 649 | payload_generator/ab_generator.cc \ |
| 650 | payload_generator/annotated_operation.cc \ |
| 651 | payload_generator/blob_file_writer.cc \ |
| 652 | payload_generator/block_mapping.cc \ |
Sen Jiang | 0a582fb | 2018-06-26 19:27:21 -0700 | [diff] [blame] | 653 | payload_generator/boot_img_filesystem.cc \ |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 654 | payload_generator/bzip.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 655 | payload_generator/cycle_breaker.cc \ |
Amin Hassani | 924183b | 2017-09-27 14:50:59 -0700 | [diff] [blame] | 656 | payload_generator/deflate_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 657 | payload_generator/delta_diff_generator.cc \ |
| 658 | payload_generator/delta_diff_utils.cc \ |
| 659 | payload_generator/ext2_filesystem.cc \ |
| 660 | payload_generator/extent_ranges.cc \ |
| 661 | payload_generator/extent_utils.cc \ |
| 662 | payload_generator/full_update_generator.cc \ |
| 663 | payload_generator/graph_types.cc \ |
| 664 | payload_generator/graph_utils.cc \ |
| 665 | payload_generator/inplace_generator.cc \ |
Alex Deymo | 20bdc70 | 2016-12-07 21:07:11 -0800 | [diff] [blame] | 666 | payload_generator/mapfile_filesystem.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 667 | payload_generator/payload_file.cc \ |
| 668 | payload_generator/payload_generation_config.cc \ |
| 669 | payload_generator/payload_signer.cc \ |
| 670 | payload_generator/raw_filesystem.cc \ |
Amin Hassani | d7da8f4 | 2017-08-23 14:29:40 -0700 | [diff] [blame] | 671 | payload_generator/squashfs_filesystem.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 672 | payload_generator/tarjan.cc \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 673 | payload_generator/topological_sort.cc \ |
| 674 | payload_generator/xz_android.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 675 | |
| 676 | ifeq ($(HOST_OS),linux) |
| 677 | # Build for the host. |
| 678 | include $(CLEAR_VARS) |
| 679 | LOCAL_MODULE := libpayload_generator |
| 680 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 681 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 682 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 683 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 684 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 685 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 686 | LOCAL_STATIC_LIBRARIES := \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 687 | libbsdiff \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 688 | libdivsufsort \ |
| 689 | libdivsufsort64 \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 690 | liblzma \ |
Amin Hassani | 3cd4df1 | 2017-08-25 11:21:53 -0700 | [diff] [blame] | 691 | libpayload_consumer \ |
| 692 | libpuffdiff \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 693 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 694 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 695 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 696 | $(ue_update_metadata_protos_exported_static_libraries) |
| 697 | LOCAL_SHARED_LIBRARIES := \ |
| 698 | $(ue_common_shared_libraries) \ |
| 699 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 700 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 701 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 702 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
| 703 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 704 | endif # HOST_OS == linux |
| 705 | |
| 706 | # Build for the target. |
| 707 | include $(CLEAR_VARS) |
| 708 | LOCAL_MODULE := libpayload_generator |
| 709 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 710 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 711 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 712 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 713 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 714 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 715 | LOCAL_STATIC_LIBRARIES := \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 716 | libbsdiff \ |
| 717 | libdivsufsort \ |
| 718 | libdivsufsort64 \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 719 | libpayload_consumer \ |
| 720 | update_metadata-protos \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 721 | liblzma \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 722 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 723 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 724 | $(ue_update_metadata_protos_exported_static_libraries) |
| 725 | LOCAL_SHARED_LIBRARIES := \ |
| 726 | $(ue_common_shared_libraries) \ |
| 727 | $(ue_libpayload_generator_exported_shared_libraries:-host=) \ |
| 728 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 729 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 730 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 731 | include $(BUILD_STATIC_LIBRARY) |
| 732 | |
| 733 | # delta_generator (type: executable) |
| 734 | # ======================================================== |
| 735 | # server-side delta generator. |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 736 | ue_delta_generator_src_files := \ |
| 737 | payload_generator/generate_delta_main.cc |
| 738 | |
| 739 | ifeq ($(HOST_OS),linux) |
| 740 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 741 | include $(CLEAR_VARS) |
| 742 | LOCAL_MODULE := delta_generator |
| 743 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 744 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 745 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 746 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 747 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 748 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 749 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 750 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 751 | libpayload_generator \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 752 | $(ue_common_static_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 753 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 754 | $(ue_libpayload_generator_exported_static_libraries) |
| 755 | LOCAL_SHARED_LIBRARIES := \ |
| 756 | $(ue_common_shared_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 757 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 758 | $(ue_libpayload_generator_exported_shared_libraries) |
Sen Jiang | 5520b2d | 2018-05-11 11:38:43 -0700 | [diff] [blame] | 759 | LOCAL_SHARED_LIBRARIES := $(filter-out libfec,$(LOCAL_SHARED_LIBRARIES)) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 760 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
| 761 | include $(BUILD_HOST_EXECUTABLE) |
| 762 | endif # HOST_OS == linux |
| 763 | |
| 764 | # Build for the target. |
| 765 | include $(CLEAR_VARS) |
Sen Jiang | 5a216c1 | 2016-03-30 13:08:24 -0700 | [diff] [blame] | 766 | LOCAL_MODULE := ue_unittest_delta_generator |
| 767 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 768 | LOCAL_MODULE_STEM := delta_generator |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 769 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 770 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 771 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 772 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 773 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 774 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 775 | LOCAL_STATIC_LIBRARIES := \ |
| 776 | libpayload_consumer \ |
| 777 | libpayload_generator \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 778 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 779 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 780 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 781 | LOCAL_SHARED_LIBRARIES := \ |
| 782 | $(ue_common_shared_libraries) \ |
| 783 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 784 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 785 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 786 | include $(BUILD_EXECUTABLE) |
| 787 | |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 788 | # Private and public keys for unittests. |
| 789 | # ======================================================== |
| 790 | # Generate a module that installs a prebuilt private key and a module that |
| 791 | # installs a public key generated from the private key. |
| 792 | # |
| 793 | # $(1): The path to the private key in pem format. |
| 794 | define ue-unittest-keys |
| 795 | $(eval include $(CLEAR_VARS)) \ |
| 796 | $(eval LOCAL_MODULE := ue_$(1).pem) \ |
| 797 | $(eval LOCAL_MODULE_CLASS := ETC) \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 798 | $(eval LOCAL_SRC_FILES := $(1).pem) \ |
| 799 | $(eval LOCAL_MODULE_PATH := \ |
| 800 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests) \ |
| 801 | $(eval LOCAL_MODULE_STEM := $(1).pem) \ |
| 802 | $(eval include $(BUILD_PREBUILT)) \ |
| 803 | \ |
| 804 | $(eval include $(CLEAR_VARS)) \ |
| 805 | $(eval LOCAL_MODULE := ue_$(1).pub.pem) \ |
| 806 | $(eval LOCAL_MODULE_CLASS := ETC) \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 807 | $(eval LOCAL_MODULE_PATH := \ |
| 808 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests) \ |
| 809 | $(eval LOCAL_MODULE_STEM := $(1).pub.pem) \ |
| 810 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 811 | $(eval $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(1).pem ; \ |
| 812 | openssl rsa -in $$< -pubout -out $$@) |
| 813 | endef |
| 814 | |
| 815 | $(call ue-unittest-keys,unittest_key) |
| 816 | $(call ue-unittest-keys,unittest_key2) |
| 817 | |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 818 | # Sample images for unittests. |
| 819 | # ======================================================== |
| 820 | # Generate a prebuilt module that installs a sample image from the compressed |
| 821 | # sample_images.tar.bz2 file used by the unittests. |
| 822 | # |
| 823 | # $(1): The filename in the sample_images.tar.bz2 |
| 824 | define ue-unittest-sample-image |
| 825 | $(eval include $(CLEAR_VARS)) \ |
| 826 | $(eval LOCAL_MODULE := ue_unittest_$(1)) \ |
| 827 | $(eval LOCAL_MODULE_CLASS := EXECUTABLES) \ |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 828 | $(eval LOCAL_MODULE_PATH := \ |
| 829 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests/gen) \ |
| 830 | $(eval LOCAL_MODULE_STEM := $(1)) \ |
Alex Deymo | a3553e4 | 2016-03-04 18:55:05 -0800 | [diff] [blame] | 831 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 832 | $(eval $(LOCAL_BUILT_MODULE) : \ |
| 833 | $(LOCAL_PATH)/sample_images/sample_images.tar.bz2 ; \ |
| 834 | tar -jxf $$< -C $$(dir $$@) $$(notdir $$@) && touch $$@) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 835 | endef |
| 836 | |
| 837 | $(call ue-unittest-sample-image,disk_ext2_1k.img) |
| 838 | $(call ue-unittest-sample-image,disk_ext2_4k.img) |
| 839 | $(call ue-unittest-sample-image,disk_ext2_4k_empty.img) |
Alex Deymo | d15c546 | 2016-03-09 18:11:12 -0800 | [diff] [blame] | 840 | $(call ue-unittest-sample-image,disk_ext2_unittest.img) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 841 | |
Sen Jiang | ee63c6e | 2016-03-30 14:01:02 -0700 | [diff] [blame] | 842 | # update_engine.conf |
| 843 | # ======================================================== |
| 844 | include $(CLEAR_VARS) |
| 845 | LOCAL_MODULE := ue_unittest_update_engine.conf |
| 846 | LOCAL_MODULE_CLASS := ETC |
| 847 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 848 | LOCAL_MODULE_STEM := update_engine.conf |
| 849 | LOCAL_SRC_FILES := update_engine.conf |
| 850 | include $(BUILD_PREBUILT) |
| 851 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 852 | # test_http_server (type: executable) |
| 853 | # ======================================================== |
| 854 | # Test HTTP Server. |
| 855 | include $(CLEAR_VARS) |
| 856 | LOCAL_MODULE := test_http_server |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 857 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 858 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 859 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 860 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 861 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 862 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 863 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 864 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 865 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 866 | LOCAL_SRC_FILES := \ |
| 867 | common/http_common.cc \ |
| 868 | test_http_server.cc |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 869 | include $(BUILD_EXECUTABLE) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 870 | |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 871 | # test_subprocess (type: executable) |
| 872 | # ======================================================== |
| 873 | # Test helper subprocess program. |
| 874 | include $(CLEAR_VARS) |
| 875 | LOCAL_MODULE := test_subprocess |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 876 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 877 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 878 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 879 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 880 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 881 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 882 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 883 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 884 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 885 | LOCAL_SRC_FILES := test_subprocess.cc |
| 886 | include $(BUILD_EXECUTABLE) |
| 887 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 888 | # update_engine_unittests (type: executable) |
| 889 | # ======================================================== |
| 890 | # Main unittest file. |
| 891 | include $(CLEAR_VARS) |
| 892 | LOCAL_MODULE := update_engine_unittests |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 893 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 894 | test_http_server \ |
| 895 | test_subprocess \ |
Sen Jiang | 5a216c1 | 2016-03-30 13:08:24 -0700 | [diff] [blame] | 896 | ue_unittest_delta_generator \ |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 897 | ue_unittest_disk_ext2_1k.img \ |
| 898 | ue_unittest_disk_ext2_4k.img \ |
| 899 | ue_unittest_disk_ext2_4k_empty.img \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 900 | ue_unittest_disk_ext2_unittest.img \ |
| 901 | ue_unittest_key.pem \ |
| 902 | ue_unittest_key.pub.pem \ |
| 903 | ue_unittest_key2.pem \ |
Sen Jiang | e0d0428 | 2016-03-01 14:22:52 -0800 | [diff] [blame] | 904 | ue_unittest_key2.pub.pem \ |
Sen Jiang | a050711 | 2017-10-06 15:18:46 -0700 | [diff] [blame] | 905 | ue_unittest_update_engine.conf |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 906 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 907 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 908 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 909 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 910 | LOCAL_C_INCLUDES := \ |
| 911 | $(ue_common_c_includes) \ |
| 912 | $(ue_libupdate_engine_exported_c_includes) |
| 913 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 914 | libpayload_generator \ |
| 915 | libbrillo-test-helpers \ |
| 916 | libgmock \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 917 | libchrome_test_helpers \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 918 | $(ue_common_static_libraries) \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 919 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 920 | LOCAL_SHARED_LIBRARIES := \ |
| 921 | $(ue_common_shared_libraries) \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 922 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 923 | LOCAL_SRC_FILES := \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 924 | certificate_checker_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 925 | common/action_pipe_unittest.cc \ |
| 926 | common/action_processor_unittest.cc \ |
| 927 | common/action_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 928 | common/cpu_limiter_unittest.cc \ |
| 929 | common/fake_prefs.cc \ |
Alex Deymo | 2c131bb | 2016-05-26 16:43:13 -0700 | [diff] [blame] | 930 | common/file_fetcher_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 931 | common/hash_calculator_unittest.cc \ |
| 932 | common/http_fetcher_unittest.cc \ |
| 933 | common/hwid_override_unittest.cc \ |
| 934 | common/mock_http_fetcher.cc \ |
| 935 | common/prefs_unittest.cc \ |
| 936 | common/subprocess_unittest.cc \ |
| 937 | common/terminator_unittest.cc \ |
| 938 | common/test_utils.cc \ |
| 939 | common/utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 940 | payload_consumer/bzip_extent_writer_unittest.cc \ |
Amin Hassani | acd7be8 | 2017-08-25 15:32:13 -0700 | [diff] [blame] | 941 | payload_consumer/cached_file_descriptor_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 942 | payload_consumer/delta_performer_integration_test.cc \ |
| 943 | payload_consumer/delta_performer_unittest.cc \ |
Amin Hassani | ee6d9a1 | 2017-08-31 14:09:15 -0700 | [diff] [blame] | 944 | payload_consumer/extent_reader_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 945 | payload_consumer/extent_writer_unittest.cc \ |
Alex Deymo | a48f630 | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 946 | payload_consumer/fake_file_descriptor.cc \ |
| 947 | payload_consumer/file_descriptor_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 948 | payload_consumer/file_writer_unittest.cc \ |
| 949 | payload_consumer/filesystem_verifier_action_unittest.cc \ |
| 950 | payload_consumer/postinstall_runner_action_unittest.cc \ |
| 951 | payload_consumer/xz_extent_writer_unittest.cc \ |
| 952 | payload_generator/ab_generator_unittest.cc \ |
| 953 | payload_generator/blob_file_writer_unittest.cc \ |
| 954 | payload_generator/block_mapping_unittest.cc \ |
Sen Jiang | 0a582fb | 2018-06-26 19:27:21 -0700 | [diff] [blame] | 955 | payload_generator/boot_img_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 956 | payload_generator/cycle_breaker_unittest.cc \ |
Amin Hassani | 924183b | 2017-09-27 14:50:59 -0700 | [diff] [blame] | 957 | payload_generator/deflate_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 958 | payload_generator/delta_diff_utils_unittest.cc \ |
| 959 | payload_generator/ext2_filesystem_unittest.cc \ |
| 960 | payload_generator/extent_ranges_unittest.cc \ |
| 961 | payload_generator/extent_utils_unittest.cc \ |
| 962 | payload_generator/fake_filesystem.cc \ |
| 963 | payload_generator/full_update_generator_unittest.cc \ |
| 964 | payload_generator/graph_utils_unittest.cc \ |
| 965 | payload_generator/inplace_generator_unittest.cc \ |
Alex Deymo | 20bdc70 | 2016-12-07 21:07:11 -0800 | [diff] [blame] | 966 | payload_generator/mapfile_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 967 | payload_generator/payload_file_unittest.cc \ |
| 968 | payload_generator/payload_generation_config_unittest.cc \ |
| 969 | payload_generator/payload_signer_unittest.cc \ |
Amin Hassani | d7da8f4 | 2017-08-23 14:29:40 -0700 | [diff] [blame] | 970 | payload_generator/squashfs_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 971 | payload_generator/tarjan_unittest.cc \ |
| 972 | payload_generator/topological_sort_unittest.cc \ |
| 973 | payload_generator/zip_unittest.cc \ |
Alex Deymo | 3582194 | 2017-02-05 04:36:02 +0000 | [diff] [blame] | 974 | proxy_resolver_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 975 | testrunner.cc |
| 976 | ifeq ($(local_use_omaha),1) |
| 977 | LOCAL_C_INCLUDES += \ |
| 978 | $(ue_libupdate_engine_exported_c_includes) |
| 979 | LOCAL_STATIC_LIBRARIES += \ |
| 980 | libupdate_engine \ |
| 981 | $(ue_libupdate_engine_exported_static_libraries:-host=) |
| 982 | LOCAL_SHARED_LIBRARIES += \ |
| 983 | $(ue_libupdate_engine_exported_shared_libraries:-host=) |
| 984 | LOCAL_SRC_FILES += \ |
| 985 | common_service_unittest.cc \ |
| 986 | fake_system_state.cc \ |
Sen Jiang | b56fe9f | 2017-06-16 15:19:35 -0700 | [diff] [blame] | 987 | image_properties_android_unittest.cc \ |
Tianjie Xu | 98333a8 | 2017-09-22 21:29:29 -0700 | [diff] [blame] | 988 | metrics_reporter_omaha_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 989 | metrics_utils_unittest.cc \ |
| 990 | omaha_request_action_unittest.cc \ |
| 991 | omaha_request_params_unittest.cc \ |
| 992 | omaha_response_handler_action_unittest.cc \ |
| 993 | omaha_utils_unittest.cc \ |
| 994 | p2p_manager_unittest.cc \ |
| 995 | payload_consumer/download_action_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 996 | payload_state_unittest.cc \ |
Aaron Wood | 7f92e2b | 2017-08-28 14:51:21 -0700 | [diff] [blame] | 997 | parcelable_update_engine_status_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 998 | update_attempter_unittest.cc \ |
Amin Hassani | 0882a51 | 2018-04-05 16:25:44 -0700 | [diff] [blame] | 999 | update_boot_flags_action_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 1000 | update_manager/android_things_policy_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1001 | update_manager/boxed_value_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 1002 | update_manager/chromeos_policy.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1003 | update_manager/chromeos_policy_unittest.cc \ |
Amin Hassani | 186ff6a | 2018-02-27 11:06:03 -0800 | [diff] [blame] | 1004 | update_manager/enterprise_device_policy_impl.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1005 | update_manager/evaluation_context_unittest.cc \ |
| 1006 | update_manager/generic_variables_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 1007 | update_manager/next_update_check_policy_impl_unittest.cc \ |
Amin Hassani | 186ff6a | 2018-02-27 11:06:03 -0800 | [diff] [blame] | 1008 | update_manager/out_of_box_experience_policy_impl.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 1009 | update_manager/policy_test_utils.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1010 | update_manager/prng_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1011 | update_manager/real_device_policy_provider_unittest.cc \ |
| 1012 | update_manager/real_random_provider_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1013 | update_manager/real_system_provider_unittest.cc \ |
| 1014 | update_manager/real_time_provider_unittest.cc \ |
| 1015 | update_manager/real_updater_provider_unittest.cc \ |
Adolfo Victoria | 5a0a82c | 2018-07-16 14:37:48 -0700 | [diff] [blame] | 1016 | update_manager/staging_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1017 | update_manager/umtest_utils.cc \ |
| 1018 | update_manager/update_manager_unittest.cc \ |
Adolfo Victoria | 94ffe13 | 2018-06-28 16:14:56 -0700 | [diff] [blame] | 1019 | update_manager/update_time_restrictions_policy_impl_unittest.cc \ |
| 1020 | update_manager/variable_unittest.cc \ |
| 1021 | update_manager/weekly_time_unittest.cc |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 1022 | else # local_use_omaha == 1 |
| 1023 | LOCAL_STATIC_LIBRARIES += \ |
| 1024 | libupdate_engine_android \ |
| 1025 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
| 1026 | LOCAL_SHARED_LIBRARIES += \ |
| 1027 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 1028 | LOCAL_SRC_FILES += \ |
| 1029 | update_attempter_android_unittest.cc |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 1030 | endif # local_use_omaha == 1 |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1031 | include $(BUILD_NATIVE_TEST) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1032 | |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1033 | # Update payload signing public key. |
| 1034 | # ======================================================== |
Alex Deymo | 78850aa | 2017-04-05 04:25:36 -0700 | [diff] [blame] | 1035 | ifeq ($(PRODUCT_IOT),true) |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1036 | include $(CLEAR_VARS) |
| 1037 | LOCAL_MODULE := brillo-update-payload-key |
| 1038 | LOCAL_MODULE_CLASS := ETC |
| 1039 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/update_engine |
| 1040 | LOCAL_MODULE_STEM := update-payload-key.pub.pem |
| 1041 | LOCAL_SRC_FILES := update_payload_key/brillo-update-payload-key.pub.pem |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1042 | include $(BUILD_PREBUILT) |
Alex Deymo | 78850aa | 2017-04-05 04:25:36 -0700 | [diff] [blame] | 1043 | endif # PRODUCT_IOT |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 1044 | |
| 1045 | # Brillo update payload generation script |
| 1046 | # ======================================================== |
| 1047 | ifeq ($(HOST_OS),linux) |
| 1048 | include $(CLEAR_VARS) |
| 1049 | LOCAL_SRC_FILES := scripts/brillo_update_payload |
| 1050 | LOCAL_MODULE := brillo_update_payload |
| 1051 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 1052 | LOCAL_IS_HOST_MODULE := true |
| 1053 | LOCAL_MODULE_TAGS := optional |
| 1054 | LOCAL_REQUIRED_MODULES := \ |
| 1055 | delta_generator \ |
Sen Jiang | db537c1 | 2017-09-20 14:53:05 -0700 | [diff] [blame] | 1056 | shflags \ |
| 1057 | simg2img |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 1058 | include $(BUILD_PREBUILT) |
| 1059 | endif # HOST_OS == linux |
Daniel Cardenas | 0c37e31 | 2017-11-06 12:01:33 -0800 | [diff] [blame] | 1060 | |
| 1061 | endif # ifneq ($(TARGET_BUILD_PDK),true) |