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