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