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