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