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