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