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 := \ |
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 \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 499 | sideload_main.cc \ |
| 500 | update_attempter_android.cc \ |
Amin Hassani | 667cf7b | 2018-07-25 14:32:00 -0700 | [diff] [blame] | 501 | update_boot_flags_action.cc \ |
Sen Jiang | d944faa | 2018-08-22 18:46:39 -0700 | [diff] [blame] | 502 | update_status_utils.cc |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame] | 503 | # Use commonly used shared libraries. libprotobuf-cpp-lite.so is filtered out, |
| 504 | # as it doesn't look beneficial to be installed separately due to its size. Note |
| 505 | # that we explicitly request their recovery variants, so that the expected files |
| 506 | # will be used and installed. |
| 507 | LOCAL_SHARED_LIBRARIES := \ |
| 508 | libbase.recovery \ |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame] | 509 | liblog.recovery \ |
Connor O'Brien | 97f5478 | 2018-08-24 12:45:49 -0700 | [diff] [blame] | 510 | $(filter-out libprotobuf-cpp-lite.recovery libhwbinder.recovery,$(ue_libupdate_engine_boot_control_exported_shared_libraries:=.recovery)) \ |
Tao Bao | b67b90a | 2018-08-13 12:03:26 -0700 | [diff] [blame] | 511 | $(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] | 512 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 513 | libpayload_consumer \ |
Connor O'Brien | 97f5478 | 2018-08-24 12:45:49 -0700 | [diff] [blame] | 514 | libupdate_engine_boot_control \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 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 | |
Connor O'Brien | 97f5478 | 2018-08-24 12:45:49 -0700 | [diff] [blame] | 530 | ifneq ($(strip $(PRODUCT_STATIC_BOOT_CONTROL_HAL)),) |
| 531 | LOCAL_REQUIRED_MODULES += android.hardware.boot@1.0-impl-wrapper.recovery |
| 532 | endif |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 533 | |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 534 | include $(BUILD_EXECUTABLE) |
| 535 | |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 536 | # libupdate_engine_client (type: shared_library) |
| 537 | # ======================================================== |
| 538 | include $(CLEAR_VARS) |
| 539 | LOCAL_MODULE := libupdate_engine_client |
| 540 | LOCAL_CFLAGS := \ |
| 541 | -Wall \ |
| 542 | -Werror \ |
| 543 | -Wno-unused-parameter \ |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 544 | -DUSE_BINDER=$(local_use_binder) |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 545 | LOCAL_CPP_EXTENSION := .cc |
| 546 | # TODO(deymo): Remove "external/cros/system_api/dbus" when dbus is not used. |
| 547 | LOCAL_C_INCLUDES := \ |
| 548 | $(LOCAL_PATH)/client_library/include \ |
| 549 | external/cros/system_api/dbus \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 550 | system |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 551 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/client_library/include |
| 552 | LOCAL_SHARED_LIBRARIES := \ |
| 553 | libchrome \ |
| 554 | libbrillo |
| 555 | LOCAL_SRC_FILES := \ |
| 556 | client_library/client.cc \ |
| 557 | update_status_utils.cc |
| 558 | |
Sen Jiang | a7c4de2 | 2017-03-02 15:53:54 -0800 | [diff] [blame] | 559 | # We only support binder IPC mechanism in Android. |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 560 | ifeq ($(local_use_binder),1) |
| 561 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 562 | LOCAL_SHARED_LIBRARIES += \ |
| 563 | libbinder \ |
| 564 | libbrillo-binder \ |
| 565 | libutils |
| 566 | LOCAL_SRC_FILES += \ |
| 567 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 568 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
| 569 | client_library/client_binder.cc \ |
| 570 | parcelable_update_engine_status.cc |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 571 | endif # local_use_binder == 1 |
| 572 | |
| 573 | include $(BUILD_SHARED_LIBRARY) |
| 574 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 575 | # update_engine_client (type: executable) |
| 576 | # ======================================================== |
| 577 | # update_engine console client. |
| 578 | include $(CLEAR_VARS) |
| 579 | LOCAL_MODULE := update_engine_client |
| 580 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 581 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 582 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 583 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 584 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Casey Dahlin | ce90f44 | 2016-01-25 16:55:28 -0800 | [diff] [blame] | 585 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 586 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 587 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 588 | ifeq ($(local_use_omaha),1) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 589 | LOCAL_SHARED_LIBRARIES += \ |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 590 | libupdate_engine_client |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 591 | LOCAL_SRC_FILES := \ |
Shuqian Zhao | 2997173 | 2016-02-05 11:29:32 -0800 | [diff] [blame] | 592 | update_engine_client.cc \ |
Alex Deymo | b3fa53b | 2016-04-18 19:57:58 -0700 | [diff] [blame] | 593 | common/error_code_utils.cc \ |
| 594 | omaha_utils.cc |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 595 | else # local_use_omaha == 1 |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 596 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 597 | # out of the DBus interface. |
| 598 | LOCAL_C_INCLUDES += \ |
| 599 | external/cros/system_api/dbus |
| 600 | LOCAL_SHARED_LIBRARIES += \ |
| 601 | libbinder \ |
Alex Deymo | 2130ee0 | 2016-02-02 18:35:50 -0800 | [diff] [blame] | 602 | libbinderwrapper \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 603 | libbrillo-binder \ |
| 604 | libutils |
| 605 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 606 | LOCAL_SRC_FILES := \ |
| 607 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 608 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 609 | common/error_code_utils.cc \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 610 | update_engine_client_android.cc \ |
| 611 | update_status_utils.cc |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 612 | endif # local_use_omaha == 1 |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 613 | include $(BUILD_EXECUTABLE) |
| 614 | |
| 615 | # libpayload_generator (type: static_library) |
| 616 | # ======================================================== |
| 617 | # server-side code. This is used for delta_generator and unittests but not |
| 618 | # for any client code. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 619 | ue_libpayload_generator_exported_static_libraries := \ |
Sen Jiang | 3a4dfac | 2018-08-30 16:57:38 -0700 | [diff] [blame] | 620 | libavb \ |
| 621 | libbrotli \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 622 | libbsdiff \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 623 | libdivsufsort \ |
| 624 | libdivsufsort64 \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 625 | liblzma \ |
Amin Hassani | 3cd4df1 | 2017-08-25 11:21:53 -0700 | [diff] [blame] | 626 | libpayload_consumer \ |
| 627 | libpuffdiff \ |
Sen Jiang | 5cc2a3f | 2018-09-04 14:04:18 -0700 | [diff] [blame] | 628 | libverity_tree \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 629 | update_metadata-protos \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 630 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 631 | $(ue_update_metadata_protos_exported_static_libraries) |
| 632 | ue_libpayload_generator_exported_shared_libraries := \ |
Sen Jiang | 5cc2a3f | 2018-09-04 14:04:18 -0700 | [diff] [blame] | 633 | libbase \ |
Alex Deymo | 89f6d67 | 2017-01-13 17:26:52 -0800 | [diff] [blame] | 634 | libext2fs \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 635 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 636 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 637 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 638 | ue_libpayload_generator_src_files := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 639 | payload_generator/ab_generator.cc \ |
| 640 | payload_generator/annotated_operation.cc \ |
| 641 | payload_generator/blob_file_writer.cc \ |
| 642 | payload_generator/block_mapping.cc \ |
Sen Jiang | 0a582fb | 2018-06-26 19:27:21 -0700 | [diff] [blame] | 643 | payload_generator/boot_img_filesystem.cc \ |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 644 | payload_generator/bzip.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 645 | payload_generator/cycle_breaker.cc \ |
Amin Hassani | 924183b | 2017-09-27 14:50:59 -0700 | [diff] [blame] | 646 | payload_generator/deflate_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 647 | payload_generator/delta_diff_generator.cc \ |
| 648 | payload_generator/delta_diff_utils.cc \ |
| 649 | payload_generator/ext2_filesystem.cc \ |
| 650 | payload_generator/extent_ranges.cc \ |
| 651 | payload_generator/extent_utils.cc \ |
| 652 | payload_generator/full_update_generator.cc \ |
| 653 | payload_generator/graph_types.cc \ |
| 654 | payload_generator/graph_utils.cc \ |
| 655 | payload_generator/inplace_generator.cc \ |
Alex Deymo | 20bdc70 | 2016-12-07 21:07:11 -0800 | [diff] [blame] | 656 | payload_generator/mapfile_filesystem.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 657 | payload_generator/payload_file.cc \ |
Sen Jiang | 3a4dfac | 2018-08-30 16:57:38 -0700 | [diff] [blame] | 658 | payload_generator/payload_generation_config_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 659 | payload_generator/payload_generation_config.cc \ |
| 660 | payload_generator/payload_signer.cc \ |
| 661 | payload_generator/raw_filesystem.cc \ |
Amin Hassani | d7da8f4 | 2017-08-23 14:29:40 -0700 | [diff] [blame] | 662 | payload_generator/squashfs_filesystem.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 663 | payload_generator/tarjan.cc \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 664 | payload_generator/topological_sort.cc \ |
| 665 | payload_generator/xz_android.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 666 | |
| 667 | ifeq ($(HOST_OS),linux) |
| 668 | # Build for the host. |
| 669 | include $(CLEAR_VARS) |
| 670 | LOCAL_MODULE := libpayload_generator |
| 671 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 672 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 673 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 674 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 675 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 676 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 677 | LOCAL_STATIC_LIBRARIES := \ |
Sen Jiang | 3a4dfac | 2018-08-30 16:57:38 -0700 | [diff] [blame] | 678 | libavb \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 679 | libbsdiff \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 680 | libdivsufsort \ |
| 681 | libdivsufsort64 \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 682 | liblzma \ |
Amin Hassani | 3cd4df1 | 2017-08-25 11:21:53 -0700 | [diff] [blame] | 683 | libpayload_consumer \ |
| 684 | libpuffdiff \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 685 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 686 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 687 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 688 | $(ue_update_metadata_protos_exported_static_libraries) |
| 689 | LOCAL_SHARED_LIBRARIES := \ |
| 690 | $(ue_common_shared_libraries) \ |
| 691 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 692 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 693 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 694 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
| 695 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 696 | endif # HOST_OS == linux |
| 697 | |
| 698 | # Build for the target. |
| 699 | include $(CLEAR_VARS) |
| 700 | LOCAL_MODULE := libpayload_generator |
| 701 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 702 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 703 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 704 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 705 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 706 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 707 | LOCAL_STATIC_LIBRARIES := \ |
Sen Jiang | 3a4dfac | 2018-08-30 16:57:38 -0700 | [diff] [blame] | 708 | libavb \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 709 | libbsdiff \ |
| 710 | libdivsufsort \ |
| 711 | libdivsufsort64 \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 712 | libpayload_consumer \ |
| 713 | update_metadata-protos \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 714 | liblzma \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 715 | $(ue_common_static_libraries) \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 716 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 717 | $(ue_update_metadata_protos_exported_static_libraries) |
| 718 | LOCAL_SHARED_LIBRARIES := \ |
| 719 | $(ue_common_shared_libraries) \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 720 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 721 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 722 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 723 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 724 | include $(BUILD_STATIC_LIBRARY) |
| 725 | |
| 726 | # delta_generator (type: executable) |
| 727 | # ======================================================== |
| 728 | # server-side delta generator. |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 729 | ue_delta_generator_src_files := \ |
| 730 | payload_generator/generate_delta_main.cc |
| 731 | |
| 732 | ifeq ($(HOST_OS),linux) |
| 733 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 734 | include $(CLEAR_VARS) |
| 735 | LOCAL_MODULE := delta_generator |
| 736 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 737 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 738 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 739 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 740 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 741 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 742 | LOCAL_STATIC_LIBRARIES := \ |
Sen Jiang | 3a4dfac | 2018-08-30 16:57:38 -0700 | [diff] [blame] | 743 | libavb_host_sysdeps \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 744 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 745 | libpayload_generator \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 746 | $(ue_common_static_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 747 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 748 | $(ue_libpayload_generator_exported_static_libraries) |
| 749 | LOCAL_SHARED_LIBRARIES := \ |
| 750 | $(ue_common_shared_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 751 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 752 | $(ue_libpayload_generator_exported_shared_libraries) |
Sen Jiang | 5520b2d | 2018-05-11 11:38:43 -0700 | [diff] [blame] | 753 | LOCAL_SHARED_LIBRARIES := $(filter-out libfec,$(LOCAL_SHARED_LIBRARIES)) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 754 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
| 755 | include $(BUILD_HOST_EXECUTABLE) |
| 756 | endif # HOST_OS == linux |
| 757 | |
| 758 | # Build for the target. |
| 759 | include $(CLEAR_VARS) |
Sen Jiang | 5a216c1 | 2016-03-30 13:08:24 -0700 | [diff] [blame] | 760 | LOCAL_MODULE := ue_unittest_delta_generator |
| 761 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 762 | LOCAL_MODULE_STEM := delta_generator |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 763 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 764 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 765 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 766 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 767 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 768 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 769 | LOCAL_STATIC_LIBRARIES := \ |
| 770 | libpayload_consumer \ |
| 771 | libpayload_generator \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 772 | $(ue_common_static_libraries) \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 773 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 774 | $(ue_libpayload_generator_exported_static_libraries) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 775 | LOCAL_SHARED_LIBRARIES := \ |
| 776 | $(ue_common_shared_libraries) \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 777 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 778 | $(ue_libpayload_generator_exported_shared_libraries) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 779 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 780 | include $(BUILD_EXECUTABLE) |
| 781 | |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 782 | # Private and public keys for unittests. |
| 783 | # ======================================================== |
| 784 | # Generate a module that installs a prebuilt private key and a module that |
| 785 | # installs a public key generated from the private key. |
| 786 | # |
| 787 | # $(1): The path to the private key in pem format. |
| 788 | define ue-unittest-keys |
| 789 | $(eval include $(CLEAR_VARS)) \ |
| 790 | $(eval LOCAL_MODULE := ue_$(1).pem) \ |
| 791 | $(eval LOCAL_MODULE_CLASS := ETC) \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 792 | $(eval LOCAL_SRC_FILES := $(1).pem) \ |
| 793 | $(eval LOCAL_MODULE_PATH := \ |
| 794 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests) \ |
| 795 | $(eval LOCAL_MODULE_STEM := $(1).pem) \ |
| 796 | $(eval include $(BUILD_PREBUILT)) \ |
| 797 | \ |
| 798 | $(eval include $(CLEAR_VARS)) \ |
| 799 | $(eval LOCAL_MODULE := ue_$(1).pub.pem) \ |
| 800 | $(eval LOCAL_MODULE_CLASS := ETC) \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 801 | $(eval LOCAL_MODULE_PATH := \ |
| 802 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests) \ |
| 803 | $(eval LOCAL_MODULE_STEM := $(1).pub.pem) \ |
| 804 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 805 | $(eval $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(1).pem ; \ |
| 806 | openssl rsa -in $$< -pubout -out $$@) |
| 807 | endef |
| 808 | |
| 809 | $(call ue-unittest-keys,unittest_key) |
| 810 | $(call ue-unittest-keys,unittest_key2) |
| 811 | |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 812 | # Sample images for unittests. |
| 813 | # ======================================================== |
| 814 | # Generate a prebuilt module that installs a sample image from the compressed |
| 815 | # sample_images.tar.bz2 file used by the unittests. |
| 816 | # |
| 817 | # $(1): The filename in the sample_images.tar.bz2 |
| 818 | define ue-unittest-sample-image |
| 819 | $(eval include $(CLEAR_VARS)) \ |
| 820 | $(eval LOCAL_MODULE := ue_unittest_$(1)) \ |
| 821 | $(eval LOCAL_MODULE_CLASS := EXECUTABLES) \ |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 822 | $(eval LOCAL_MODULE_PATH := \ |
| 823 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests/gen) \ |
| 824 | $(eval LOCAL_MODULE_STEM := $(1)) \ |
Alex Deymo | a3553e4 | 2016-03-04 18:55:05 -0800 | [diff] [blame] | 825 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 826 | $(eval $(LOCAL_BUILT_MODULE) : \ |
| 827 | $(LOCAL_PATH)/sample_images/sample_images.tar.bz2 ; \ |
| 828 | tar -jxf $$< -C $$(dir $$@) $$(notdir $$@) && touch $$@) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 829 | endef |
| 830 | |
| 831 | $(call ue-unittest-sample-image,disk_ext2_1k.img) |
| 832 | $(call ue-unittest-sample-image,disk_ext2_4k.img) |
| 833 | $(call ue-unittest-sample-image,disk_ext2_4k_empty.img) |
Alex Deymo | d15c546 | 2016-03-09 18:11:12 -0800 | [diff] [blame] | 834 | $(call ue-unittest-sample-image,disk_ext2_unittest.img) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 835 | |
Sen Jiang | ee63c6e | 2016-03-30 14:01:02 -0700 | [diff] [blame] | 836 | # update_engine.conf |
| 837 | # ======================================================== |
| 838 | include $(CLEAR_VARS) |
| 839 | LOCAL_MODULE := ue_unittest_update_engine.conf |
| 840 | LOCAL_MODULE_CLASS := ETC |
| 841 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 842 | LOCAL_MODULE_STEM := update_engine.conf |
| 843 | LOCAL_SRC_FILES := update_engine.conf |
| 844 | include $(BUILD_PREBUILT) |
| 845 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 846 | # test_http_server (type: executable) |
| 847 | # ======================================================== |
| 848 | # Test HTTP Server. |
| 849 | include $(CLEAR_VARS) |
| 850 | LOCAL_MODULE := test_http_server |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 851 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 852 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 853 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 854 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 855 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 856 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 857 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 858 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 859 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 860 | LOCAL_SRC_FILES := \ |
| 861 | common/http_common.cc \ |
| 862 | test_http_server.cc |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 863 | include $(BUILD_EXECUTABLE) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 864 | |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 865 | # test_subprocess (type: executable) |
| 866 | # ======================================================== |
| 867 | # Test helper subprocess program. |
| 868 | include $(CLEAR_VARS) |
| 869 | LOCAL_MODULE := test_subprocess |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 870 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 871 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 872 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 873 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 874 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 875 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 876 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 877 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 878 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 879 | LOCAL_SRC_FILES := test_subprocess.cc |
| 880 | include $(BUILD_EXECUTABLE) |
| 881 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 882 | # update_engine_unittests (type: executable) |
| 883 | # ======================================================== |
| 884 | # Main unittest file. |
| 885 | include $(CLEAR_VARS) |
| 886 | LOCAL_MODULE := update_engine_unittests |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 887 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 888 | test_http_server \ |
| 889 | test_subprocess \ |
Sen Jiang | 5a216c1 | 2016-03-30 13:08:24 -0700 | [diff] [blame] | 890 | ue_unittest_delta_generator \ |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 891 | ue_unittest_disk_ext2_1k.img \ |
| 892 | ue_unittest_disk_ext2_4k.img \ |
| 893 | ue_unittest_disk_ext2_4k_empty.img \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 894 | ue_unittest_disk_ext2_unittest.img \ |
| 895 | ue_unittest_key.pem \ |
| 896 | ue_unittest_key.pub.pem \ |
| 897 | ue_unittest_key2.pem \ |
Sen Jiang | e0d0428 | 2016-03-01 14:22:52 -0800 | [diff] [blame] | 898 | ue_unittest_key2.pub.pem \ |
Sen Jiang | a050711 | 2017-10-06 15:18:46 -0700 | [diff] [blame] | 899 | ue_unittest_update_engine.conf |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 900 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 901 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 902 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 903 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 904 | LOCAL_C_INCLUDES := \ |
| 905 | $(ue_common_c_includes) \ |
| 906 | $(ue_libupdate_engine_exported_c_includes) |
| 907 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 908 | libpayload_generator \ |
| 909 | libbrillo-test-helpers \ |
| 910 | libgmock \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 911 | libchrome_test_helpers \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 912 | $(ue_common_static_libraries) \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 913 | $(ue_libpayload_generator_exported_static_libraries) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 914 | LOCAL_SHARED_LIBRARIES := \ |
Yifan Hong | 537802d | 2018-08-15 13:15:42 -0700 | [diff] [blame] | 915 | libhidltransport \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 916 | $(ue_common_shared_libraries) \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 917 | $(ue_libpayload_generator_exported_shared_libraries) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 918 | LOCAL_SRC_FILES := \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 919 | certificate_checker_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 920 | common/action_pipe_unittest.cc \ |
| 921 | common/action_processor_unittest.cc \ |
| 922 | common/action_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 923 | common/cpu_limiter_unittest.cc \ |
| 924 | common/fake_prefs.cc \ |
Alex Deymo | 2c131bb | 2016-05-26 16:43:13 -0700 | [diff] [blame] | 925 | common/file_fetcher_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 926 | common/hash_calculator_unittest.cc \ |
| 927 | common/http_fetcher_unittest.cc \ |
| 928 | common/hwid_override_unittest.cc \ |
| 929 | common/mock_http_fetcher.cc \ |
| 930 | common/prefs_unittest.cc \ |
Sen Jiang | d8be4b5 | 2018-09-18 16:06:57 -0700 | [diff] [blame] | 931 | common/proxy_resolver_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 932 | common/subprocess_unittest.cc \ |
| 933 | common/terminator_unittest.cc \ |
| 934 | common/test_utils.cc \ |
| 935 | common/utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 936 | payload_consumer/bzip_extent_writer_unittest.cc \ |
Amin Hassani | acd7be8 | 2017-08-25 15:32:13 -0700 | [diff] [blame] | 937 | payload_consumer/cached_file_descriptor_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 938 | payload_consumer/delta_performer_integration_test.cc \ |
| 939 | payload_consumer/delta_performer_unittest.cc \ |
Amin Hassani | ee6d9a1 | 2017-08-31 14:09:15 -0700 | [diff] [blame] | 940 | payload_consumer/extent_reader_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 941 | payload_consumer/extent_writer_unittest.cc \ |
Alex Deymo | a48f630 | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 942 | payload_consumer/fake_file_descriptor.cc \ |
| 943 | payload_consumer/file_descriptor_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 944 | payload_consumer/file_writer_unittest.cc \ |
| 945 | payload_consumer/filesystem_verifier_action_unittest.cc \ |
| 946 | payload_consumer/postinstall_runner_action_unittest.cc \ |
Sen Jiang | 57f9180 | 2017-11-14 17:42:13 -0800 | [diff] [blame] | 947 | payload_consumer/verity_writer_android_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 948 | payload_consumer/xz_extent_writer_unittest.cc \ |
| 949 | payload_generator/ab_generator_unittest.cc \ |
| 950 | payload_generator/blob_file_writer_unittest.cc \ |
| 951 | payload_generator/block_mapping_unittest.cc \ |
Sen Jiang | 0a582fb | 2018-06-26 19:27:21 -0700 | [diff] [blame] | 952 | payload_generator/boot_img_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 953 | payload_generator/cycle_breaker_unittest.cc \ |
Amin Hassani | 924183b | 2017-09-27 14:50:59 -0700 | [diff] [blame] | 954 | payload_generator/deflate_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 955 | payload_generator/delta_diff_utils_unittest.cc \ |
| 956 | payload_generator/ext2_filesystem_unittest.cc \ |
| 957 | payload_generator/extent_ranges_unittest.cc \ |
| 958 | payload_generator/extent_utils_unittest.cc \ |
| 959 | payload_generator/fake_filesystem.cc \ |
| 960 | payload_generator/full_update_generator_unittest.cc \ |
| 961 | payload_generator/graph_utils_unittest.cc \ |
| 962 | payload_generator/inplace_generator_unittest.cc \ |
Alex Deymo | 20bdc70 | 2016-12-07 21:07:11 -0800 | [diff] [blame] | 963 | payload_generator/mapfile_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 964 | payload_generator/payload_file_unittest.cc \ |
Sen Jiang | a8712bc | 2018-09-18 14:23:46 -0700 | [diff] [blame] | 965 | payload_generator/payload_generation_config_android_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 966 | payload_generator/payload_generation_config_unittest.cc \ |
| 967 | payload_generator/payload_signer_unittest.cc \ |
Amin Hassani | d7da8f4 | 2017-08-23 14:29:40 -0700 | [diff] [blame] | 968 | payload_generator/squashfs_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 969 | payload_generator/tarjan_unittest.cc \ |
| 970 | payload_generator/topological_sort_unittest.cc \ |
| 971 | payload_generator/zip_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 972 | testrunner.cc |
| 973 | ifeq ($(local_use_omaha),1) |
| 974 | LOCAL_C_INCLUDES += \ |
| 975 | $(ue_libupdate_engine_exported_c_includes) |
| 976 | LOCAL_STATIC_LIBRARIES += \ |
| 977 | libupdate_engine \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 978 | $(ue_libupdate_engine_exported_static_libraries) |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 979 | LOCAL_SHARED_LIBRARIES += \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 980 | $(ue_libupdate_engine_exported_shared_libraries) |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 981 | LOCAL_SRC_FILES += \ |
| 982 | common_service_unittest.cc \ |
| 983 | fake_system_state.cc \ |
Sen Jiang | b56fe9f | 2017-06-16 15:19:35 -0700 | [diff] [blame] | 984 | image_properties_android_unittest.cc \ |
Tianjie Xu | 98333a8 | 2017-09-22 21:29:29 -0700 | [diff] [blame] | 985 | metrics_reporter_omaha_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 986 | metrics_utils_unittest.cc \ |
| 987 | omaha_request_action_unittest.cc \ |
| 988 | omaha_request_params_unittest.cc \ |
| 989 | omaha_response_handler_action_unittest.cc \ |
| 990 | omaha_utils_unittest.cc \ |
| 991 | p2p_manager_unittest.cc \ |
| 992 | payload_consumer/download_action_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 993 | payload_state_unittest.cc \ |
Aaron Wood | 7f92e2b | 2017-08-28 14:51:21 -0700 | [diff] [blame] | 994 | parcelable_update_engine_status_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 995 | update_attempter_unittest.cc \ |
Amin Hassani | 0882a51 | 2018-04-05 16:25:44 -0700 | [diff] [blame] | 996 | update_boot_flags_action_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 997 | update_manager/android_things_policy_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 998 | update_manager/boxed_value_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 999 | update_manager/chromeos_policy.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1000 | update_manager/chromeos_policy_unittest.cc \ |
Amin Hassani | 186ff6a | 2018-02-27 11:06:03 -0800 | [diff] [blame] | 1001 | update_manager/enterprise_device_policy_impl.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1002 | update_manager/evaluation_context_unittest.cc \ |
| 1003 | update_manager/generic_variables_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 1004 | update_manager/next_update_check_policy_impl_unittest.cc \ |
Amin Hassani | 186ff6a | 2018-02-27 11:06:03 -0800 | [diff] [blame] | 1005 | update_manager/out_of_box_experience_policy_impl.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 1006 | update_manager/policy_test_utils.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1007 | update_manager/prng_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1008 | update_manager/real_device_policy_provider_unittest.cc \ |
| 1009 | update_manager/real_random_provider_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1010 | update_manager/real_system_provider_unittest.cc \ |
| 1011 | update_manager/real_time_provider_unittest.cc \ |
| 1012 | update_manager/real_updater_provider_unittest.cc \ |
Adolfo Victoria | 5a0a82c | 2018-07-16 14:37:48 -0700 | [diff] [blame] | 1013 | update_manager/staging_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1014 | update_manager/umtest_utils.cc \ |
| 1015 | update_manager/update_manager_unittest.cc \ |
Adolfo Victoria | 94ffe13 | 2018-06-28 16:14:56 -0700 | [diff] [blame] | 1016 | update_manager/update_time_restrictions_policy_impl_unittest.cc \ |
| 1017 | update_manager/variable_unittest.cc \ |
| 1018 | update_manager/weekly_time_unittest.cc |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 1019 | else # local_use_omaha == 1 |
| 1020 | LOCAL_STATIC_LIBRARIES += \ |
| 1021 | libupdate_engine_android \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 1022 | $(ue_libupdate_engine_android_exported_static_libraries) |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 1023 | LOCAL_SHARED_LIBRARIES += \ |
Sen Jiang | 4118d17 | 2018-08-22 16:29:35 -0700 | [diff] [blame] | 1024 | $(ue_libupdate_engine_android_exported_shared_libraries) |
Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 1025 | LOCAL_SRC_FILES += \ |
Yifan Hong | 537802d | 2018-08-15 13:15:42 -0700 | [diff] [blame] | 1026 | boot_control_android_unittest.cc \ |
Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 1027 | update_attempter_android_unittest.cc |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 1028 | endif # local_use_omaha == 1 |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1029 | include $(BUILD_NATIVE_TEST) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1030 | |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1031 | # Update payload signing public key. |
| 1032 | # ======================================================== |
Alex Deymo | 78850aa | 2017-04-05 04:25:36 -0700 | [diff] [blame] | 1033 | ifeq ($(PRODUCT_IOT),true) |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1034 | include $(CLEAR_VARS) |
| 1035 | LOCAL_MODULE := brillo-update-payload-key |
| 1036 | LOCAL_MODULE_CLASS := ETC |
| 1037 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/update_engine |
| 1038 | LOCAL_MODULE_STEM := update-payload-key.pub.pem |
| 1039 | LOCAL_SRC_FILES := update_payload_key/brillo-update-payload-key.pub.pem |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1040 | include $(BUILD_PREBUILT) |
Alex Deymo | 78850aa | 2017-04-05 04:25:36 -0700 | [diff] [blame] | 1041 | endif # PRODUCT_IOT |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 1042 | |
| 1043 | # Brillo update payload generation script |
| 1044 | # ======================================================== |
| 1045 | ifeq ($(HOST_OS),linux) |
| 1046 | include $(CLEAR_VARS) |
| 1047 | LOCAL_SRC_FILES := scripts/brillo_update_payload |
| 1048 | LOCAL_MODULE := brillo_update_payload |
| 1049 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 1050 | LOCAL_IS_HOST_MODULE := true |
| 1051 | LOCAL_MODULE_TAGS := optional |
| 1052 | LOCAL_REQUIRED_MODULES := \ |
| 1053 | delta_generator \ |
Sen Jiang | db537c1 | 2017-09-20 14:53:05 -0700 | [diff] [blame] | 1054 | shflags \ |
| 1055 | simg2img |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 1056 | include $(BUILD_PREBUILT) |
| 1057 | endif # HOST_OS == linux |
Daniel Cardenas | 0c37e31 | 2017-11-06 12:01:33 -0800 | [diff] [blame] | 1058 | |
| 1059 | endif # ifneq ($(TARGET_BUILD_PDK),true) |