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