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