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