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