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