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) |
Alex Deymo | 0cd976d | 2016-02-11 18:45:01 -0800 | [diff] [blame] | 26 | # "libcros" gates the LibCrosService exposed by the Chrome OS' chrome browser to |
| 27 | # the system layer. |
| 28 | local_use_libcros := $(if $(BRILLO_USE_LIBCROS),$(BRILLO_USE_LIBCROS),0) |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 29 | local_use_mtd := $(if $(BRILLO_USE_MTD),$(BRILLO_USE_MTD),0) |
| 30 | local_use_power_management := \ |
| 31 | $(if $(BRILLO_USE_POWER_MANAGEMENT),$(BRILLO_USE_POWER_MANAGEMENT),0) |
| 32 | local_use_weave := $(if $(BRILLO_USE_WEAVE),$(BRILLO_USE_WEAVE),0) |
Alex Deymo | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 33 | |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 34 | ue_common_cflags := \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 35 | -DUSE_BINDER=$(local_use_binder) \ |
| 36 | -DUSE_DBUS=$(local_use_dbus) \ |
| 37 | -DUSE_HWID_OVERRIDE=$(local_use_hwid_override) \ |
Alex Deymo | 0cd976d | 2016-02-11 18:45:01 -0800 | [diff] [blame] | 38 | -DUSE_LIBCROS=$(local_use_libcros) \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 39 | -DUSE_MTD=$(local_use_mtd) \ |
| 40 | -DUSE_POWER_MANAGEMENT=$(local_use_power_management) \ |
| 41 | -DUSE_WEAVE=$(local_use_weave) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 42 | -D_FILE_OFFSET_BITS=64 \ |
| 43 | -D_POSIX_C_SOURCE=199309L \ |
| 44 | -Wa,--noexecstack \ |
| 45 | -Wall \ |
| 46 | -Werror \ |
| 47 | -Wextra \ |
| 48 | -Wformat=2 \ |
| 49 | -Wno-psabi \ |
| 50 | -Wno-unused-parameter \ |
| 51 | -ffunction-sections \ |
| 52 | -fstack-protector-strong \ |
| 53 | -fvisibility=hidden |
| 54 | ue_common_cppflags := \ |
| 55 | -Wnon-virtual-dtor \ |
| 56 | -fno-strict-aliasing \ |
| 57 | -std=gnu++11 |
| 58 | ue_common_ldflags := \ |
| 59 | -Wl,--gc-sections |
| 60 | ue_common_c_includes := \ |
| 61 | $(LOCAL_PATH)/client_library/include \ |
| 62 | external/gtest/include \ |
| 63 | system |
| 64 | ue_common_shared_libraries := \ |
| 65 | libbrillo \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 66 | libbrillo-http \ |
| 67 | libbrillo-stream \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 68 | libchrome |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 69 | |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 70 | ifeq ($(local_use_dbus),1) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 71 | |
| 72 | # update_engine_client-dbus-proxies (from generate-dbus-proxies.gypi) |
| 73 | # ======================================================== |
| 74 | include $(CLEAR_VARS) |
| 75 | LOCAL_MODULE := update_engine_client-dbus-proxies |
| 76 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 77 | LOCAL_SRC_FILES := \ |
| 78 | dbus_bindings/dbus-service-config.json \ |
| 79 | dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml |
| 80 | LOCAL_DBUS_PROXY_PREFIX := update_engine |
| 81 | include $(BUILD_STATIC_LIBRARY) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 82 | |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 83 | endif # local_use_dbus == 1 |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 84 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 85 | # update_metadata-protos (type: static_library) |
| 86 | # ======================================================== |
| 87 | # Protobufs. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 88 | ue_update_metadata_protos_exported_static_libraries := \ |
| 89 | update_metadata-protos |
| 90 | ue_update_metadata_protos_exported_shared_libraries := \ |
Alex Vakulenko | ab5bd66 | 2015-12-21 12:24:45 -0800 | [diff] [blame] | 91 | libprotobuf-cpp-lite |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 92 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 93 | ue_update_metadata_protos_src_files := \ |
| 94 | update_metadata.proto |
| 95 | |
| 96 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 97 | include $(CLEAR_VARS) |
| 98 | LOCAL_MODULE := update_metadata-protos |
| 99 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Ying Wang | dbd1711 | 2015-12-17 11:59:09 -0800 | [diff] [blame] | 100 | LOCAL_IS_HOST_MODULE := true |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 101 | generated_sources_dir := $(call local-generated-sources-dir) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 102 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 103 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
| 104 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 105 | |
| 106 | # Build for the target. |
| 107 | include $(CLEAR_VARS) |
| 108 | LOCAL_MODULE := update_metadata-protos |
| 109 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 110 | generated_sources_dir := $(call local-generated-sources-dir) |
| 111 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
| 112 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 113 | include $(BUILD_STATIC_LIBRARY) |
| 114 | |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 115 | ifeq ($(local_use_dbus),1) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 116 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 117 | # update_engine-dbus-adaptor (from generate-dbus-adaptors.gypi) |
| 118 | # ======================================================== |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 119 | # Chrome D-Bus bindings. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 120 | include $(CLEAR_VARS) |
| 121 | LOCAL_MODULE := update_engine-dbus-adaptor |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 122 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 123 | LOCAL_SRC_FILES := \ |
| 124 | dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml |
| 125 | include $(BUILD_STATIC_LIBRARY) |
| 126 | |
| 127 | # update_engine-dbus-libcros-client (from generate-dbus-proxies.gypi) |
| 128 | # ======================================================== |
| 129 | include $(CLEAR_VARS) |
| 130 | LOCAL_MODULE := update_engine-dbus-libcros-client |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 131 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 132 | LOCAL_SRC_FILES := \ |
| 133 | dbus_bindings/org.chromium.LibCrosService.dbus-xml |
| 134 | LOCAL_DBUS_PROXY_PREFIX := libcros |
| 135 | include $(BUILD_STATIC_LIBRARY) |
| 136 | |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 137 | endif # local_use_dbus == 1 |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 138 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 139 | # libpayload_consumer (type: static_library) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 140 | # ======================================================== |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 141 | # The payload application component and common dependencies. |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 142 | ue_libpayload_consumer_exported_static_libraries := \ |
| 143 | update_metadata-protos \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 144 | libxz-host \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 145 | libbz \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 146 | $(ue_update_metadata_protos_exported_static_libraries) |
| 147 | ue_libpayload_consumer_exported_shared_libraries := \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 148 | libcrypto-host \ |
| 149 | libcurl-host \ |
| 150 | libssl-host \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 151 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 152 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 153 | ue_libpayload_consumer_src_files := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 154 | common/action_processor.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 155 | common/boot_control_stub.cc \ |
| 156 | common/certificate_checker.cc \ |
| 157 | common/clock.cc \ |
| 158 | common/constants.cc \ |
Alex Deymo | ab0d976 | 2016-02-02 10:52:56 -0800 | [diff] [blame] | 159 | common/cpu_limiter.cc \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 160 | common/error_code_utils.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 161 | common/hash_calculator.cc \ |
| 162 | common/http_common.cc \ |
| 163 | common/http_fetcher.cc \ |
| 164 | common/hwid_override.cc \ |
| 165 | common/libcurl_http_fetcher.cc \ |
| 166 | common/multi_range_http_fetcher.cc \ |
| 167 | common/platform_constants_android.cc \ |
| 168 | common/prefs.cc \ |
| 169 | common/subprocess.cc \ |
| 170 | common/terminator.cc \ |
| 171 | common/utils.cc \ |
| 172 | payload_consumer/bzip_extent_writer.cc \ |
| 173 | payload_consumer/delta_performer.cc \ |
| 174 | payload_consumer/download_action.cc \ |
| 175 | payload_consumer/extent_writer.cc \ |
| 176 | payload_consumer/file_descriptor.cc \ |
| 177 | payload_consumer/file_writer.cc \ |
| 178 | payload_consumer/filesystem_verifier_action.cc \ |
| 179 | payload_consumer/install_plan.cc \ |
| 180 | payload_consumer/payload_constants.cc \ |
| 181 | payload_consumer/payload_verifier.cc \ |
| 182 | payload_consumer/postinstall_runner_action.cc \ |
| 183 | payload_consumer/xz_extent_writer.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 184 | |
| 185 | ifeq ($(HOST_OS),linux) |
| 186 | # Build for the host. |
| 187 | include $(CLEAR_VARS) |
| 188 | LOCAL_MODULE := libpayload_consumer |
| 189 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 190 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 191 | LOCAL_CLANG := true |
| 192 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 193 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 194 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 195 | LOCAL_C_INCLUDES := \ |
| 196 | $(ue_common_c_includes) \ |
| 197 | external/e2fsprogs/lib |
| 198 | LOCAL_STATIC_LIBRARIES := \ |
| 199 | update_metadata-protos \ |
| 200 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 201 | $(ue_update_metadata_protos_exported_static_libraries) |
| 202 | LOCAL_SHARED_LIBRARIES := \ |
| 203 | $(ue_common_shared_libraries) \ |
| 204 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 205 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 206 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
| 207 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 208 | endif # HOST_OS == linux |
| 209 | |
| 210 | # Build for the target. |
| 211 | include $(CLEAR_VARS) |
| 212 | LOCAL_MODULE := libpayload_consumer |
| 213 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 214 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 215 | LOCAL_CLANG := true |
| 216 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 217 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 218 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 219 | LOCAL_C_INCLUDES := \ |
| 220 | $(ue_common_c_includes) \ |
| 221 | external/e2fsprogs/lib |
| 222 | LOCAL_STATIC_LIBRARIES := \ |
| 223 | update_metadata-protos \ |
| 224 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 225 | $(ue_update_metadata_protos_exported_static_libraries) |
| 226 | LOCAL_SHARED_LIBRARIES := \ |
| 227 | $(ue_common_shared_libraries) \ |
| 228 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 229 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 230 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 231 | include $(BUILD_STATIC_LIBRARY) |
| 232 | |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 233 | ifdef BRILLO |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 234 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 235 | # libupdate_engine (type: static_library) |
| 236 | # ======================================================== |
| 237 | # The main daemon static_library with all the code used to check for updates |
| 238 | # with Omaha and expose a DBus daemon. |
| 239 | ue_libupdate_engine_exported_c_includes := \ |
| 240 | $(LOCAL_PATH)/include \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 241 | external/cros/system_api/dbus |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 242 | ue_libupdate_engine_exported_static_libraries := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 243 | libpayload_consumer \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 244 | update_metadata-protos \ |
| 245 | update_engine-dbus-adaptor \ |
| 246 | update_engine-dbus-libcros-client \ |
| 247 | update_engine_client-dbus-proxies \ |
David Zeuthen | 753fadc | 2015-09-15 16:34:09 -0400 | [diff] [blame] | 248 | libbz \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 249 | libfs_mgr \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 250 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 251 | $(ue_update_metadata_protos_exported_static_libraries) |
| 252 | ue_libupdate_engine_exported_shared_libraries := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 253 | libdbus \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 254 | libbrillo-dbus \ |
| 255 | libchrome-dbus \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 256 | libmetrics \ |
Alex Deymo | 7eb2305 | 2015-10-09 15:27:59 -0700 | [diff] [blame] | 257 | libshill-client \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 258 | libexpat \ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 259 | libbrillo-policy \ |
Alex Deymo | eadab7d | 2015-10-09 14:45:02 -0700 | [diff] [blame] | 260 | libhardware \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 261 | libcutils \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 262 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 263 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | c003790 | 2016-01-23 17:29:02 -0800 | [diff] [blame] | 264 | ifeq ($(local_use_binder),1) |
| 265 | ue_libupdate_engine_exported_shared_libraries += \ |
| 266 | libbinder \ |
| 267 | libbinderwrapper \ |
| 268 | libbrillo-binder \ |
| 269 | libutils |
| 270 | endif # local_use_binder == 1 |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 271 | ifeq ($(local_use_weave),1) |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 272 | ue_libupdate_engine_exported_shared_libraries += \ |
Alex Deymo | 7ff02cf | 2016-01-22 11:06:51 -0800 | [diff] [blame] | 273 | libbinderwrapper \ |
| 274 | libbrillo-binder \ |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 275 | libweaved |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 276 | endif # local_use_weave == 1 |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 277 | |
| 278 | include $(CLEAR_VARS) |
| 279 | LOCAL_MODULE := libupdate_engine |
| 280 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 281 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 282 | LOCAL_CLANG := true |
| 283 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(ue_libupdate_engine_exported_c_includes) |
| 284 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 285 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 286 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 287 | LOCAL_C_INCLUDES := \ |
| 288 | $(ue_common_c_includes) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 289 | $(ue_libupdate_engine_exported_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 290 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 291 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 292 | update_metadata-protos \ |
| 293 | update_engine-dbus-adaptor \ |
| 294 | update_engine-dbus-libcros-client \ |
| 295 | update_engine_client-dbus-proxies \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 296 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 297 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 298 | $(ue_update_metadata_protos_exported_static_libraries) |
| 299 | LOCAL_SHARED_LIBRARIES := \ |
| 300 | $(ue_common_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 301 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 302 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 303 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 304 | LOCAL_SRC_FILES := \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 305 | boot_control_android.cc \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 306 | common_service.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 307 | connection_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 308 | daemon.cc \ |
| 309 | dbus_service.cc \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 310 | hardware_android.cc \ |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 311 | image_properties_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 312 | libcros_proxy.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 313 | metrics.cc \ |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 314 | metrics_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 315 | omaha_request_action.cc \ |
| 316 | omaha_request_params.cc \ |
| 317 | omaha_response_handler_action.cc \ |
| 318 | p2p_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 319 | payload_state.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 320 | proxy_resolver.cc \ |
| 321 | real_system_state.cc \ |
| 322 | shill_proxy.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 323 | update_attempter.cc \ |
| 324 | update_manager/boxed_value.cc \ |
| 325 | update_manager/chromeos_policy.cc \ |
| 326 | update_manager/default_policy.cc \ |
| 327 | update_manager/evaluation_context.cc \ |
| 328 | update_manager/policy.cc \ |
| 329 | update_manager/real_config_provider.cc \ |
| 330 | update_manager/real_device_policy_provider.cc \ |
| 331 | update_manager/real_random_provider.cc \ |
| 332 | update_manager/real_shill_provider.cc \ |
| 333 | update_manager/real_system_provider.cc \ |
| 334 | update_manager/real_time_provider.cc \ |
| 335 | update_manager/real_updater_provider.cc \ |
| 336 | update_manager/state_factory.cc \ |
| 337 | update_manager/update_manager.cc \ |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 338 | update_status_utils.cc \ |
| 339 | weave_service_factory.cc |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 340 | ifeq ($(local_use_binder),1) |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 341 | LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/binder_bindings |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 342 | LOCAL_SRC_FILES += \ |
| 343 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 344 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 345 | binder_service_brillo.cc \ |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 346 | parcelable_update_engine_status.cc |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 347 | endif # local_use_binder == 1 |
Alex Deymo | aabd81e | 2016-01-26 20:03:08 -0800 | [diff] [blame] | 348 | ifeq ($(local_use_weave),1) |
| 349 | LOCAL_SRC_FILES += \ |
| 350 | weave_service.cc |
| 351 | endif # local_use_weave == 1 |
Alex Deymo | 0cd976d | 2016-02-11 18:45:01 -0800 | [diff] [blame] | 352 | ifeq ($(local_use_libcros),1) |
| 353 | LOCAL_SRC_FILES += \ |
| 354 | chrome_browser_proxy_resolver.cc |
| 355 | endif # local_use_libcros == 1 |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 356 | include $(BUILD_STATIC_LIBRARY) |
| 357 | |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 358 | else # !defined(BRILLO) |
| 359 | |
| 360 | ifneq ($(local_use_binder),1) |
| 361 | $(error USE_BINDER is disabled but is required in non-Brillo devices.) |
| 362 | endif # local_use_binder == 1 |
| 363 | |
| 364 | # libupdate_engine_android (type: static_library) |
| 365 | # ======================================================== |
| 366 | # The main daemon static_library used in Android (non-Brillo). This only has a |
| 367 | # loop to apply payloads provided by the upper layer via a Binder interface. |
| 368 | ue_libupdate_engine_android_exported_static_libraries := \ |
| 369 | libpayload_consumer \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 370 | libfs_mgr \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 371 | $(ue_libpayload_consumer_exported_static_libraries) |
| 372 | ue_libupdate_engine_android_exported_shared_libraries := \ |
| 373 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 374 | libbinder \ |
| 375 | libbinderwrapper \ |
| 376 | libbrillo-binder \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 377 | libcutils \ |
| 378 | libhardware \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 379 | libutils |
| 380 | |
| 381 | include $(CLEAR_VARS) |
| 382 | LOCAL_MODULE := libupdate_engine_android |
| 383 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 384 | LOCAL_CPP_EXTENSION := .cc |
| 385 | LOCAL_CLANG := true |
| 386 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 387 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 388 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 389 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 390 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 391 | # out of the DBus interface. |
| 392 | LOCAL_C_INCLUDES += \ |
| 393 | external/cros/system_api/dbus |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 394 | LOCAL_STATIC_LIBRARIES := \ |
| 395 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
| 396 | LOCAL_SHARED_LIBRARIES += \ |
| 397 | $(ue_common_shared_libraries) \ |
| 398 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
| 399 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 400 | LOCAL_SRC_FILES += \ |
| 401 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 402 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
| 403 | binder_service_android.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 404 | boot_control_android.cc \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 405 | daemon.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 406 | daemon_state_android.cc \ |
| 407 | hardware_android.cc \ |
| 408 | proxy_resolver.cc \ |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 409 | update_attempter_android.cc \ |
| 410 | update_status_utils.cc |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 411 | include $(BUILD_STATIC_LIBRARY) |
| 412 | |
| 413 | endif # !defined(BRILLO) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 414 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 415 | # update_engine (type: executable) |
| 416 | # ======================================================== |
| 417 | # update_engine daemon. |
| 418 | include $(CLEAR_VARS) |
| 419 | LOCAL_MODULE := update_engine |
| 420 | LOCAL_MODULE_CLASS := EXECUTABLES |
Sen Jiang | 5609277 | 2015-11-23 14:41:00 -0800 | [diff] [blame] | 421 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | ab49446 | 2015-11-30 17:07:36 -0300 | [diff] [blame] | 422 | bspatch \ |
| 423 | cacerts_google |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 424 | ifeq ($(local_use_weave),1) |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 425 | LOCAL_REQUIRED_MODULES += updater.json |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 426 | endif # local_use_weave == 1 |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 427 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 428 | LOCAL_CLANG := true |
| 429 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 430 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 431 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 432 | LOCAL_C_INCLUDES := \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 433 | $(ue_common_c_includes) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 434 | LOCAL_SHARED_LIBRARIES := \ |
| 435 | $(ue_common_shared_libraries) |
| 436 | LOCAL_SRC_FILES := \ |
| 437 | main.cc |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 438 | |
| 439 | ifdef BRILLO |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 440 | LOCAL_C_INCLUDES += \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 441 | $(ue_libupdate_engine_exported_c_includes) |
| 442 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 443 | libupdate_engine \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 444 | $(ue_libupdate_engine_exported_static_libraries:-host=) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 445 | LOCAL_SHARED_LIBRARIES += \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 446 | $(ue_libupdate_engine_exported_shared_libraries:-host=) |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 447 | else # !defined(BRILLO) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 448 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 449 | libupdate_engine_android \ |
| 450 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 451 | LOCAL_SHARED_LIBRARIES += \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 452 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
| 453 | endif # !defined(BRILLO) |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 454 | |
Gilad Arnold | 70141f2 | 2015-09-17 09:06:30 -0700 | [diff] [blame] | 455 | LOCAL_INIT_RC := update_engine.rc |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 456 | include $(BUILD_EXECUTABLE) |
| 457 | |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 458 | # libupdate_engine_client (type: shared_library) |
| 459 | # ======================================================== |
| 460 | include $(CLEAR_VARS) |
| 461 | LOCAL_MODULE := libupdate_engine_client |
| 462 | LOCAL_CFLAGS := \ |
| 463 | -Wall \ |
| 464 | -Werror \ |
| 465 | -Wno-unused-parameter \ |
| 466 | -DUSE_DBUS=$(local_use_dbus) \ |
| 467 | -DUSE_BINDER=$(local_use_binder) |
| 468 | LOCAL_CLANG := true |
| 469 | LOCAL_CPP_EXTENSION := .cc |
| 470 | # TODO(deymo): Remove "external/cros/system_api/dbus" when dbus is not used. |
| 471 | LOCAL_C_INCLUDES := \ |
| 472 | $(LOCAL_PATH)/client_library/include \ |
| 473 | external/cros/system_api/dbus \ |
| 474 | system \ |
| 475 | external/gtest/include |
| 476 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/client_library/include |
| 477 | LOCAL_SHARED_LIBRARIES := \ |
| 478 | libchrome \ |
| 479 | libbrillo |
| 480 | LOCAL_SRC_FILES := \ |
| 481 | client_library/client.cc \ |
| 482 | update_status_utils.cc |
| 483 | |
| 484 | # We can only compile support for one IPC mechanism. If both "binder" and "dbus" |
| 485 | # are defined, we prefer binder. |
| 486 | ifeq ($(local_use_binder),1) |
| 487 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 488 | LOCAL_SHARED_LIBRARIES += \ |
| 489 | libbinder \ |
| 490 | libbrillo-binder \ |
| 491 | libutils |
| 492 | LOCAL_SRC_FILES += \ |
| 493 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 494 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
| 495 | client_library/client_binder.cc \ |
| 496 | parcelable_update_engine_status.cc |
| 497 | else # local_use_binder != 1 |
| 498 | LOCAL_STATIC_LIBRARIES := \ |
| 499 | update_engine_client-dbus-proxies |
| 500 | LOCAL_SHARED_LIBRARIES += \ |
| 501 | libchrome-dbus \ |
| 502 | libbrillo-dbus |
| 503 | LOCAL_SRC_FILES += \ |
| 504 | client_library/client_dbus.cc |
| 505 | endif # local_use_binder == 1 |
| 506 | |
| 507 | include $(BUILD_SHARED_LIBRARY) |
| 508 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 509 | # update_engine_client (type: executable) |
| 510 | # ======================================================== |
| 511 | # update_engine console client. |
| 512 | include $(CLEAR_VARS) |
| 513 | LOCAL_MODULE := update_engine_client |
| 514 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 515 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 516 | LOCAL_CLANG := true |
| 517 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 518 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 519 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Casey Dahlin | ce90f44 | 2016-01-25 16:55:28 -0800 | [diff] [blame] | 520 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 521 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
| 522 | ifdef BRILLO |
| 523 | LOCAL_SHARED_LIBRARIES += \ |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 524 | libupdate_engine_client |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 525 | LOCAL_SRC_FILES := \ |
Shuqian Zhao | 2997173 | 2016-02-05 11:29:32 -0800 | [diff] [blame] | 526 | update_engine_client.cc \ |
| 527 | common/error_code_utils.cc |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 528 | else # !defined(BRILLO) |
| 529 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 530 | # out of the DBus interface. |
| 531 | LOCAL_C_INCLUDES += \ |
| 532 | external/cros/system_api/dbus |
| 533 | LOCAL_SHARED_LIBRARIES += \ |
| 534 | libbinder \ |
Alex Deymo | 2130ee0 | 2016-02-02 18:35:50 -0800 | [diff] [blame] | 535 | libbinderwrapper \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 536 | libbrillo-binder \ |
| 537 | libutils |
| 538 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 539 | LOCAL_SRC_FILES := \ |
| 540 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 541 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 542 | common/error_code_utils.cc \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 543 | update_engine_client_android.cc \ |
| 544 | update_status_utils.cc |
| 545 | endif # !defined(BRILLO) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 546 | include $(BUILD_EXECUTABLE) |
| 547 | |
| 548 | # libpayload_generator (type: static_library) |
| 549 | # ======================================================== |
| 550 | # server-side code. This is used for delta_generator and unittests but not |
| 551 | # for any client code. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 552 | ue_libpayload_generator_exported_static_libraries := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 553 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 554 | update_metadata-protos \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 555 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 556 | $(ue_update_metadata_protos_exported_static_libraries) |
| 557 | ue_libpayload_generator_exported_shared_libraries := \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 558 | libext2fs-host \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 559 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 560 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 561 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 562 | ue_libpayload_generator_src_files := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 563 | payload_generator/ab_generator.cc \ |
| 564 | payload_generator/annotated_operation.cc \ |
| 565 | payload_generator/blob_file_writer.cc \ |
| 566 | payload_generator/block_mapping.cc \ |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 567 | payload_generator/bzip.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 568 | payload_generator/cycle_breaker.cc \ |
| 569 | payload_generator/delta_diff_generator.cc \ |
| 570 | payload_generator/delta_diff_utils.cc \ |
| 571 | payload_generator/ext2_filesystem.cc \ |
| 572 | payload_generator/extent_ranges.cc \ |
| 573 | payload_generator/extent_utils.cc \ |
| 574 | payload_generator/full_update_generator.cc \ |
| 575 | payload_generator/graph_types.cc \ |
| 576 | payload_generator/graph_utils.cc \ |
| 577 | payload_generator/inplace_generator.cc \ |
| 578 | payload_generator/payload_file.cc \ |
| 579 | payload_generator/payload_generation_config.cc \ |
| 580 | payload_generator/payload_signer.cc \ |
| 581 | payload_generator/raw_filesystem.cc \ |
| 582 | payload_generator/tarjan.cc \ |
| 583 | payload_generator/topological_sort.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 584 | |
| 585 | ifeq ($(HOST_OS),linux) |
| 586 | # Build for the host. |
| 587 | include $(CLEAR_VARS) |
| 588 | LOCAL_MODULE := libpayload_generator |
| 589 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 590 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 591 | LOCAL_CLANG := true |
| 592 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 593 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 594 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 595 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 596 | LOCAL_STATIC_LIBRARIES := \ |
| 597 | libpayload_consumer \ |
| 598 | update_metadata-protos \ |
| 599 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 600 | $(ue_update_metadata_protos_exported_static_libraries) |
| 601 | LOCAL_SHARED_LIBRARIES := \ |
| 602 | $(ue_common_shared_libraries) \ |
| 603 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 604 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 605 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 606 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
| 607 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 608 | endif # HOST_OS == linux |
| 609 | |
| 610 | # Build for the target. |
| 611 | include $(CLEAR_VARS) |
| 612 | LOCAL_MODULE := libpayload_generator |
| 613 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 614 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 615 | LOCAL_CLANG := true |
| 616 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 617 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 618 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 619 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 620 | LOCAL_STATIC_LIBRARIES := \ |
| 621 | libpayload_consumer \ |
| 622 | update_metadata-protos \ |
| 623 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 624 | $(ue_update_metadata_protos_exported_static_libraries) |
| 625 | LOCAL_SHARED_LIBRARIES := \ |
| 626 | $(ue_common_shared_libraries) \ |
| 627 | $(ue_libpayload_generator_exported_shared_libraries:-host=) \ |
| 628 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 629 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 630 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 631 | include $(BUILD_STATIC_LIBRARY) |
| 632 | |
| 633 | # delta_generator (type: executable) |
| 634 | # ======================================================== |
| 635 | # server-side delta generator. |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 636 | ue_delta_generator_src_files := \ |
| 637 | payload_generator/generate_delta_main.cc |
| 638 | |
| 639 | ifeq ($(HOST_OS),linux) |
| 640 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 641 | include $(CLEAR_VARS) |
| 642 | LOCAL_MODULE := delta_generator |
| 643 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 644 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 645 | LOCAL_CLANG := true |
| 646 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 647 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 648 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 649 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 650 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 651 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 652 | libpayload_generator \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 653 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 654 | $(ue_libpayload_generator_exported_static_libraries) |
| 655 | LOCAL_SHARED_LIBRARIES := \ |
| 656 | $(ue_common_shared_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 657 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 658 | $(ue_libpayload_generator_exported_shared_libraries) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 659 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
| 660 | include $(BUILD_HOST_EXECUTABLE) |
| 661 | endif # HOST_OS == linux |
| 662 | |
| 663 | # Build for the target. |
| 664 | include $(CLEAR_VARS) |
| 665 | LOCAL_MODULE := delta_generator |
| 666 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 667 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 668 | LOCAL_CLANG := true |
| 669 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 670 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 671 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 672 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 673 | LOCAL_STATIC_LIBRARIES := \ |
| 674 | libpayload_consumer \ |
| 675 | libpayload_generator \ |
| 676 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 677 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 678 | LOCAL_SHARED_LIBRARIES := \ |
| 679 | $(ue_common_shared_libraries) \ |
| 680 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 681 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 682 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 683 | include $(BUILD_EXECUTABLE) |
| 684 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame^] | 685 | # TODO(deymo): Enable the unittest binaries in non-Brillo builds once the DBus |
| 686 | # dependencies are removed or placed behind the USE_DBUS flag. |
| 687 | ifdef BRILLO |
| 688 | |
| 689 | # test_http_server (type: executable) |
| 690 | # ======================================================== |
| 691 | # Test HTTP Server. |
| 692 | include $(CLEAR_VARS) |
| 693 | LOCAL_MODULE := test_http_server |
| 694 | ifdef BRILLO |
| 695 | LOCAL_MODULE_TAGS := eng |
| 696 | endif |
| 697 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 698 | LOCAL_CPP_EXTENSION := .cc |
| 699 | LOCAL_CLANG := true |
| 700 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 701 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 702 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 703 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 704 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
| 705 | LOCAL_SRC_FILES := \ |
| 706 | common/http_common.cc \ |
| 707 | test_http_server.cc |
| 708 | include $(BUILD_NATIVE_TEST) |
| 709 | |
| 710 | # update_engine_unittests (type: executable) |
| 711 | # ======================================================== |
| 712 | # Main unittest file. |
| 713 | include $(CLEAR_VARS) |
| 714 | LOCAL_MODULE := update_engine_unittests |
| 715 | ifdef BRILLO |
| 716 | LOCAL_MODULE_TAGS := eng |
| 717 | endif |
| 718 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 719 | LOCAL_CPP_EXTENSION := .cc |
| 720 | LOCAL_CLANG := true |
| 721 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 722 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 723 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 724 | LOCAL_C_INCLUDES := \ |
| 725 | $(ue_common_c_includes) \ |
| 726 | $(ue_libupdate_engine_exported_c_includes) |
| 727 | LOCAL_STATIC_LIBRARIES := \ |
| 728 | libupdate_engine \ |
| 729 | libpayload_generator \ |
| 730 | libbrillo-test-helpers \ |
| 731 | libgmock \ |
| 732 | libgtest \ |
| 733 | libchrome_test_helpers \ |
| 734 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 735 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 736 | LOCAL_SHARED_LIBRARIES := \ |
| 737 | $(ue_common_shared_libraries) \ |
| 738 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 739 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 740 | LOCAL_SRC_FILES := \ |
| 741 | common/action_pipe_unittest.cc \ |
| 742 | common/action_processor_unittest.cc \ |
| 743 | common/action_unittest.cc \ |
| 744 | common/certificate_checker_unittest.cc \ |
| 745 | common/cpu_limiter_unittest.cc \ |
| 746 | common/fake_prefs.cc \ |
| 747 | common/hash_calculator_unittest.cc \ |
| 748 | common/http_fetcher_unittest.cc \ |
| 749 | common/hwid_override_unittest.cc \ |
| 750 | common/mock_http_fetcher.cc \ |
| 751 | common/prefs_unittest.cc \ |
| 752 | common/subprocess_unittest.cc \ |
| 753 | common/terminator_unittest.cc \ |
| 754 | common/test_utils.cc \ |
| 755 | common/utils_unittest.cc \ |
| 756 | common_service_unittest.cc \ |
| 757 | connection_manager_unittest.cc \ |
| 758 | fake_shill_proxy.cc \ |
| 759 | fake_system_state.cc \ |
| 760 | metrics_utils_unittest.cc \ |
| 761 | omaha_request_action_unittest.cc \ |
| 762 | omaha_request_params_unittest.cc \ |
| 763 | omaha_response_handler_action_unittest.cc \ |
| 764 | p2p_manager_unittest.cc \ |
| 765 | payload_consumer/bzip_extent_writer_unittest.cc \ |
| 766 | payload_consumer/delta_performer_integration_test.cc \ |
| 767 | payload_consumer/delta_performer_unittest.cc \ |
| 768 | payload_consumer/download_action_unittest.cc \ |
| 769 | payload_consumer/extent_writer_unittest.cc \ |
| 770 | payload_consumer/file_writer_unittest.cc \ |
| 771 | payload_consumer/filesystem_verifier_action_unittest.cc \ |
| 772 | payload_consumer/postinstall_runner_action_unittest.cc \ |
| 773 | payload_consumer/xz_extent_writer_unittest.cc \ |
| 774 | payload_generator/ab_generator_unittest.cc \ |
| 775 | payload_generator/blob_file_writer_unittest.cc \ |
| 776 | payload_generator/block_mapping_unittest.cc \ |
| 777 | payload_generator/cycle_breaker_unittest.cc \ |
| 778 | payload_generator/delta_diff_utils_unittest.cc \ |
| 779 | payload_generator/ext2_filesystem_unittest.cc \ |
| 780 | payload_generator/extent_ranges_unittest.cc \ |
| 781 | payload_generator/extent_utils_unittest.cc \ |
| 782 | payload_generator/fake_filesystem.cc \ |
| 783 | payload_generator/full_update_generator_unittest.cc \ |
| 784 | payload_generator/graph_utils_unittest.cc \ |
| 785 | payload_generator/inplace_generator_unittest.cc \ |
| 786 | payload_generator/payload_file_unittest.cc \ |
| 787 | payload_generator/payload_generation_config_unittest.cc \ |
| 788 | payload_generator/payload_signer_unittest.cc \ |
| 789 | payload_generator/tarjan_unittest.cc \ |
| 790 | payload_generator/topological_sort_unittest.cc \ |
| 791 | payload_generator/zip_unittest.cc \ |
| 792 | payload_state_unittest.cc \ |
| 793 | update_attempter_unittest.cc \ |
| 794 | update_manager/boxed_value_unittest.cc \ |
| 795 | update_manager/chromeos_policy_unittest.cc \ |
| 796 | update_manager/evaluation_context_unittest.cc \ |
| 797 | update_manager/generic_variables_unittest.cc \ |
| 798 | update_manager/prng_unittest.cc \ |
| 799 | update_manager/real_config_provider_unittest.cc \ |
| 800 | update_manager/real_device_policy_provider_unittest.cc \ |
| 801 | update_manager/real_random_provider_unittest.cc \ |
| 802 | update_manager/real_shill_provider_unittest.cc \ |
| 803 | update_manager/real_system_provider_unittest.cc \ |
| 804 | update_manager/real_time_provider_unittest.cc \ |
| 805 | update_manager/real_updater_provider_unittest.cc \ |
| 806 | update_manager/umtest_utils.cc \ |
| 807 | update_manager/update_manager_unittest.cc \ |
| 808 | update_manager/variable_unittest.cc \ |
| 809 | testrunner.cc |
| 810 | ifeq ($(local_use_libcros),1) |
| 811 | LOCAL_SRC_FILES += \ |
| 812 | chrome_browser_proxy_resolver_unittest.cc |
| 813 | endif # local_use_libcros == 1 |
| 814 | include $(BUILD_NATIVE_TEST) |
| 815 | endif # BRILLO |
| 816 | |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 817 | # Weave schema files |
| 818 | # ======================================================== |
| 819 | include $(CLEAR_VARS) |
| 820 | LOCAL_MODULE := updater.json |
| 821 | LOCAL_MODULE_CLASS := ETC |
| 822 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/weaved/traits |
| 823 | LOCAL_SRC_FILES := weaved/traits/$(LOCAL_MODULE) |
| 824 | include $(BUILD_PREBUILT) |
| 825 | |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 826 | # Update payload signing public key. |
| 827 | # ======================================================== |
Alex Deymo | 50e24f4 | 2016-01-27 20:48:54 -0800 | [diff] [blame] | 828 | ifdef BRILLO |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 829 | include $(CLEAR_VARS) |
| 830 | LOCAL_MODULE := brillo-update-payload-key |
| 831 | LOCAL_MODULE_CLASS := ETC |
| 832 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/update_engine |
| 833 | LOCAL_MODULE_STEM := update-payload-key.pub.pem |
| 834 | LOCAL_SRC_FILES := update_payload_key/brillo-update-payload-key.pub.pem |
| 835 | LOCAL_BUILT_MODULE_STEM := update_payload_key/brillo-update-payload-key.pub.pem |
| 836 | include $(BUILD_PREBUILT) |
Alex Deymo | 50e24f4 | 2016-01-27 20:48:54 -0800 | [diff] [blame] | 837 | endif # BRILLO |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 838 | |
| 839 | # Brillo update payload generation script |
| 840 | # ======================================================== |
| 841 | ifeq ($(HOST_OS),linux) |
| 842 | include $(CLEAR_VARS) |
| 843 | LOCAL_SRC_FILES := scripts/brillo_update_payload |
| 844 | LOCAL_MODULE := brillo_update_payload |
| 845 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 846 | LOCAL_IS_HOST_MODULE := true |
| 847 | LOCAL_MODULE_TAGS := optional |
| 848 | LOCAL_REQUIRED_MODULES := \ |
| 849 | delta_generator \ |
| 850 | shflags |
| 851 | include $(BUILD_PREBUILT) |
| 852 | endif # HOST_OS == linux |