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 | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 19 | # Default values for the USE flags. Override these USE flags from your product. |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 20 | BRILLO_USE_DBUS ?= 1 |
Alex Deymo | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 21 | BRILLO_USE_HWID_OVERRIDE ?= 0 |
| 22 | BRILLO_USE_MTD ?= 0 |
| 23 | BRILLO_USE_POWER_MANAGEMENT ?= 0 |
| 24 | |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 25 | ue_common_cflags := \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 26 | -DUSE_DBUS=$(BRILLO_USE_DBUS) \ |
Alex Deymo | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 27 | -DUSE_HWID_OVERRIDE=$(BRILLO_USE_HWID_OVERRIDE) \ |
| 28 | -DUSE_MTD=$(BRILLO_USE_MTD) \ |
| 29 | -DUSE_POWER_MANAGEMENT=$(BRILLO_USE_POWER_MANAGEMENT) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 30 | -D_FILE_OFFSET_BITS=64 \ |
| 31 | -D_POSIX_C_SOURCE=199309L \ |
| 32 | -Wa,--noexecstack \ |
| 33 | -Wall \ |
| 34 | -Werror \ |
| 35 | -Wextra \ |
| 36 | -Wformat=2 \ |
| 37 | -Wno-psabi \ |
| 38 | -Wno-unused-parameter \ |
| 39 | -ffunction-sections \ |
| 40 | -fstack-protector-strong \ |
| 41 | -fvisibility=hidden |
| 42 | ue_common_cppflags := \ |
| 43 | -Wnon-virtual-dtor \ |
| 44 | -fno-strict-aliasing \ |
| 45 | -std=gnu++11 |
| 46 | ue_common_ldflags := \ |
| 47 | -Wl,--gc-sections |
| 48 | ue_common_c_includes := \ |
| 49 | $(LOCAL_PATH)/client_library/include \ |
| 50 | external/gtest/include \ |
| 51 | system |
| 52 | ue_common_shared_libraries := \ |
| 53 | libbrillo \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 54 | libbrillo-http \ |
| 55 | libbrillo-stream \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 56 | libchrome |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 57 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 58 | ifeq ($(BRILLO_USE_DBUS),1) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 59 | |
| 60 | # update_engine_client-dbus-proxies (from generate-dbus-proxies.gypi) |
| 61 | # ======================================================== |
| 62 | include $(CLEAR_VARS) |
| 63 | LOCAL_MODULE := update_engine_client-dbus-proxies |
| 64 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 65 | LOCAL_SRC_FILES := \ |
| 66 | dbus_bindings/dbus-service-config.json \ |
| 67 | dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml |
| 68 | LOCAL_DBUS_PROXY_PREFIX := update_engine |
| 69 | include $(BUILD_STATIC_LIBRARY) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 70 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 71 | endif # BRILLO_USE_DBUS == 1 |
| 72 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 73 | # update_metadata-protos (type: static_library) |
| 74 | # ======================================================== |
| 75 | # Protobufs. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 76 | ue_update_metadata_protos_exported_static_libraries := \ |
| 77 | update_metadata-protos |
| 78 | ue_update_metadata_protos_exported_shared_libraries := \ |
| 79 | libprotobuf-cpp-lite-rtti |
| 80 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 81 | ue_update_metadata_protos_src_files := \ |
| 82 | update_metadata.proto |
| 83 | |
| 84 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 85 | include $(CLEAR_VARS) |
| 86 | LOCAL_MODULE := update_metadata-protos |
| 87 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 88 | generated_sources_dir := $(call local-generated-sources-dir) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 89 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 90 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
| 91 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 92 | |
| 93 | # Build for the target. |
| 94 | include $(CLEAR_VARS) |
| 95 | LOCAL_MODULE := update_metadata-protos |
| 96 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 97 | generated_sources_dir := $(call local-generated-sources-dir) |
| 98 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
| 99 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 100 | include $(BUILD_STATIC_LIBRARY) |
| 101 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 102 | ifeq ($(BRILLO_USE_DBUS),1) |
| 103 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 104 | # update_engine-dbus-adaptor (from generate-dbus-adaptors.gypi) |
| 105 | # ======================================================== |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 106 | # Chrome D-Bus bindings. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 107 | include $(CLEAR_VARS) |
| 108 | LOCAL_MODULE := update_engine-dbus-adaptor |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 109 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 110 | LOCAL_SRC_FILES := \ |
| 111 | dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml |
| 112 | include $(BUILD_STATIC_LIBRARY) |
| 113 | |
| 114 | # update_engine-dbus-libcros-client (from generate-dbus-proxies.gypi) |
| 115 | # ======================================================== |
| 116 | include $(CLEAR_VARS) |
| 117 | LOCAL_MODULE := update_engine-dbus-libcros-client |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 118 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 119 | LOCAL_SRC_FILES := \ |
| 120 | dbus_bindings/org.chromium.LibCrosService.dbus-xml |
| 121 | LOCAL_DBUS_PROXY_PREFIX := libcros |
| 122 | include $(BUILD_STATIC_LIBRARY) |
| 123 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 124 | endif # BRILLO_USE_DBUS == 1 |
| 125 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 126 | # libpayload_consumer (type: static_library) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 127 | # ======================================================== |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 128 | # The payload application component and common dependencies. |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 129 | ue_libpayload_consumer_exported_static_libraries := \ |
| 130 | update_metadata-protos \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 131 | libxz-host \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 132 | libbz \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 133 | $(ue_update_metadata_protos_exported_static_libraries) |
| 134 | ue_libpayload_consumer_exported_shared_libraries := \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 135 | libcrypto-host \ |
| 136 | libcurl-host \ |
| 137 | libssl-host \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 138 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 139 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 140 | ue_libpayload_consumer_src_files := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 141 | common/action_processor.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 142 | common/boot_control_stub.cc \ |
| 143 | common/certificate_checker.cc \ |
| 144 | common/clock.cc \ |
| 145 | common/constants.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 146 | common/hash_calculator.cc \ |
| 147 | common/http_common.cc \ |
| 148 | common/http_fetcher.cc \ |
| 149 | common/hwid_override.cc \ |
| 150 | common/libcurl_http_fetcher.cc \ |
| 151 | common/multi_range_http_fetcher.cc \ |
| 152 | common/platform_constants_android.cc \ |
| 153 | common/prefs.cc \ |
| 154 | common/subprocess.cc \ |
| 155 | common/terminator.cc \ |
| 156 | common/utils.cc \ |
| 157 | payload_consumer/bzip_extent_writer.cc \ |
| 158 | payload_consumer/delta_performer.cc \ |
| 159 | payload_consumer/download_action.cc \ |
| 160 | payload_consumer/extent_writer.cc \ |
| 161 | payload_consumer/file_descriptor.cc \ |
| 162 | payload_consumer/file_writer.cc \ |
| 163 | payload_consumer/filesystem_verifier_action.cc \ |
| 164 | payload_consumer/install_plan.cc \ |
| 165 | payload_consumer/payload_constants.cc \ |
| 166 | payload_consumer/payload_verifier.cc \ |
| 167 | payload_consumer/postinstall_runner_action.cc \ |
| 168 | payload_consumer/xz_extent_writer.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 169 | |
| 170 | ifeq ($(HOST_OS),linux) |
| 171 | # Build for the host. |
| 172 | include $(CLEAR_VARS) |
| 173 | LOCAL_MODULE := libpayload_consumer |
| 174 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 175 | LOCAL_CPP_EXTENSION := .cc |
| 176 | LOCAL_RTTI_FLAG := -frtti |
| 177 | LOCAL_CLANG := true |
| 178 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 179 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 180 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 181 | LOCAL_C_INCLUDES := \ |
| 182 | $(ue_common_c_includes) \ |
| 183 | external/e2fsprogs/lib |
| 184 | LOCAL_STATIC_LIBRARIES := \ |
| 185 | update_metadata-protos \ |
| 186 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 187 | $(ue_update_metadata_protos_exported_static_libraries) |
| 188 | LOCAL_SHARED_LIBRARIES := \ |
| 189 | $(ue_common_shared_libraries) \ |
| 190 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 191 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 192 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
| 193 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 194 | endif # HOST_OS == linux |
| 195 | |
| 196 | # Build for the target. |
| 197 | include $(CLEAR_VARS) |
| 198 | LOCAL_MODULE := libpayload_consumer |
| 199 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 200 | LOCAL_CPP_EXTENSION := .cc |
| 201 | LOCAL_RTTI_FLAG := -frtti |
| 202 | LOCAL_CLANG := true |
| 203 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 204 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 205 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 206 | LOCAL_C_INCLUDES := \ |
| 207 | $(ue_common_c_includes) \ |
| 208 | external/e2fsprogs/lib |
| 209 | LOCAL_STATIC_LIBRARIES := \ |
| 210 | update_metadata-protos \ |
| 211 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 212 | $(ue_update_metadata_protos_exported_static_libraries) |
| 213 | LOCAL_SHARED_LIBRARIES := \ |
| 214 | $(ue_common_shared_libraries) \ |
| 215 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 216 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 217 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 218 | include $(BUILD_STATIC_LIBRARY) |
| 219 | |
Alex Deymo | cd60dca | 2015-11-18 00:57:20 -0300 | [diff] [blame] | 220 | ifeq ($(BRILLO_USE_DBUS),1) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 221 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 222 | # libupdate_engine (type: static_library) |
| 223 | # ======================================================== |
| 224 | # The main daemon static_library with all the code used to check for updates |
| 225 | # with Omaha and expose a DBus daemon. |
| 226 | ue_libupdate_engine_exported_c_includes := \ |
| 227 | $(LOCAL_PATH)/include \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 228 | external/cros/system_api/dbus |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 229 | ue_libupdate_engine_exported_static_libraries := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 230 | libpayload_consumer \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 231 | update_metadata-protos \ |
| 232 | update_engine-dbus-adaptor \ |
| 233 | update_engine-dbus-libcros-client \ |
| 234 | update_engine_client-dbus-proxies \ |
David Zeuthen | 753fadc | 2015-09-15 16:34:09 -0400 | [diff] [blame] | 235 | libbz \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 236 | libfs_mgr \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 237 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 238 | $(ue_update_metadata_protos_exported_static_libraries) |
| 239 | ue_libupdate_engine_exported_shared_libraries := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 240 | libdbus \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 241 | libbrillo-dbus \ |
| 242 | libchrome-dbus \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 243 | libmetrics \ |
Alex Deymo | 7eb2305 | 2015-10-09 15:27:59 -0700 | [diff] [blame] | 244 | libshill-client \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 245 | libexpat \ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 246 | libbrillo-policy \ |
Alex Deymo | eadab7d | 2015-10-09 14:45:02 -0700 | [diff] [blame] | 247 | libhardware \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 248 | libcutils \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 249 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 250 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 251 | |
| 252 | include $(CLEAR_VARS) |
| 253 | LOCAL_MODULE := libupdate_engine |
| 254 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 255 | LOCAL_CPP_EXTENSION := .cc |
| 256 | LOCAL_RTTI_FLAG := -frtti |
| 257 | LOCAL_CLANG := true |
| 258 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(ue_libupdate_engine_exported_c_includes) |
| 259 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 260 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 261 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 262 | LOCAL_C_INCLUDES := \ |
| 263 | $(ue_common_c_includes) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 264 | $(ue_libupdate_engine_exported_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 265 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 266 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 267 | update_metadata-protos \ |
| 268 | update_engine-dbus-adaptor \ |
| 269 | update_engine-dbus-libcros-client \ |
| 270 | update_engine_client-dbus-proxies \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 271 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 272 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 273 | $(ue_update_metadata_protos_exported_static_libraries) |
| 274 | LOCAL_SHARED_LIBRARIES := \ |
| 275 | $(ue_common_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 276 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 277 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 278 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 279 | LOCAL_SRC_FILES := \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 280 | boot_control_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 281 | chrome_browser_proxy_resolver.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 282 | connection_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 283 | daemon.cc \ |
| 284 | dbus_service.cc \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 285 | hardware_android.cc \ |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 286 | image_properties_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 287 | libcros_proxy.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 288 | metrics.cc \ |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 289 | metrics_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 290 | omaha_request_action.cc \ |
| 291 | omaha_request_params.cc \ |
| 292 | omaha_response_handler_action.cc \ |
| 293 | p2p_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 294 | payload_state.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 295 | proxy_resolver.cc \ |
| 296 | real_system_state.cc \ |
| 297 | shill_proxy.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 298 | update_attempter.cc \ |
| 299 | update_manager/boxed_value.cc \ |
| 300 | update_manager/chromeos_policy.cc \ |
| 301 | update_manager/default_policy.cc \ |
| 302 | update_manager/evaluation_context.cc \ |
| 303 | update_manager/policy.cc \ |
| 304 | update_manager/real_config_provider.cc \ |
| 305 | update_manager/real_device_policy_provider.cc \ |
| 306 | update_manager/real_random_provider.cc \ |
| 307 | update_manager/real_shill_provider.cc \ |
| 308 | update_manager/real_system_provider.cc \ |
| 309 | update_manager/real_time_provider.cc \ |
| 310 | update_manager/real_updater_provider.cc \ |
| 311 | update_manager/state_factory.cc \ |
| 312 | update_manager/update_manager.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 313 | update_status_utils.cc |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 314 | include $(BUILD_STATIC_LIBRARY) |
| 315 | |
Alex Deymo | cd60dca | 2015-11-18 00:57:20 -0300 | [diff] [blame] | 316 | endif # BRILLO_USE_DBUS == 1 |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 317 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 318 | # update_engine (type: executable) |
| 319 | # ======================================================== |
| 320 | # update_engine daemon. |
| 321 | include $(CLEAR_VARS) |
| 322 | LOCAL_MODULE := update_engine |
| 323 | LOCAL_MODULE_CLASS := EXECUTABLES |
Sen Jiang | 5609277 | 2015-11-23 14:41:00 -0800 | [diff] [blame] | 324 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | ab49446 | 2015-11-30 17:07:36 -0300 | [diff] [blame] | 325 | bspatch \ |
| 326 | cacerts_google |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 327 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 328 | LOCAL_CLANG := true |
| 329 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 330 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 331 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 332 | LOCAL_C_INCLUDES := \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 333 | $(ue_common_c_includes) |
| 334 | |
| 335 | ifdef BRILLO |
| 336 | |
| 337 | LOCAL_C_INCLUDES += \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 338 | $(ue_libupdate_engine_exported_c_includes) |
| 339 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 340 | libupdate_engine \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 341 | $(ue_libupdate_engine_exported_static_libraries:-host=) |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 342 | |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 343 | LOCAL_RTTI_FLAG := -frtti |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 344 | LOCAL_SHARED_LIBRARIES := \ |
| 345 | $(ue_common_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 346 | $(ue_libupdate_engine_exported_shared_libraries:-host=) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 347 | LOCAL_SRC_FILES := \ |
| 348 | main.cc |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 349 | |
| 350 | else # !defined(BRILLO) |
| 351 | |
| 352 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 353 | LOCAL_SHARED_LIBRARIES := \ |
| 354 | libbinder \ |
| 355 | liblog \ |
| 356 | libutils |
| 357 | LOCAL_SRC_FILES := \ |
| 358 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 359 | binder_bindings/android/os/IUpdateEnginePayloadApplicationCallback.aidl \ |
| 360 | binder_main.cc \ |
| 361 | binder_service.cc |
| 362 | |
| 363 | endif # defined(BRILLO) |
| 364 | |
Gilad Arnold | 70141f2 | 2015-09-17 09:06:30 -0700 | [diff] [blame] | 365 | LOCAL_INIT_RC := update_engine.rc |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 366 | include $(BUILD_EXECUTABLE) |
| 367 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 368 | ifeq ($(BRILLO_USE_DBUS),1) |
| 369 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 370 | # update_engine_client (type: executable) |
| 371 | # ======================================================== |
| 372 | # update_engine console client. |
| 373 | include $(CLEAR_VARS) |
| 374 | LOCAL_MODULE := update_engine_client |
| 375 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 376 | LOCAL_CPP_EXTENSION := .cc |
| 377 | LOCAL_RTTI_FLAG := -frtti |
| 378 | LOCAL_CLANG := true |
| 379 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 380 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 381 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 382 | LOCAL_C_INCLUDES := \ |
| 383 | $(ue_common_c_includes) \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 384 | $(LOCAL_PATH)/include |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 385 | LOCAL_STATIC_LIBRARIES := update_engine_client-dbus-proxies |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 386 | LOCAL_SHARED_LIBRARIES := \ |
| 387 | $(ue_common_shared_libraries) \ |
| 388 | libdbus \ |
| 389 | libbrillo-dbus \ |
| 390 | libchrome-dbus |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 391 | LOCAL_SRC_FILES := \ |
| 392 | update_engine_client.cc |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 393 | include $(BUILD_EXECUTABLE) |
| 394 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 395 | endif # BRILLO_USE_DBUS == 1 |
| 396 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 397 | # libpayload_generator (type: static_library) |
| 398 | # ======================================================== |
| 399 | # server-side code. This is used for delta_generator and unittests but not |
| 400 | # for any client code. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 401 | ue_libpayload_generator_exported_static_libraries := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 402 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 403 | update_metadata-protos \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 404 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 405 | $(ue_update_metadata_protos_exported_static_libraries) |
| 406 | ue_libpayload_generator_exported_shared_libraries := \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 407 | libext2fs-host \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 408 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 409 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 410 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 411 | ue_libpayload_generator_src_files := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 412 | payload_generator/ab_generator.cc \ |
| 413 | payload_generator/annotated_operation.cc \ |
| 414 | payload_generator/blob_file_writer.cc \ |
| 415 | payload_generator/block_mapping.cc \ |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 416 | payload_generator/bzip.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 417 | payload_generator/cycle_breaker.cc \ |
| 418 | payload_generator/delta_diff_generator.cc \ |
| 419 | payload_generator/delta_diff_utils.cc \ |
| 420 | payload_generator/ext2_filesystem.cc \ |
| 421 | payload_generator/extent_ranges.cc \ |
| 422 | payload_generator/extent_utils.cc \ |
| 423 | payload_generator/full_update_generator.cc \ |
| 424 | payload_generator/graph_types.cc \ |
| 425 | payload_generator/graph_utils.cc \ |
| 426 | payload_generator/inplace_generator.cc \ |
| 427 | payload_generator/payload_file.cc \ |
| 428 | payload_generator/payload_generation_config.cc \ |
| 429 | payload_generator/payload_signer.cc \ |
| 430 | payload_generator/raw_filesystem.cc \ |
| 431 | payload_generator/tarjan.cc \ |
| 432 | payload_generator/topological_sort.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 433 | |
| 434 | ifeq ($(HOST_OS),linux) |
| 435 | # Build for the host. |
| 436 | include $(CLEAR_VARS) |
| 437 | LOCAL_MODULE := libpayload_generator |
| 438 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 439 | LOCAL_CPP_EXTENSION := .cc |
| 440 | LOCAL_RTTI_FLAG := -frtti |
| 441 | LOCAL_CLANG := true |
| 442 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 443 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 444 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 445 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 446 | LOCAL_STATIC_LIBRARIES := \ |
| 447 | libpayload_consumer \ |
| 448 | update_metadata-protos \ |
| 449 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 450 | $(ue_update_metadata_protos_exported_static_libraries) |
| 451 | LOCAL_SHARED_LIBRARIES := \ |
| 452 | $(ue_common_shared_libraries) \ |
| 453 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 454 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 455 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 456 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
| 457 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 458 | endif # HOST_OS == linux |
| 459 | |
| 460 | # Build for the target. |
| 461 | include $(CLEAR_VARS) |
| 462 | LOCAL_MODULE := libpayload_generator |
| 463 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 464 | LOCAL_CPP_EXTENSION := .cc |
| 465 | LOCAL_RTTI_FLAG := -frtti |
| 466 | LOCAL_CLANG := true |
| 467 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 468 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 469 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 470 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 471 | LOCAL_STATIC_LIBRARIES := \ |
| 472 | libpayload_consumer \ |
| 473 | update_metadata-protos \ |
| 474 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 475 | $(ue_update_metadata_protos_exported_static_libraries) |
| 476 | LOCAL_SHARED_LIBRARIES := \ |
| 477 | $(ue_common_shared_libraries) \ |
| 478 | $(ue_libpayload_generator_exported_shared_libraries:-host=) \ |
| 479 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 480 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 481 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 482 | include $(BUILD_STATIC_LIBRARY) |
| 483 | |
| 484 | # delta_generator (type: executable) |
| 485 | # ======================================================== |
| 486 | # server-side delta generator. |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 487 | ue_delta_generator_src_files := \ |
| 488 | payload_generator/generate_delta_main.cc |
| 489 | |
| 490 | ifeq ($(HOST_OS),linux) |
| 491 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 492 | include $(CLEAR_VARS) |
| 493 | LOCAL_MODULE := delta_generator |
| 494 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 495 | LOCAL_CPP_EXTENSION := .cc |
| 496 | LOCAL_RTTI_FLAG := -frtti |
| 497 | LOCAL_CLANG := true |
| 498 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 499 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 500 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 501 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 502 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 503 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 504 | libpayload_generator \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 505 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 506 | $(ue_libpayload_generator_exported_static_libraries) |
| 507 | LOCAL_SHARED_LIBRARIES := \ |
| 508 | $(ue_common_shared_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 509 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 510 | $(ue_libpayload_generator_exported_shared_libraries) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame^] | 511 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
| 512 | include $(BUILD_HOST_EXECUTABLE) |
| 513 | endif # HOST_OS == linux |
| 514 | |
| 515 | # Build for the target. |
| 516 | include $(CLEAR_VARS) |
| 517 | LOCAL_MODULE := delta_generator |
| 518 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 519 | LOCAL_CPP_EXTENSION := .cc |
| 520 | LOCAL_RTTI_FLAG := -frtti |
| 521 | LOCAL_CLANG := true |
| 522 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 523 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 524 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 525 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 526 | LOCAL_STATIC_LIBRARIES := \ |
| 527 | libpayload_consumer \ |
| 528 | libpayload_generator \ |
| 529 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 530 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 531 | LOCAL_SHARED_LIBRARIES := \ |
| 532 | $(ue_common_shared_libraries) \ |
| 533 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 534 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 535 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 536 | include $(BUILD_EXECUTABLE) |
| 537 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 538 | ifeq ($(BRILLO_USE_DBUS),1) |
| 539 | |
Christopher Wiley | 16daa08 | 2015-10-01 17:18:40 -0700 | [diff] [blame] | 540 | # libupdate_engine_client |
| 541 | # ======================================================== |
| 542 | include $(CLEAR_VARS) |
| 543 | LOCAL_MODULE := libupdate_engine_client |
| 544 | LOCAL_RTTI_FLAG := -frtti |
| 545 | LOCAL_CFLAGS := \ |
| 546 | -Wall \ |
| 547 | -Werror \ |
| 548 | -Wno-unused-parameter |
| 549 | LOCAL_CLANG := true |
| 550 | LOCAL_CPP_EXTENSION := .cc |
| 551 | LOCAL_C_INCLUDES := \ |
| 552 | $(LOCAL_PATH)/client_library/include \ |
| 553 | external/cros/system_api/dbus \ |
| 554 | system \ |
| 555 | external/gtest/include |
| 556 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/client_library/include |
| 557 | LOCAL_SHARED_LIBRARIES := \ |
| 558 | libchrome \ |
| 559 | libchrome-dbus \ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 560 | libbrillo \ |
| 561 | libbrillo-dbus |
Christopher Wiley | 16daa08 | 2015-10-01 17:18:40 -0700 | [diff] [blame] | 562 | LOCAL_STATIC_LIBRARIES := \ |
| 563 | update_engine_client-dbus-proxies |
| 564 | LOCAL_SRC_FILES := \ |
| 565 | client_library/client.cc \ |
| 566 | client_library/client_impl.cc \ |
| 567 | update_status_utils.cc |
| 568 | include $(BUILD_SHARED_LIBRARY) |
| 569 | |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 570 | endif # BRILLO_USE_DBUS == 1 |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 571 | |
| 572 | # Update payload signing public key. |
| 573 | # ======================================================== |
| 574 | include $(CLEAR_VARS) |
| 575 | LOCAL_MODULE := brillo-update-payload-key |
| 576 | LOCAL_MODULE_CLASS := ETC |
| 577 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/update_engine |
| 578 | LOCAL_MODULE_STEM := update-payload-key.pub.pem |
| 579 | LOCAL_SRC_FILES := update_payload_key/brillo-update-payload-key.pub.pem |
| 580 | LOCAL_BUILT_MODULE_STEM := update_payload_key/brillo-update-payload-key.pub.pem |
| 581 | include $(BUILD_PREBUILT) |