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