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