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