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 := \ |
| 198 | $(ue_common_c_includes) \ |
| 199 | external/e2fsprogs/lib |
| 200 | LOCAL_STATIC_LIBRARIES := \ |
| 201 | update_metadata-protos \ |
| 202 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 203 | $(ue_update_metadata_protos_exported_static_libraries) |
| 204 | LOCAL_SHARED_LIBRARIES := \ |
| 205 | $(ue_common_shared_libraries) \ |
| 206 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 207 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 208 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
| 209 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 210 | endif # HOST_OS == linux |
| 211 | |
| 212 | # Build for the target. |
| 213 | include $(CLEAR_VARS) |
| 214 | LOCAL_MODULE := libpayload_consumer |
| 215 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 216 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 217 | LOCAL_CLANG := true |
| 218 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 219 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 220 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 221 | LOCAL_C_INCLUDES := \ |
| 222 | $(ue_common_c_includes) \ |
| 223 | external/e2fsprogs/lib |
| 224 | LOCAL_STATIC_LIBRARIES := \ |
| 225 | update_metadata-protos \ |
| 226 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 227 | $(ue_update_metadata_protos_exported_static_libraries) |
| 228 | LOCAL_SHARED_LIBRARIES := \ |
| 229 | $(ue_common_shared_libraries) \ |
| 230 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 231 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 232 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 233 | include $(BUILD_STATIC_LIBRARY) |
| 234 | |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 235 | ifdef BRILLO |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 236 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 237 | # libupdate_engine (type: static_library) |
| 238 | # ======================================================== |
| 239 | # The main daemon static_library with all the code used to check for updates |
| 240 | # with Omaha and expose a DBus daemon. |
| 241 | ue_libupdate_engine_exported_c_includes := \ |
| 242 | $(LOCAL_PATH)/include \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 243 | external/cros/system_api/dbus |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 244 | ue_libupdate_engine_exported_static_libraries := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 245 | libpayload_consumer \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 246 | update_metadata-protos \ |
| 247 | update_engine-dbus-adaptor \ |
| 248 | update_engine-dbus-libcros-client \ |
| 249 | update_engine_client-dbus-proxies \ |
David Zeuthen | 753fadc | 2015-09-15 16:34:09 -0400 | [diff] [blame] | 250 | libbz \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 251 | libfs_mgr \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 252 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 253 | $(ue_update_metadata_protos_exported_static_libraries) |
| 254 | ue_libupdate_engine_exported_shared_libraries := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 255 | libdbus \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 256 | libbrillo-dbus \ |
| 257 | libchrome-dbus \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 258 | libmetrics \ |
Alex Deymo | 7eb2305 | 2015-10-09 15:27:59 -0700 | [diff] [blame] | 259 | libshill-client \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 260 | libexpat \ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 261 | libbrillo-policy \ |
Alex Deymo | eadab7d | 2015-10-09 14:45:02 -0700 | [diff] [blame] | 262 | libhardware \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 263 | libcutils \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 264 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 265 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | c003790 | 2016-01-23 17:29:02 -0800 | [diff] [blame] | 266 | ifeq ($(local_use_binder),1) |
| 267 | ue_libupdate_engine_exported_shared_libraries += \ |
| 268 | libbinder \ |
| 269 | libbinderwrapper \ |
| 270 | libbrillo-binder \ |
| 271 | libutils |
| 272 | endif # local_use_binder == 1 |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 273 | ifeq ($(local_use_weave),1) |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 274 | ue_libupdate_engine_exported_shared_libraries += \ |
Alex Deymo | 7ff02cf | 2016-01-22 11:06:51 -0800 | [diff] [blame] | 275 | libbinderwrapper \ |
| 276 | libbrillo-binder \ |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 277 | libweaved |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 278 | endif # local_use_weave == 1 |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 279 | |
| 280 | include $(CLEAR_VARS) |
| 281 | LOCAL_MODULE := libupdate_engine |
| 282 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 283 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 284 | LOCAL_CLANG := true |
| 285 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(ue_libupdate_engine_exported_c_includes) |
| 286 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 287 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 288 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 289 | LOCAL_C_INCLUDES := \ |
| 290 | $(ue_common_c_includes) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 291 | $(ue_libupdate_engine_exported_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 292 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 293 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 294 | update_metadata-protos \ |
| 295 | update_engine-dbus-adaptor \ |
| 296 | update_engine-dbus-libcros-client \ |
| 297 | update_engine_client-dbus-proxies \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 298 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 299 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 300 | $(ue_update_metadata_protos_exported_static_libraries) |
| 301 | LOCAL_SHARED_LIBRARIES := \ |
| 302 | $(ue_common_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 303 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 304 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 305 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 306 | LOCAL_SRC_FILES := \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 307 | boot_control_android.cc \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 308 | common_service.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 309 | connection_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 310 | daemon.cc \ |
| 311 | dbus_service.cc \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 312 | hardware_android.cc \ |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 313 | image_properties_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 314 | libcros_proxy.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 315 | metrics.cc \ |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 316 | metrics_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 317 | omaha_request_action.cc \ |
| 318 | omaha_request_params.cc \ |
| 319 | omaha_response_handler_action.cc \ |
| 320 | p2p_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 321 | payload_state.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 322 | proxy_resolver.cc \ |
| 323 | real_system_state.cc \ |
| 324 | shill_proxy.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 325 | update_attempter.cc \ |
| 326 | update_manager/boxed_value.cc \ |
| 327 | update_manager/chromeos_policy.cc \ |
| 328 | update_manager/default_policy.cc \ |
| 329 | update_manager/evaluation_context.cc \ |
| 330 | update_manager/policy.cc \ |
| 331 | update_manager/real_config_provider.cc \ |
| 332 | update_manager/real_device_policy_provider.cc \ |
| 333 | update_manager/real_random_provider.cc \ |
| 334 | update_manager/real_shill_provider.cc \ |
| 335 | update_manager/real_system_provider.cc \ |
| 336 | update_manager/real_time_provider.cc \ |
| 337 | update_manager/real_updater_provider.cc \ |
| 338 | update_manager/state_factory.cc \ |
| 339 | update_manager/update_manager.cc \ |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 340 | update_status_utils.cc \ |
| 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) \ |
| 376 | libbinder \ |
| 377 | libbinderwrapper \ |
| 378 | libbrillo-binder \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 379 | libcutils \ |
| 380 | libhardware \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 381 | libutils |
| 382 | |
| 383 | include $(CLEAR_VARS) |
| 384 | LOCAL_MODULE := libupdate_engine_android |
| 385 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 386 | LOCAL_CPP_EXTENSION := .cc |
| 387 | LOCAL_CLANG := true |
| 388 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 389 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 390 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 391 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 392 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 393 | # out of the DBus interface. |
| 394 | LOCAL_C_INCLUDES += \ |
| 395 | external/cros/system_api/dbus |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 396 | LOCAL_STATIC_LIBRARIES := \ |
| 397 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
| 398 | LOCAL_SHARED_LIBRARIES += \ |
| 399 | $(ue_common_shared_libraries) \ |
| 400 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
| 401 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 402 | LOCAL_SRC_FILES += \ |
| 403 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 404 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
| 405 | binder_service_android.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 406 | boot_control_android.cc \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 407 | daemon.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 408 | daemon_state_android.cc \ |
| 409 | hardware_android.cc \ |
| 410 | proxy_resolver.cc \ |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 411 | update_attempter_android.cc \ |
| 412 | update_status_utils.cc |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 413 | include $(BUILD_STATIC_LIBRARY) |
| 414 | |
| 415 | endif # !defined(BRILLO) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 416 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 417 | # update_engine (type: executable) |
| 418 | # ======================================================== |
| 419 | # update_engine daemon. |
| 420 | include $(CLEAR_VARS) |
| 421 | LOCAL_MODULE := update_engine |
| 422 | LOCAL_MODULE_CLASS := EXECUTABLES |
Sen Jiang | 5609277 | 2015-11-23 14:41:00 -0800 | [diff] [blame] | 423 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | ab49446 | 2015-11-30 17:07:36 -0300 | [diff] [blame] | 424 | bspatch \ |
| 425 | cacerts_google |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 426 | ifeq ($(local_use_weave),1) |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 427 | LOCAL_REQUIRED_MODULES += updater.json |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 428 | endif # local_use_weave == 1 |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 429 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 430 | LOCAL_CLANG := true |
| 431 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 432 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 433 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 434 | LOCAL_C_INCLUDES := \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 435 | $(ue_common_c_includes) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 436 | LOCAL_SHARED_LIBRARIES := \ |
| 437 | $(ue_common_shared_libraries) |
| 438 | LOCAL_SRC_FILES := \ |
| 439 | main.cc |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 440 | |
| 441 | ifdef BRILLO |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 442 | LOCAL_C_INCLUDES += \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 443 | $(ue_libupdate_engine_exported_c_includes) |
| 444 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 445 | libupdate_engine \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 446 | $(ue_libupdate_engine_exported_static_libraries:-host=) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 447 | LOCAL_SHARED_LIBRARIES += \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 448 | $(ue_libupdate_engine_exported_shared_libraries:-host=) |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 449 | else # !defined(BRILLO) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 450 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 451 | libupdate_engine_android \ |
| 452 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 453 | LOCAL_SHARED_LIBRARIES += \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 454 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
| 455 | endif # !defined(BRILLO) |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 456 | |
Gilad Arnold | 70141f2 | 2015-09-17 09:06:30 -0700 | [diff] [blame] | 457 | LOCAL_INIT_RC := update_engine.rc |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 458 | include $(BUILD_EXECUTABLE) |
| 459 | |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 460 | # libupdate_engine_client (type: shared_library) |
| 461 | # ======================================================== |
| 462 | include $(CLEAR_VARS) |
| 463 | LOCAL_MODULE := libupdate_engine_client |
| 464 | LOCAL_CFLAGS := \ |
| 465 | -Wall \ |
| 466 | -Werror \ |
| 467 | -Wno-unused-parameter \ |
| 468 | -DUSE_DBUS=$(local_use_dbus) \ |
| 469 | -DUSE_BINDER=$(local_use_binder) |
| 470 | LOCAL_CLANG := true |
| 471 | LOCAL_CPP_EXTENSION := .cc |
| 472 | # TODO(deymo): Remove "external/cros/system_api/dbus" when dbus is not used. |
| 473 | LOCAL_C_INCLUDES := \ |
| 474 | $(LOCAL_PATH)/client_library/include \ |
| 475 | external/cros/system_api/dbus \ |
| 476 | system \ |
| 477 | external/gtest/include |
| 478 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/client_library/include |
| 479 | LOCAL_SHARED_LIBRARIES := \ |
| 480 | libchrome \ |
| 481 | libbrillo |
| 482 | LOCAL_SRC_FILES := \ |
| 483 | client_library/client.cc \ |
| 484 | update_status_utils.cc |
| 485 | |
| 486 | # We can only compile support for one IPC mechanism. If both "binder" and "dbus" |
| 487 | # are defined, we prefer binder. |
| 488 | ifeq ($(local_use_binder),1) |
| 489 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 490 | LOCAL_SHARED_LIBRARIES += \ |
| 491 | libbinder \ |
| 492 | libbrillo-binder \ |
| 493 | libutils |
| 494 | LOCAL_SRC_FILES += \ |
| 495 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 496 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
| 497 | client_library/client_binder.cc \ |
| 498 | parcelable_update_engine_status.cc |
| 499 | else # local_use_binder != 1 |
| 500 | LOCAL_STATIC_LIBRARIES := \ |
| 501 | update_engine_client-dbus-proxies |
| 502 | LOCAL_SHARED_LIBRARIES += \ |
| 503 | libchrome-dbus \ |
| 504 | libbrillo-dbus |
| 505 | LOCAL_SRC_FILES += \ |
| 506 | client_library/client_dbus.cc |
| 507 | endif # local_use_binder == 1 |
| 508 | |
| 509 | include $(BUILD_SHARED_LIBRARY) |
| 510 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 511 | # update_engine_client (type: executable) |
| 512 | # ======================================================== |
| 513 | # update_engine console client. |
| 514 | include $(CLEAR_VARS) |
| 515 | LOCAL_MODULE := update_engine_client |
| 516 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 517 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 518 | LOCAL_CLANG := true |
| 519 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 520 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 521 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Casey Dahlin | ce90f44 | 2016-01-25 16:55:28 -0800 | [diff] [blame] | 522 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 523 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
| 524 | ifdef BRILLO |
| 525 | LOCAL_SHARED_LIBRARIES += \ |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 526 | libupdate_engine_client |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 527 | LOCAL_SRC_FILES := \ |
Shuqian Zhao | 2997173 | 2016-02-05 11:29:32 -0800 | [diff] [blame] | 528 | update_engine_client.cc \ |
| 529 | common/error_code_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 | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 557 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 558 | $(ue_update_metadata_protos_exported_static_libraries) |
| 559 | ue_libpayload_generator_exported_shared_libraries := \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 560 | libext2fs-host \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 561 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 562 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 563 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 564 | ue_libpayload_generator_src_files := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 565 | payload_generator/ab_generator.cc \ |
| 566 | payload_generator/annotated_operation.cc \ |
| 567 | payload_generator/blob_file_writer.cc \ |
| 568 | payload_generator/block_mapping.cc \ |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 569 | payload_generator/bzip.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 570 | payload_generator/cycle_breaker.cc \ |
| 571 | payload_generator/delta_diff_generator.cc \ |
| 572 | payload_generator/delta_diff_utils.cc \ |
| 573 | payload_generator/ext2_filesystem.cc \ |
| 574 | payload_generator/extent_ranges.cc \ |
| 575 | payload_generator/extent_utils.cc \ |
| 576 | payload_generator/full_update_generator.cc \ |
| 577 | payload_generator/graph_types.cc \ |
| 578 | payload_generator/graph_utils.cc \ |
| 579 | payload_generator/inplace_generator.cc \ |
| 580 | payload_generator/payload_file.cc \ |
| 581 | payload_generator/payload_generation_config.cc \ |
| 582 | payload_generator/payload_signer.cc \ |
| 583 | payload_generator/raw_filesystem.cc \ |
| 584 | payload_generator/tarjan.cc \ |
| 585 | payload_generator/topological_sort.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 586 | |
| 587 | ifeq ($(HOST_OS),linux) |
| 588 | # Build for the host. |
| 589 | include $(CLEAR_VARS) |
| 590 | LOCAL_MODULE := libpayload_generator |
| 591 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 592 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 593 | LOCAL_CLANG := true |
| 594 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 595 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 596 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 597 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 598 | LOCAL_STATIC_LIBRARIES := \ |
| 599 | libpayload_consumer \ |
| 600 | update_metadata-protos \ |
| 601 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 602 | $(ue_update_metadata_protos_exported_static_libraries) |
| 603 | LOCAL_SHARED_LIBRARIES := \ |
| 604 | $(ue_common_shared_libraries) \ |
| 605 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 606 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 607 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 608 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
| 609 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 610 | endif # HOST_OS == linux |
| 611 | |
| 612 | # Build for the target. |
| 613 | include $(CLEAR_VARS) |
| 614 | LOCAL_MODULE := libpayload_generator |
| 615 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 616 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 617 | LOCAL_CLANG := true |
| 618 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 619 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 620 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 621 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 622 | LOCAL_STATIC_LIBRARIES := \ |
| 623 | libpayload_consumer \ |
| 624 | update_metadata-protos \ |
| 625 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 626 | $(ue_update_metadata_protos_exported_static_libraries) |
| 627 | LOCAL_SHARED_LIBRARIES := \ |
| 628 | $(ue_common_shared_libraries) \ |
| 629 | $(ue_libpayload_generator_exported_shared_libraries:-host=) \ |
| 630 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 631 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 632 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 633 | include $(BUILD_STATIC_LIBRARY) |
| 634 | |
| 635 | # delta_generator (type: executable) |
| 636 | # ======================================================== |
| 637 | # server-side delta generator. |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 638 | ue_delta_generator_src_files := \ |
| 639 | payload_generator/generate_delta_main.cc |
| 640 | |
| 641 | ifeq ($(HOST_OS),linux) |
| 642 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 643 | include $(CLEAR_VARS) |
| 644 | LOCAL_MODULE := delta_generator |
| 645 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 646 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 647 | LOCAL_CLANG := true |
| 648 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 649 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 650 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 651 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 652 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 653 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 654 | libpayload_generator \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 655 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 656 | $(ue_libpayload_generator_exported_static_libraries) |
| 657 | LOCAL_SHARED_LIBRARIES := \ |
| 658 | $(ue_common_shared_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 659 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 660 | $(ue_libpayload_generator_exported_shared_libraries) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 661 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
| 662 | include $(BUILD_HOST_EXECUTABLE) |
| 663 | endif # HOST_OS == linux |
| 664 | |
| 665 | # Build for the target. |
| 666 | include $(CLEAR_VARS) |
| 667 | LOCAL_MODULE := delta_generator |
| 668 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 669 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 670 | LOCAL_CLANG := true |
| 671 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 672 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 673 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 674 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 675 | LOCAL_STATIC_LIBRARIES := \ |
| 676 | libpayload_consumer \ |
| 677 | libpayload_generator \ |
| 678 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 679 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 680 | LOCAL_SHARED_LIBRARIES := \ |
| 681 | $(ue_common_shared_libraries) \ |
| 682 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 683 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 684 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 685 | include $(BUILD_EXECUTABLE) |
| 686 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 687 | # TODO(deymo): Enable the unittest binaries in non-Brillo builds once the DBus |
| 688 | # dependencies are removed or placed behind the USE_DBUS flag. |
| 689 | ifdef BRILLO |
| 690 | |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 691 | # Sample images for unittests. |
| 692 | # ======================================================== |
| 693 | # Generate a prebuilt module that installs a sample image from the compressed |
| 694 | # sample_images.tar.bz2 file used by the unittests. |
| 695 | # |
| 696 | # $(1): The filename in the sample_images.tar.bz2 |
| 697 | define ue-unittest-sample-image |
| 698 | $(eval include $(CLEAR_VARS)) \ |
| 699 | $(eval LOCAL_MODULE := ue_unittest_$(1)) \ |
| 700 | $(eval LOCAL_MODULE_CLASS := EXECUTABLES) \ |
| 701 | $(eval $(ifeq $(BRILLO), 1, LOCAL_MODULE_TAGS := eng)) \ |
| 702 | $(eval LOCAL_MODULE_PATH := \ |
| 703 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests/gen) \ |
| 704 | $(eval LOCAL_MODULE_STEM := $(1)) \ |
Alex Deymo | a3553e4 | 2016-03-04 18:55:05 -0800 | [diff] [blame^] | 705 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 706 | $(eval $(LOCAL_BUILT_MODULE) : \ |
| 707 | $(LOCAL_PATH)/sample_images/sample_images.tar.bz2 ; \ |
| 708 | tar -jxf $$< -C $$(dir $$@) $$(notdir $$@) && touch $$@) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 709 | endef |
| 710 | |
| 711 | $(call ue-unittest-sample-image,disk_ext2_1k.img) |
| 712 | $(call ue-unittest-sample-image,disk_ext2_4k.img) |
| 713 | $(call ue-unittest-sample-image,disk_ext2_4k_empty.img) |
| 714 | $(call ue-unittest-sample-image,disk_ext2_ue_settings.img) |
| 715 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 716 | # test_http_server (type: executable) |
| 717 | # ======================================================== |
| 718 | # Test HTTP Server. |
| 719 | include $(CLEAR_VARS) |
| 720 | LOCAL_MODULE := test_http_server |
| 721 | ifdef BRILLO |
| 722 | LOCAL_MODULE_TAGS := eng |
| 723 | endif |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 724 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 725 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 726 | LOCAL_CPP_EXTENSION := .cc |
| 727 | LOCAL_CLANG := true |
| 728 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 729 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 730 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 731 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 732 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
| 733 | LOCAL_SRC_FILES := \ |
| 734 | common/http_common.cc \ |
| 735 | test_http_server.cc |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 736 | include $(BUILD_EXECUTABLE) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 737 | |
| 738 | # update_engine_unittests (type: executable) |
| 739 | # ======================================================== |
| 740 | # Main unittest file. |
| 741 | include $(CLEAR_VARS) |
| 742 | LOCAL_MODULE := update_engine_unittests |
| 743 | ifdef BRILLO |
| 744 | LOCAL_MODULE_TAGS := eng |
| 745 | endif |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 746 | LOCAL_REQUIRED_MODULES := \ |
| 747 | ue_unittest_disk_ext2_1k.img \ |
| 748 | ue_unittest_disk_ext2_4k.img \ |
| 749 | ue_unittest_disk_ext2_4k_empty.img \ |
| 750 | ue_unittest_disk_ext2_ue_settings.img |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 751 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 752 | LOCAL_CPP_EXTENSION := .cc |
| 753 | LOCAL_CLANG := true |
| 754 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 755 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 756 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 757 | LOCAL_C_INCLUDES := \ |
| 758 | $(ue_common_c_includes) \ |
| 759 | $(ue_libupdate_engine_exported_c_includes) |
| 760 | LOCAL_STATIC_LIBRARIES := \ |
| 761 | libupdate_engine \ |
| 762 | libpayload_generator \ |
| 763 | libbrillo-test-helpers \ |
| 764 | libgmock \ |
| 765 | libgtest \ |
| 766 | libchrome_test_helpers \ |
| 767 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 768 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 769 | LOCAL_SHARED_LIBRARIES := \ |
| 770 | $(ue_common_shared_libraries) \ |
| 771 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 772 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 773 | LOCAL_SRC_FILES := \ |
| 774 | common/action_pipe_unittest.cc \ |
| 775 | common/action_processor_unittest.cc \ |
| 776 | common/action_unittest.cc \ |
| 777 | common/certificate_checker_unittest.cc \ |
| 778 | common/cpu_limiter_unittest.cc \ |
| 779 | common/fake_prefs.cc \ |
| 780 | common/hash_calculator_unittest.cc \ |
| 781 | common/http_fetcher_unittest.cc \ |
| 782 | common/hwid_override_unittest.cc \ |
| 783 | common/mock_http_fetcher.cc \ |
| 784 | common/prefs_unittest.cc \ |
| 785 | common/subprocess_unittest.cc \ |
| 786 | common/terminator_unittest.cc \ |
| 787 | common/test_utils.cc \ |
| 788 | common/utils_unittest.cc \ |
| 789 | common_service_unittest.cc \ |
| 790 | connection_manager_unittest.cc \ |
| 791 | fake_shill_proxy.cc \ |
| 792 | fake_system_state.cc \ |
| 793 | metrics_utils_unittest.cc \ |
| 794 | omaha_request_action_unittest.cc \ |
| 795 | omaha_request_params_unittest.cc \ |
| 796 | omaha_response_handler_action_unittest.cc \ |
| 797 | p2p_manager_unittest.cc \ |
| 798 | payload_consumer/bzip_extent_writer_unittest.cc \ |
| 799 | payload_consumer/delta_performer_integration_test.cc \ |
| 800 | payload_consumer/delta_performer_unittest.cc \ |
| 801 | payload_consumer/download_action_unittest.cc \ |
| 802 | payload_consumer/extent_writer_unittest.cc \ |
| 803 | payload_consumer/file_writer_unittest.cc \ |
| 804 | payload_consumer/filesystem_verifier_action_unittest.cc \ |
| 805 | payload_consumer/postinstall_runner_action_unittest.cc \ |
| 806 | payload_consumer/xz_extent_writer_unittest.cc \ |
| 807 | payload_generator/ab_generator_unittest.cc \ |
| 808 | payload_generator/blob_file_writer_unittest.cc \ |
| 809 | payload_generator/block_mapping_unittest.cc \ |
| 810 | payload_generator/cycle_breaker_unittest.cc \ |
| 811 | payload_generator/delta_diff_utils_unittest.cc \ |
| 812 | payload_generator/ext2_filesystem_unittest.cc \ |
| 813 | payload_generator/extent_ranges_unittest.cc \ |
| 814 | payload_generator/extent_utils_unittest.cc \ |
| 815 | payload_generator/fake_filesystem.cc \ |
| 816 | payload_generator/full_update_generator_unittest.cc \ |
| 817 | payload_generator/graph_utils_unittest.cc \ |
| 818 | payload_generator/inplace_generator_unittest.cc \ |
| 819 | payload_generator/payload_file_unittest.cc \ |
| 820 | payload_generator/payload_generation_config_unittest.cc \ |
| 821 | payload_generator/payload_signer_unittest.cc \ |
| 822 | payload_generator/tarjan_unittest.cc \ |
| 823 | payload_generator/topological_sort_unittest.cc \ |
| 824 | payload_generator/zip_unittest.cc \ |
| 825 | payload_state_unittest.cc \ |
| 826 | update_attempter_unittest.cc \ |
| 827 | update_manager/boxed_value_unittest.cc \ |
| 828 | update_manager/chromeos_policy_unittest.cc \ |
| 829 | update_manager/evaluation_context_unittest.cc \ |
| 830 | update_manager/generic_variables_unittest.cc \ |
| 831 | update_manager/prng_unittest.cc \ |
| 832 | update_manager/real_config_provider_unittest.cc \ |
| 833 | update_manager/real_device_policy_provider_unittest.cc \ |
| 834 | update_manager/real_random_provider_unittest.cc \ |
| 835 | update_manager/real_shill_provider_unittest.cc \ |
| 836 | update_manager/real_system_provider_unittest.cc \ |
| 837 | update_manager/real_time_provider_unittest.cc \ |
| 838 | update_manager/real_updater_provider_unittest.cc \ |
| 839 | update_manager/umtest_utils.cc \ |
| 840 | update_manager/update_manager_unittest.cc \ |
| 841 | update_manager/variable_unittest.cc \ |
| 842 | testrunner.cc |
| 843 | ifeq ($(local_use_libcros),1) |
| 844 | LOCAL_SRC_FILES += \ |
| 845 | chrome_browser_proxy_resolver_unittest.cc |
| 846 | endif # local_use_libcros == 1 |
| 847 | include $(BUILD_NATIVE_TEST) |
| 848 | endif # BRILLO |
| 849 | |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 850 | # Weave schema files |
| 851 | # ======================================================== |
| 852 | include $(CLEAR_VARS) |
| 853 | LOCAL_MODULE := updater.json |
| 854 | LOCAL_MODULE_CLASS := ETC |
| 855 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/weaved/traits |
| 856 | LOCAL_SRC_FILES := weaved/traits/$(LOCAL_MODULE) |
| 857 | include $(BUILD_PREBUILT) |
| 858 | |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 859 | # Update payload signing public key. |
| 860 | # ======================================================== |
Alex Deymo | 50e24f4 | 2016-01-27 20:48:54 -0800 | [diff] [blame] | 861 | ifdef BRILLO |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 862 | include $(CLEAR_VARS) |
| 863 | LOCAL_MODULE := brillo-update-payload-key |
| 864 | LOCAL_MODULE_CLASS := ETC |
| 865 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/update_engine |
| 866 | LOCAL_MODULE_STEM := update-payload-key.pub.pem |
| 867 | LOCAL_SRC_FILES := update_payload_key/brillo-update-payload-key.pub.pem |
| 868 | LOCAL_BUILT_MODULE_STEM := update_payload_key/brillo-update-payload-key.pub.pem |
| 869 | include $(BUILD_PREBUILT) |
Alex Deymo | 50e24f4 | 2016-01-27 20:48:54 -0800 | [diff] [blame] | 870 | endif # BRILLO |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 871 | |
| 872 | # Brillo update payload generation script |
| 873 | # ======================================================== |
| 874 | ifeq ($(HOST_OS),linux) |
| 875 | include $(CLEAR_VARS) |
| 876 | LOCAL_SRC_FILES := scripts/brillo_update_payload |
| 877 | LOCAL_MODULE := brillo_update_payload |
| 878 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 879 | LOCAL_IS_HOST_MODULE := true |
| 880 | LOCAL_MODULE_TAGS := optional |
| 881 | LOCAL_REQUIRED_MODULES := \ |
| 882 | delta_generator \ |
| 883 | shflags |
| 884 | include $(BUILD_PREBUILT) |
| 885 | endif # HOST_OS == linux |