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 | |
Daniel Cardenas | 0c37e31 | 2017-11-06 12:01:33 -0800 | [diff] [blame] | 17 | ifneq ($(TARGET_BUILD_PDK),true) |
| 18 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 19 | LOCAL_PATH := $(my-dir) |
| 20 | |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 21 | # Default values for the USE flags. Override these USE flags from your product |
| 22 | # by setting BRILLO_USE_* values. Note that we define local variables like |
| 23 | # local_use_* to prevent leaking our default setting for other packages. |
| 24 | local_use_binder := $(if $(BRILLO_USE_BINDER),$(BRILLO_USE_BINDER),1) |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 25 | local_use_hwid_override := \ |
| 26 | $(if $(BRILLO_USE_HWID_OVERRIDE),$(BRILLO_USE_HWID_OVERRIDE),0) |
| 27 | local_use_mtd := $(if $(BRILLO_USE_MTD),$(BRILLO_USE_MTD),0) |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 28 | local_use_chrome_network_proxy := 0 |
| 29 | local_use_chrome_kiosk_app := 0 |
Alex Deymo | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 30 | |
Alex Deymo | 49d6445 | 2016-10-31 16:56:58 -0700 | [diff] [blame] | 31 | # IoT devices use Omaha for updates. |
| 32 | local_use_omaha := $(if $(filter true,$(PRODUCT_IOT)),1,0) |
| 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) \ |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 36 | -DUSE_CHROME_NETWORK_PROXY=$(local_use_chrome_network_proxy) \ |
| 37 | -DUSE_CHROME_KIOSK_APP=$(local_use_chrome_kiosk_app) \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 38 | -DUSE_HWID_OVERRIDE=$(local_use_hwid_override) \ |
| 39 | -DUSE_MTD=$(local_use_mtd) \ |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 40 | -DUSE_OMAHA=$(local_use_omaha) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 41 | -D_FILE_OFFSET_BITS=64 \ |
| 42 | -D_POSIX_C_SOURCE=199309L \ |
| 43 | -Wa,--noexecstack \ |
| 44 | -Wall \ |
| 45 | -Werror \ |
| 46 | -Wextra \ |
| 47 | -Wformat=2 \ |
| 48 | -Wno-psabi \ |
| 49 | -Wno-unused-parameter \ |
| 50 | -ffunction-sections \ |
| 51 | -fstack-protector-strong \ |
| 52 | -fvisibility=hidden |
| 53 | ue_common_cppflags := \ |
| 54 | -Wnon-virtual-dtor \ |
Elliott Hughes | 063863b | 2016-10-10 13:37:53 -0700 | [diff] [blame] | 55 | -fno-strict-aliasing |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 56 | ue_common_ldflags := \ |
| 57 | -Wl,--gc-sections |
| 58 | ue_common_c_includes := \ |
| 59 | $(LOCAL_PATH)/client_library/include \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 60 | system |
| 61 | ue_common_shared_libraries := \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 62 | libbrillo-stream \ |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 63 | libbrillo \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 64 | libchrome |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 65 | ue_common_static_libraries := \ |
| 66 | libgtest_prod \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 67 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 68 | # update_metadata-protos (type: static_library) |
| 69 | # ======================================================== |
| 70 | # Protobufs. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 71 | ue_update_metadata_protos_exported_static_libraries := \ |
| 72 | update_metadata-protos |
| 73 | ue_update_metadata_protos_exported_shared_libraries := \ |
Alex Vakulenko | ab5bd66 | 2015-12-21 12:24:45 -0800 | [diff] [blame] | 74 | libprotobuf-cpp-lite |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 75 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 76 | ue_update_metadata_protos_src_files := \ |
| 77 | update_metadata.proto |
| 78 | |
| 79 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 80 | include $(CLEAR_VARS) |
| 81 | LOCAL_MODULE := update_metadata-protos |
| 82 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
Ying Wang | dbd1711 | 2015-12-17 11:59:09 -0800 | [diff] [blame] | 83 | LOCAL_IS_HOST_MODULE := true |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 84 | generated_sources_dir := $(call local-generated-sources-dir) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 85 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 86 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
Chih-Hung Hsieh | 908da19 | 2017-10-20 15:14:48 -0700 | [diff] [blame] | 87 | LOCAL_CFLAGS := -Wall -Werror |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 88 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 89 | |
| 90 | # Build for the target. |
| 91 | include $(CLEAR_VARS) |
| 92 | LOCAL_MODULE := update_metadata-protos |
| 93 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 94 | generated_sources_dir := $(call local-generated-sources-dir) |
| 95 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated_sources_dir)/proto/system |
| 96 | LOCAL_SRC_FILES := $(ue_update_metadata_protos_src_files) |
Chih-Hung Hsieh | 908da19 | 2017-10-20 15:14:48 -0700 | [diff] [blame] | 97 | LOCAL_CFLAGS := -Wall -Werror |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 98 | include $(BUILD_STATIC_LIBRARY) |
| 99 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 100 | # libpayload_consumer (type: static_library) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 101 | # ======================================================== |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 102 | # The payload application component and common dependencies. |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 103 | ue_libpayload_consumer_exported_static_libraries := \ |
| 104 | update_metadata-protos \ |
Steven Moreland | 0571c80 | 2017-05-12 14:10:55 -0700 | [diff] [blame] | 105 | libxz \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 106 | libbz \ |
Sen Jiang | 26dfa32 | 2016-05-10 15:31:46 -0700 | [diff] [blame] | 107 | libbspatch \ |
Tianjie Xu | 13df600 | 2017-10-28 22:05:20 -0700 | [diff] [blame] | 108 | libbrotli \ |
Amin Hassani | 02855c2 | 2017-09-06 22:34:50 -0700 | [diff] [blame] | 109 | libpuffpatch \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 110 | $(ue_update_metadata_protos_exported_static_libraries) |
| 111 | ue_libpayload_consumer_exported_shared_libraries := \ |
Dan Willemsen | 097288e | 2016-07-21 14:16:29 -0700 | [diff] [blame] | 112 | libcrypto \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 113 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 114 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 115 | ue_libpayload_consumer_src_files := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 116 | common/action_processor.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 117 | common/boot_control_stub.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 118 | common/clock.cc \ |
| 119 | common/constants.cc \ |
Alex Deymo | ab0d976 | 2016-02-02 10:52:56 -0800 | [diff] [blame] | 120 | common/cpu_limiter.cc \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 121 | common/error_code_utils.cc \ |
Alex Deymo | d6ece53 | 2016-06-21 17:00:05 -0700 | [diff] [blame] | 122 | common/file_fetcher.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 123 | common/hash_calculator.cc \ |
| 124 | common/http_common.cc \ |
| 125 | common/http_fetcher.cc \ |
| 126 | common/hwid_override.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 127 | common/multi_range_http_fetcher.cc \ |
| 128 | common/platform_constants_android.cc \ |
| 129 | common/prefs.cc \ |
| 130 | common/subprocess.cc \ |
| 131 | common/terminator.cc \ |
| 132 | common/utils.cc \ |
| 133 | payload_consumer/bzip_extent_writer.cc \ |
Amin Hassani | acd7be8 | 2017-08-25 15:32:13 -0700 | [diff] [blame] | 134 | payload_consumer/cached_file_descriptor.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 135 | payload_consumer/delta_performer.cc \ |
| 136 | payload_consumer/download_action.cc \ |
Amin Hassani | ee6d9a1 | 2017-08-31 14:09:15 -0700 | [diff] [blame] | 137 | payload_consumer/extent_reader.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 138 | payload_consumer/extent_writer.cc \ |
| 139 | payload_consumer/file_descriptor.cc \ |
Alex Deymo | a48f630 | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 140 | payload_consumer/file_descriptor_utils.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 141 | payload_consumer/file_writer.cc \ |
| 142 | payload_consumer/filesystem_verifier_action.cc \ |
| 143 | payload_consumer/install_plan.cc \ |
HÃ¥kan Kvist | 4e13cf4 | 2018-01-23 12:57:55 +0100 | [diff] [blame] | 144 | payload_consumer/mount_history.cc \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 145 | payload_consumer/payload_constants.cc \ |
| 146 | payload_consumer/payload_verifier.cc \ |
| 147 | payload_consumer/postinstall_runner_action.cc \ |
| 148 | payload_consumer/xz_extent_writer.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 149 | |
| 150 | ifeq ($(HOST_OS),linux) |
| 151 | # Build for the host. |
| 152 | include $(CLEAR_VARS) |
| 153 | LOCAL_MODULE := libpayload_consumer |
| 154 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 155 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 156 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 157 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 158 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 159 | LOCAL_C_INCLUDES := \ |
Sen Jiang | dcbc0ae | 2016-03-18 15:33:19 -0700 | [diff] [blame] | 160 | $(ue_common_c_includes) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 161 | LOCAL_STATIC_LIBRARIES := \ |
| 162 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 163 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 164 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 165 | $(ue_update_metadata_protos_exported_static_libraries) |
| 166 | LOCAL_SHARED_LIBRARIES := \ |
| 167 | $(ue_common_shared_libraries) \ |
| 168 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 169 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 170 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
| 171 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 172 | endif # HOST_OS == linux |
| 173 | |
| 174 | # Build for the target. |
| 175 | include $(CLEAR_VARS) |
| 176 | LOCAL_MODULE := libpayload_consumer |
| 177 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 178 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 179 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 180 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 181 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 182 | LOCAL_C_INCLUDES := \ |
Sen Jiang | dcbc0ae | 2016-03-18 15:33:19 -0700 | [diff] [blame] | 183 | $(ue_common_c_includes) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 184 | LOCAL_STATIC_LIBRARIES := \ |
| 185 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 186 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 187 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 188 | $(ue_update_metadata_protos_exported_static_libraries) |
| 189 | LOCAL_SHARED_LIBRARIES := \ |
| 190 | $(ue_common_shared_libraries) \ |
| 191 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 192 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 193 | LOCAL_SRC_FILES := $(ue_libpayload_consumer_src_files) |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 194 | include $(BUILD_STATIC_LIBRARY) |
| 195 | |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 196 | # libupdate_engine_boot_control (type: static_library) |
| 197 | # ======================================================== |
| 198 | # A BootControl class implementation using Android's HIDL boot_control HAL. |
| 199 | ue_libupdate_engine_boot_control_exported_static_libraries := \ |
| 200 | update_metadata-protos \ |
| 201 | $(ue_update_metadata_protos_exported_static_libraries) |
| 202 | |
| 203 | ue_libupdate_engine_boot_control_exported_shared_libraries := \ |
| 204 | libhwbinder \ |
Connor O'Brien | 25cea5e | 2016-11-28 12:44:10 -0800 | [diff] [blame] | 205 | libhidlbase \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 206 | libutils \ |
| 207 | android.hardware.boot@1.0 \ |
| 208 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 209 | |
| 210 | include $(CLEAR_VARS) |
| 211 | LOCAL_MODULE := libupdate_engine_boot_control |
| 212 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 213 | LOCAL_CPP_EXTENSION := .cc |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 214 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 215 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 216 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 217 | LOCAL_C_INCLUDES := \ |
| 218 | $(ue_common_c_includes) \ |
| 219 | bootable/recovery |
| 220 | LOCAL_STATIC_LIBRARIES := \ |
| 221 | $(ue_common_static_libraries) \ |
| 222 | $(ue_libupdate_engine_boot_control_exported_static_libraries) |
| 223 | LOCAL_SHARED_LIBRARIES := \ |
| 224 | $(ue_common_shared_libraries) \ |
| 225 | $(ue_libupdate_engine_boot_control_exported_shared_libraries) |
| 226 | LOCAL_SRC_FILES := \ |
| 227 | boot_control_android.cc |
| 228 | include $(BUILD_STATIC_LIBRARY) |
| 229 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 230 | ifeq ($(local_use_omaha),1) |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 231 | |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 232 | # libupdate_engine (type: static_library) |
| 233 | # ======================================================== |
| 234 | # The main daemon static_library with all the code used to check for updates |
| 235 | # with Omaha and expose a DBus daemon. |
| 236 | ue_libupdate_engine_exported_c_includes := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 237 | external/cros/system_api/dbus |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 238 | ue_libupdate_engine_exported_static_libraries := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 239 | libpayload_consumer \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 240 | update_metadata-protos \ |
David Zeuthen | 753fadc | 2015-09-15 16:34:09 -0400 | [diff] [blame] | 241 | libbz \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 242 | libfs_mgr \ |
bowgotsai | 763e17c | 2017-01-24 16:59:57 +0800 | [diff] [blame] | 243 | libbase \ |
bowgotsai | cd67f91 | 2017-01-27 14:50:26 +0800 | [diff] [blame] | 244 | liblog \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 245 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 246 | $(ue_update_metadata_protos_exported_static_libraries) \ |
| 247 | libupdate_engine_boot_control \ |
| 248 | $(ue_libupdate_engine_boot_control_exported_static_libraries) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 249 | ue_libupdate_engine_exported_shared_libraries := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 250 | libmetrics \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 251 | libexpat \ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 252 | libbrillo-policy \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 253 | libcurl \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 254 | libcutils \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 255 | libssl \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 256 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 257 | $(ue_update_metadata_protos_exported_shared_libraries) \ |
| 258 | $(ue_libupdate_engine_boot_control_exported_shared_libraries) |
Alex Deymo | c003790 | 2016-01-23 17:29:02 -0800 | [diff] [blame] | 259 | ifeq ($(local_use_binder),1) |
| 260 | ue_libupdate_engine_exported_shared_libraries += \ |
| 261 | libbinder \ |
| 262 | libbinderwrapper \ |
| 263 | libbrillo-binder \ |
| 264 | libutils |
| 265 | endif # local_use_binder == 1 |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 266 | |
| 267 | include $(CLEAR_VARS) |
| 268 | LOCAL_MODULE := libupdate_engine |
| 269 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 270 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 271 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(ue_libupdate_engine_exported_c_includes) |
| 272 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 273 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 274 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 275 | LOCAL_C_INCLUDES := \ |
| 276 | $(ue_common_c_includes) \ |
Alex Deymo | fb905d9 | 2016-06-03 19:26:58 -0700 | [diff] [blame] | 277 | $(ue_libupdate_engine_exported_c_includes) \ |
| 278 | bootable/recovery |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 279 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 280 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 281 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 282 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 283 | $(ue_libupdate_engine_exported_static_libraries:-host=) \ |
| 284 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 285 | $(ue_update_metadata_protos_exported_static_libraries) |
| 286 | LOCAL_SHARED_LIBRARIES := \ |
| 287 | $(ue_common_shared_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 288 | $(ue_libupdate_engine_exported_shared_libraries:-host=) \ |
| 289 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 290 | $(ue_update_metadata_protos_exported_shared_libraries) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 291 | LOCAL_SRC_FILES := \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 292 | certificate_checker.cc \ |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 293 | common_service.cc \ |
Sen Jiang | a7c4de2 | 2017-03-02 15:53:54 -0800 | [diff] [blame] | 294 | connection_manager_android.cc \ |
Sen Jiang | 255e22b | 2016-05-20 16:15:29 -0700 | [diff] [blame] | 295 | connection_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 296 | daemon.cc \ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 297 | hardware_android.cc \ |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 298 | image_properties_android.cc \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 299 | libcurl_http_fetcher.cc \ |
Tianjie Xu | 098f702 | 2017-08-24 21:37:16 -0700 | [diff] [blame] | 300 | metrics_reporter_omaha.cc \ |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 301 | metrics_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 302 | omaha_request_action.cc \ |
| 303 | omaha_request_params.cc \ |
| 304 | omaha_response_handler_action.cc \ |
Alex Deymo | b3fa53b | 2016-04-18 19:57:58 -0700 | [diff] [blame] | 305 | omaha_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 306 | p2p_manager.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 307 | payload_state.cc \ |
Sen Jiang | b8c6a8f | 2016-06-07 17:33:17 -0700 | [diff] [blame] | 308 | power_manager_android.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 309 | proxy_resolver.cc \ |
| 310 | real_system_state.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 311 | update_attempter.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 312 | update_manager/android_things_policy.cc \ |
Aaron Wood | bf5a252 | 2017-10-04 10:58:36 -0700 | [diff] [blame] | 313 | update_manager/api_restricted_downloads_policy_impl.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 314 | update_manager/boxed_value.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 315 | update_manager/default_policy.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 316 | update_manager/enough_slots_ab_updates_policy_impl.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 317 | update_manager/evaluation_context.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 318 | update_manager/interactive_update_policy_impl.cc \ |
| 319 | update_manager/next_update_check_policy_impl.cc \ |
| 320 | update_manager/official_build_check_policy_impl.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 321 | update_manager/policy.cc \ |
| 322 | update_manager/real_config_provider.cc \ |
| 323 | update_manager/real_device_policy_provider.cc \ |
| 324 | update_manager/real_random_provider.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 325 | update_manager/real_system_provider.cc \ |
| 326 | update_manager/real_time_provider.cc \ |
| 327 | update_manager/real_updater_provider.cc \ |
| 328 | update_manager/state_factory.cc \ |
| 329 | update_manager/update_manager.cc \ |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 330 | update_status_utils.cc \ |
Alex Deymo | dc066f1 | 2017-03-27 13:01:29 -0700 | [diff] [blame] | 331 | utils_android.cc |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 332 | ifeq ($(local_use_binder),1) |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 333 | LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/binder_bindings |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 334 | LOCAL_SRC_FILES += \ |
| 335 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 336 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 337 | binder_service_brillo.cc \ |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 338 | parcelable_update_engine_status.cc |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame] | 339 | endif # local_use_binder == 1 |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 340 | ifeq ($(local_use_chrome_network_proxy),1) |
Alex Deymo | 0cd976d | 2016-02-11 18:45:01 -0800 | [diff] [blame] | 341 | LOCAL_SRC_FILES += \ |
| 342 | chrome_browser_proxy_resolver.cc |
Amin Hassani | e94ece5 | 2017-08-01 15:03:08 -0700 | [diff] [blame] | 343 | endif # local_use_chrome_network_proxy == 1 |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 344 | include $(BUILD_STATIC_LIBRARY) |
| 345 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 346 | else # local_use_omaha == 1 |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 347 | |
| 348 | ifneq ($(local_use_binder),1) |
| 349 | $(error USE_BINDER is disabled but is required in non-Brillo devices.) |
| 350 | endif # local_use_binder == 1 |
| 351 | |
| 352 | # libupdate_engine_android (type: static_library) |
| 353 | # ======================================================== |
| 354 | # The main daemon static_library used in Android (non-Brillo). This only has a |
| 355 | # loop to apply payloads provided by the upper layer via a Binder interface. |
| 356 | ue_libupdate_engine_android_exported_static_libraries := \ |
| 357 | libpayload_consumer \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 358 | libfs_mgr \ |
bowgotsai | 763e17c | 2017-01-24 16:59:57 +0800 | [diff] [blame] | 359 | libbase \ |
bowgotsai | cd67f91 | 2017-01-27 14:50:26 +0800 | [diff] [blame] | 360 | liblog \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 361 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 362 | libupdate_engine_boot_control \ |
| 363 | $(ue_libupdate_engine_boot_control_exported_static_libraries) |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 364 | ue_libupdate_engine_android_exported_shared_libraries := \ |
| 365 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 366 | $(ue_libupdate_engine_boot_control_exported_shared_libraries) \ |
Alex Deymo | b8437be | 2016-12-09 16:28:12 -0800 | [diff] [blame] | 367 | libandroid_net \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 368 | libbinder \ |
| 369 | libbinderwrapper \ |
| 370 | libbrillo-binder \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 371 | libcutils \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 372 | libcurl \ |
Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 373 | libmetricslogger \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 374 | libssl \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 375 | libutils |
| 376 | |
| 377 | include $(CLEAR_VARS) |
| 378 | LOCAL_MODULE := libupdate_engine_android |
| 379 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 380 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 381 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 382 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 383 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | fb905d9 | 2016-06-03 19:26:58 -0700 | [diff] [blame] | 384 | LOCAL_C_INCLUDES := \ |
| 385 | $(ue_common_c_includes) \ |
| 386 | bootable/recovery |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 387 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 388 | # out of the DBus interface. |
| 389 | LOCAL_C_INCLUDES += \ |
| 390 | external/cros/system_api/dbus |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 391 | LOCAL_STATIC_LIBRARIES := \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 392 | $(ue_common_static_libraries) \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 393 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
| 394 | LOCAL_SHARED_LIBRARIES += \ |
| 395 | $(ue_common_shared_libraries) \ |
| 396 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
| 397 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 398 | LOCAL_SRC_FILES += \ |
| 399 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 400 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
| 401 | binder_service_android.cc \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 402 | certificate_checker.cc \ |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 403 | daemon.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 404 | daemon_state_android.cc \ |
| 405 | hardware_android.cc \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 406 | libcurl_http_fetcher.cc \ |
Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 407 | metrics_reporter_android.cc \ |
| 408 | metrics_utils.cc \ |
Alex Deymo | 87792ea | 2016-07-25 15:40:36 -0700 | [diff] [blame] | 409 | network_selector_android.cc \ |
Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 410 | proxy_resolver.cc \ |
Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 411 | update_attempter_android.cc \ |
Alex Deymo | fb905d9 | 2016-06-03 19:26:58 -0700 | [diff] [blame] | 412 | update_status_utils.cc \ |
| 413 | utils_android.cc |
Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 414 | include $(BUILD_STATIC_LIBRARY) |
| 415 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 416 | endif # local_use_omaha == 1 |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 417 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 418 | # update_engine (type: executable) |
| 419 | # ======================================================== |
| 420 | # update_engine daemon. |
| 421 | include $(CLEAR_VARS) |
| 422 | LOCAL_MODULE := update_engine |
| 423 | LOCAL_MODULE_CLASS := EXECUTABLES |
Sen Jiang | 5609277 | 2015-11-23 14:41:00 -0800 | [diff] [blame] | 424 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | ab49446 | 2015-11-30 17:07:36 -0300 | [diff] [blame] | 425 | cacerts_google |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 426 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 427 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 428 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 429 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 430 | LOCAL_C_INCLUDES := \ |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 431 | $(ue_common_c_includes) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 432 | LOCAL_SHARED_LIBRARIES := \ |
| 433 | $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 434 | LOCAL_STATIC_LIBRARIES := \ |
| 435 | $(ue_common_static_libraries) |
Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 436 | LOCAL_SRC_FILES := \ |
| 437 | main.cc |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 438 | |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 439 | ifeq ($(local_use_omaha),1) |
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) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 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=) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 447 | else # local_use_omaha == 1 |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [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=) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 453 | endif # local_use_omaha == 1 |
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 | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 458 | # update_engine_sideload (type: executable) |
| 459 | # ======================================================== |
| 460 | # A static binary equivalent to update_engine daemon that installs an update |
| 461 | # from a local file directly instead of running in the background. |
| 462 | include $(CLEAR_VARS) |
| 463 | LOCAL_MODULE := update_engine_sideload |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 464 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 465 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 466 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 467 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 468 | LOCAL_CFLAGS := \ |
| 469 | $(ue_common_cflags) \ |
| 470 | -D_UE_SIDELOAD |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 471 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 472 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 473 | LOCAL_C_INCLUDES := \ |
| 474 | $(ue_common_c_includes) \ |
| 475 | bootable/recovery |
| 476 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 477 | # out of the DBus interface. |
| 478 | LOCAL_C_INCLUDES += \ |
| 479 | external/cros/system_api/dbus |
| 480 | LOCAL_SRC_FILES := \ |
Connor O'Brien | cee6ad9 | 2016-11-21 13:53:52 -0800 | [diff] [blame] | 481 | boot_control_recovery.cc \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 482 | hardware_android.cc \ |
Tianjie Xu | d4c5deb | 2017-10-24 11:17:03 -0700 | [diff] [blame] | 483 | metrics_reporter_stub.cc \ |
Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 484 | metrics_utils.cc \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 485 | network_selector_stub.cc \ |
| 486 | proxy_resolver.cc \ |
| 487 | sideload_main.cc \ |
| 488 | update_attempter_android.cc \ |
| 489 | update_status_utils.cc \ |
| 490 | utils_android.cc |
| 491 | LOCAL_STATIC_LIBRARIES := \ |
| 492 | libfs_mgr \ |
bowgotsai | 763e17c | 2017-01-24 16:59:57 +0800 | [diff] [blame] | 493 | libbase \ |
bowgotsai | cd67f91 | 2017-01-27 14:50:26 +0800 | [diff] [blame] | 494 | liblog \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 495 | libpayload_consumer \ |
| 496 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 497 | $(ue_common_static_libraries) \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 498 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 499 | $(ue_update_metadata_protos_exported_static_libraries) |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 500 | # We add the static versions of the shared libraries since we are forcing this |
| 501 | # binary to be a static binary, so we also need to include all the static |
| 502 | # library dependencies of these static libraries. |
| 503 | LOCAL_STATIC_LIBRARIES += \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 504 | $(ue_common_shared_libraries) \ |
Tom Cherry | 012aa5b | 2017-10-10 14:45:09 -0700 | [diff] [blame] | 505 | libbase \ |
Dimitry Ivanov | e9ae98c | 2016-09-24 22:35:07 -0700 | [diff] [blame] | 506 | liblog \ |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 507 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 508 | $(ue_update_metadata_protos_exported_shared_libraries) \ |
| 509 | libevent \ |
| 510 | libmodpb64 \ |
| 511 | libgtest_prod |
Alex Deymo | 44348e0 | 2016-07-29 16:22:26 -0700 | [diff] [blame] | 512 | |
| 513 | ifeq ($(strip $(PRODUCT_STATIC_BOOT_CONTROL_HAL)),) |
| 514 | # No static boot_control HAL defined, so no sideload support. We use a fake |
| 515 | # boot_control HAL to allow compiling update_engine_sideload for test purposes. |
| 516 | ifeq ($(strip $(AB_OTA_UPDATER)),true) |
| 517 | $(warning No PRODUCT_STATIC_BOOT_CONTROL_HAL configured but AB_OTA_UPDATER is \ |
| 518 | true, no update sideload support.) |
| 519 | endif # AB_OTA_UPDATER == true |
| 520 | LOCAL_SRC_FILES += \ |
| 521 | boot_control_recovery_stub.cc |
| 522 | else # PRODUCT_STATIC_BOOT_CONTROL_HAL != "" |
| 523 | LOCAL_STATIC_LIBRARIES += \ |
| 524 | $(PRODUCT_STATIC_BOOT_CONTROL_HAL) |
| 525 | endif # PRODUCT_STATIC_BOOT_CONTROL_HAL != "" |
| 526 | |
Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 527 | include $(BUILD_EXECUTABLE) |
| 528 | |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 529 | # libupdate_engine_client (type: shared_library) |
| 530 | # ======================================================== |
| 531 | include $(CLEAR_VARS) |
| 532 | LOCAL_MODULE := libupdate_engine_client |
| 533 | LOCAL_CFLAGS := \ |
| 534 | -Wall \ |
| 535 | -Werror \ |
| 536 | -Wno-unused-parameter \ |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 537 | -DUSE_BINDER=$(local_use_binder) |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 538 | LOCAL_CPP_EXTENSION := .cc |
| 539 | # TODO(deymo): Remove "external/cros/system_api/dbus" when dbus is not used. |
| 540 | LOCAL_C_INCLUDES := \ |
| 541 | $(LOCAL_PATH)/client_library/include \ |
| 542 | external/cros/system_api/dbus \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 543 | system |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 544 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/client_library/include |
| 545 | LOCAL_SHARED_LIBRARIES := \ |
| 546 | libchrome \ |
| 547 | libbrillo |
| 548 | LOCAL_SRC_FILES := \ |
| 549 | client_library/client.cc \ |
| 550 | update_status_utils.cc |
| 551 | |
Sen Jiang | a7c4de2 | 2017-03-02 15:53:54 -0800 | [diff] [blame] | 552 | # We only support binder IPC mechanism in Android. |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 553 | ifeq ($(local_use_binder),1) |
| 554 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 555 | LOCAL_SHARED_LIBRARIES += \ |
| 556 | libbinder \ |
| 557 | libbrillo-binder \ |
| 558 | libutils |
| 559 | LOCAL_SRC_FILES += \ |
| 560 | binder_bindings/android/brillo/IUpdateEngine.aidl \ |
| 561 | binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl \ |
| 562 | client_library/client_binder.cc \ |
| 563 | parcelable_update_engine_status.cc |
Alex Deymo | a96ddc1 | 2016-02-10 15:59:03 -0800 | [diff] [blame] | 564 | endif # local_use_binder == 1 |
| 565 | |
| 566 | include $(BUILD_SHARED_LIBRARY) |
| 567 | |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 568 | # update_engine_client (type: executable) |
| 569 | # ======================================================== |
| 570 | # update_engine console client. |
| 571 | include $(CLEAR_VARS) |
| 572 | LOCAL_MODULE := update_engine_client |
| 573 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 574 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 575 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 576 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 577 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Casey Dahlin | ce90f44 | 2016-01-25 16:55:28 -0800 | [diff] [blame] | 578 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 579 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 580 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 581 | ifeq ($(local_use_omaha),1) |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 582 | LOCAL_SHARED_LIBRARIES += \ |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 583 | libupdate_engine_client |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 584 | LOCAL_SRC_FILES := \ |
Shuqian Zhao | 2997173 | 2016-02-05 11:29:32 -0800 | [diff] [blame] | 585 | update_engine_client.cc \ |
Alex Deymo | b3fa53b | 2016-04-18 19:57:58 -0700 | [diff] [blame] | 586 | common/error_code_utils.cc \ |
| 587 | omaha_utils.cc |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 588 | else # local_use_omaha == 1 |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 589 | #TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 590 | # out of the DBus interface. |
| 591 | LOCAL_C_INCLUDES += \ |
| 592 | external/cros/system_api/dbus |
| 593 | LOCAL_SHARED_LIBRARIES += \ |
| 594 | libbinder \ |
Alex Deymo | 2130ee0 | 2016-02-02 18:35:50 -0800 | [diff] [blame] | 595 | libbinderwrapper \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 596 | libbrillo-binder \ |
| 597 | libutils |
| 598 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder_bindings |
| 599 | LOCAL_SRC_FILES := \ |
| 600 | binder_bindings/android/os/IUpdateEngine.aidl \ |
| 601 | binder_bindings/android/os/IUpdateEngineCallback.aidl \ |
Alex Deymo | e88e9fe | 2016-02-03 16:38:00 -0800 | [diff] [blame] | 602 | common/error_code_utils.cc \ |
Alex Deymo | 5f52811 | 2016-01-27 23:32:36 -0800 | [diff] [blame] | 603 | update_engine_client_android.cc \ |
| 604 | update_status_utils.cc |
Sen Jiang | 192a86a | 2016-05-19 17:21:24 -0700 | [diff] [blame] | 605 | endif # local_use_omaha == 1 |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 606 | include $(BUILD_EXECUTABLE) |
| 607 | |
| 608 | # libpayload_generator (type: static_library) |
| 609 | # ======================================================== |
| 610 | # server-side code. This is used for delta_generator and unittests but not |
| 611 | # for any client code. |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 612 | ue_libpayload_generator_exported_static_libraries := \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 613 | libbsdiff \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 614 | libdivsufsort \ |
| 615 | libdivsufsort64 \ |
Tianjie Xu | 13df600 | 2017-10-28 22:05:20 -0700 | [diff] [blame] | 616 | libbrotli \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 617 | liblzma \ |
Amin Hassani | 3cd4df1 | 2017-08-25 11:21:53 -0700 | [diff] [blame] | 618 | libpayload_consumer \ |
| 619 | libpuffdiff \ |
Tianjie Xu | 1a7bb2c | 2018-01-22 17:56:57 -0800 | [diff] [blame] | 620 | libz \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 621 | update_metadata-protos \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 622 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 623 | $(ue_update_metadata_protos_exported_static_libraries) |
| 624 | ue_libpayload_generator_exported_shared_libraries := \ |
Alex Deymo | 89f6d67 | 2017-01-13 17:26:52 -0800 | [diff] [blame] | 625 | libext2fs \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 626 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 627 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 628 | |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 629 | ue_libpayload_generator_src_files := \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 630 | payload_generator/ab_generator.cc \ |
| 631 | payload_generator/annotated_operation.cc \ |
| 632 | payload_generator/blob_file_writer.cc \ |
| 633 | payload_generator/block_mapping.cc \ |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 634 | payload_generator/bzip.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 635 | payload_generator/cycle_breaker.cc \ |
Amin Hassani | 924183b | 2017-09-27 14:50:59 -0700 | [diff] [blame] | 636 | payload_generator/deflate_utils.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 637 | payload_generator/delta_diff_generator.cc \ |
| 638 | payload_generator/delta_diff_utils.cc \ |
| 639 | payload_generator/ext2_filesystem.cc \ |
| 640 | payload_generator/extent_ranges.cc \ |
| 641 | payload_generator/extent_utils.cc \ |
| 642 | payload_generator/full_update_generator.cc \ |
| 643 | payload_generator/graph_types.cc \ |
| 644 | payload_generator/graph_utils.cc \ |
| 645 | payload_generator/inplace_generator.cc \ |
Alex Deymo | 20bdc70 | 2016-12-07 21:07:11 -0800 | [diff] [blame] | 646 | payload_generator/mapfile_filesystem.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 647 | payload_generator/payload_file.cc \ |
| 648 | payload_generator/payload_generation_config.cc \ |
| 649 | payload_generator/payload_signer.cc \ |
| 650 | payload_generator/raw_filesystem.cc \ |
Amin Hassani | d7da8f4 | 2017-08-23 14:29:40 -0700 | [diff] [blame] | 651 | payload_generator/squashfs_filesystem.cc \ |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 652 | payload_generator/tarjan.cc \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 653 | payload_generator/topological_sort.cc \ |
| 654 | payload_generator/xz_android.cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 655 | |
| 656 | ifeq ($(HOST_OS),linux) |
| 657 | # Build for the host. |
| 658 | include $(CLEAR_VARS) |
| 659 | LOCAL_MODULE := libpayload_generator |
| 660 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 661 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 662 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 663 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 664 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 665 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 666 | LOCAL_STATIC_LIBRARIES := \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 667 | libbsdiff \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 668 | libdivsufsort \ |
| 669 | libdivsufsort64 \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 670 | liblzma \ |
Amin Hassani | 3cd4df1 | 2017-08-25 11:21:53 -0700 | [diff] [blame] | 671 | libpayload_consumer \ |
| 672 | libpuffdiff \ |
Amin Hassani | 71be937 | 2017-08-04 14:25:20 -0700 | [diff] [blame] | 673 | update_metadata-protos \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 674 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 675 | $(ue_libpayload_consumer_exported_static_libraries) \ |
| 676 | $(ue_update_metadata_protos_exported_static_libraries) |
| 677 | LOCAL_SHARED_LIBRARIES := \ |
| 678 | $(ue_common_shared_libraries) \ |
| 679 | $(ue_libpayload_generator_exported_shared_libraries) \ |
| 680 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
| 681 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 682 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
| 683 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 684 | endif # HOST_OS == linux |
| 685 | |
| 686 | # Build for the target. |
| 687 | include $(CLEAR_VARS) |
| 688 | LOCAL_MODULE := libpayload_generator |
| 689 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 690 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 691 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 692 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 693 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 694 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 695 | LOCAL_STATIC_LIBRARIES := \ |
Sen Jiang | 806f53d | 2017-08-17 16:00:34 -0700 | [diff] [blame] | 696 | libbsdiff \ |
| 697 | libdivsufsort \ |
| 698 | libdivsufsort64 \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 699 | libpayload_consumer \ |
| 700 | update_metadata-protos \ |
Alex Deymo | 246bf21 | 2016-03-22 19:27:33 -0700 | [diff] [blame] | 701 | liblzma \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 702 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 703 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 704 | $(ue_update_metadata_protos_exported_static_libraries) |
| 705 | LOCAL_SHARED_LIBRARIES := \ |
| 706 | $(ue_common_shared_libraries) \ |
| 707 | $(ue_libpayload_generator_exported_shared_libraries:-host=) \ |
| 708 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 709 | $(ue_update_metadata_protos_exported_shared_libraries) |
| 710 | LOCAL_SRC_FILES := $(ue_libpayload_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 711 | include $(BUILD_STATIC_LIBRARY) |
| 712 | |
| 713 | # delta_generator (type: executable) |
| 714 | # ======================================================== |
| 715 | # server-side delta generator. |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 716 | ue_delta_generator_src_files := \ |
| 717 | payload_generator/generate_delta_main.cc |
| 718 | |
| 719 | ifeq ($(HOST_OS),linux) |
| 720 | # Build for the host. |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 721 | include $(CLEAR_VARS) |
| 722 | LOCAL_MODULE := delta_generator |
| 723 | LOCAL_MODULE_CLASS := EXECUTABLES |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 724 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 725 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 726 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 727 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 728 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 729 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 730 | libpayload_consumer \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 731 | libpayload_generator \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 732 | $(ue_common_static_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 733 | $(ue_libpayload_consumer_exported_static_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 734 | $(ue_libpayload_generator_exported_static_libraries) |
| 735 | LOCAL_SHARED_LIBRARIES := \ |
| 736 | $(ue_common_shared_libraries) \ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 737 | $(ue_libpayload_consumer_exported_shared_libraries) \ |
Alex Deymo | c372ab6 | 2015-10-29 00:43:26 -0700 | [diff] [blame] | 738 | $(ue_libpayload_generator_exported_shared_libraries) |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 739 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
| 740 | include $(BUILD_HOST_EXECUTABLE) |
| 741 | endif # HOST_OS == linux |
| 742 | |
| 743 | # Build for the target. |
| 744 | include $(CLEAR_VARS) |
Sen Jiang | 5a216c1 | 2016-03-30 13:08:24 -0700 | [diff] [blame] | 745 | LOCAL_MODULE := ue_unittest_delta_generator |
| 746 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 747 | LOCAL_MODULE_STEM := delta_generator |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 748 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 749 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 750 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 751 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 752 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 753 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 754 | LOCAL_STATIC_LIBRARIES := \ |
| 755 | libpayload_consumer \ |
| 756 | libpayload_generator \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 757 | $(ue_common_static_libraries) \ |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 758 | $(ue_libpayload_consumer_exported_static_libraries:-host=) \ |
| 759 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 760 | LOCAL_SHARED_LIBRARIES := \ |
| 761 | $(ue_common_shared_libraries) \ |
| 762 | $(ue_libpayload_consumer_exported_shared_libraries:-host=) \ |
| 763 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 764 | LOCAL_SRC_FILES := $(ue_delta_generator_src_files) |
Alex Deymo | d5561a5 | 2015-09-03 23:17:52 -0700 | [diff] [blame] | 765 | include $(BUILD_EXECUTABLE) |
| 766 | |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 767 | # Private and public keys for unittests. |
| 768 | # ======================================================== |
| 769 | # Generate a module that installs a prebuilt private key and a module that |
| 770 | # installs a public key generated from the private key. |
| 771 | # |
| 772 | # $(1): The path to the private key in pem format. |
| 773 | define ue-unittest-keys |
| 774 | $(eval include $(CLEAR_VARS)) \ |
| 775 | $(eval LOCAL_MODULE := ue_$(1).pem) \ |
| 776 | $(eval LOCAL_MODULE_CLASS := ETC) \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 777 | $(eval LOCAL_SRC_FILES := $(1).pem) \ |
| 778 | $(eval LOCAL_MODULE_PATH := \ |
| 779 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests) \ |
| 780 | $(eval LOCAL_MODULE_STEM := $(1).pem) \ |
| 781 | $(eval include $(BUILD_PREBUILT)) \ |
| 782 | \ |
| 783 | $(eval include $(CLEAR_VARS)) \ |
| 784 | $(eval LOCAL_MODULE := ue_$(1).pub.pem) \ |
| 785 | $(eval LOCAL_MODULE_CLASS := ETC) \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 786 | $(eval LOCAL_MODULE_PATH := \ |
| 787 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests) \ |
| 788 | $(eval LOCAL_MODULE_STEM := $(1).pub.pem) \ |
| 789 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 790 | $(eval $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(1).pem ; \ |
| 791 | openssl rsa -in $$< -pubout -out $$@) |
| 792 | endef |
| 793 | |
| 794 | $(call ue-unittest-keys,unittest_key) |
| 795 | $(call ue-unittest-keys,unittest_key2) |
| 796 | |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 797 | # Sample images for unittests. |
| 798 | # ======================================================== |
| 799 | # Generate a prebuilt module that installs a sample image from the compressed |
| 800 | # sample_images.tar.bz2 file used by the unittests. |
| 801 | # |
| 802 | # $(1): The filename in the sample_images.tar.bz2 |
| 803 | define ue-unittest-sample-image |
| 804 | $(eval include $(CLEAR_VARS)) \ |
| 805 | $(eval LOCAL_MODULE := ue_unittest_$(1)) \ |
| 806 | $(eval LOCAL_MODULE_CLASS := EXECUTABLES) \ |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 807 | $(eval LOCAL_MODULE_PATH := \ |
| 808 | $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests/gen) \ |
| 809 | $(eval LOCAL_MODULE_STEM := $(1)) \ |
Alex Deymo | a3553e4 | 2016-03-04 18:55:05 -0800 | [diff] [blame] | 810 | $(eval include $(BUILD_SYSTEM)/base_rules.mk) \ |
| 811 | $(eval $(LOCAL_BUILT_MODULE) : \ |
| 812 | $(LOCAL_PATH)/sample_images/sample_images.tar.bz2 ; \ |
| 813 | tar -jxf $$< -C $$(dir $$@) $$(notdir $$@) && touch $$@) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 814 | endef |
| 815 | |
| 816 | $(call ue-unittest-sample-image,disk_ext2_1k.img) |
| 817 | $(call ue-unittest-sample-image,disk_ext2_4k.img) |
| 818 | $(call ue-unittest-sample-image,disk_ext2_4k_empty.img) |
Alex Deymo | d15c546 | 2016-03-09 18:11:12 -0800 | [diff] [blame] | 819 | $(call ue-unittest-sample-image,disk_ext2_unittest.img) |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 820 | |
Sen Jiang | ee63c6e | 2016-03-30 14:01:02 -0700 | [diff] [blame] | 821 | # update_engine.conf |
| 822 | # ======================================================== |
| 823 | include $(CLEAR_VARS) |
| 824 | LOCAL_MODULE := ue_unittest_update_engine.conf |
| 825 | LOCAL_MODULE_CLASS := ETC |
| 826 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 827 | LOCAL_MODULE_STEM := update_engine.conf |
| 828 | LOCAL_SRC_FILES := update_engine.conf |
| 829 | include $(BUILD_PREBUILT) |
| 830 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 831 | # test_http_server (type: executable) |
| 832 | # ======================================================== |
| 833 | # Test HTTP Server. |
| 834 | include $(CLEAR_VARS) |
| 835 | LOCAL_MODULE := test_http_server |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 836 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 837 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 838 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 839 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 840 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 841 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 842 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 843 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 844 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 845 | LOCAL_SRC_FILES := \ |
| 846 | common/http_common.cc \ |
| 847 | test_http_server.cc |
Alex Deymo | dc873fa | 2016-03-03 22:32:47 -0800 | [diff] [blame] | 848 | include $(BUILD_EXECUTABLE) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 849 | |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 850 | # test_subprocess (type: executable) |
| 851 | # ======================================================== |
| 852 | # Test helper subprocess program. |
| 853 | include $(CLEAR_VARS) |
| 854 | LOCAL_MODULE := test_subprocess |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 855 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/update_engine_unittests |
| 856 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 857 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 858 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 859 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 860 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 861 | LOCAL_C_INCLUDES := $(ue_common_c_includes) |
| 862 | LOCAL_SHARED_LIBRARIES := $(ue_common_shared_libraries) |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 863 | LOCAL_STATIC_LIBRARIES := $(ue_common_static_libraries) |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 864 | LOCAL_SRC_FILES := test_subprocess.cc |
| 865 | include $(BUILD_EXECUTABLE) |
| 866 | |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 867 | # update_engine_unittests (type: executable) |
| 868 | # ======================================================== |
| 869 | # Main unittest file. |
| 870 | include $(CLEAR_VARS) |
| 871 | LOCAL_MODULE := update_engine_unittests |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 872 | LOCAL_REQUIRED_MODULES := \ |
Alex Deymo | 279d572 | 2016-04-07 16:22:13 -0700 | [diff] [blame] | 873 | test_http_server \ |
| 874 | test_subprocess \ |
Sen Jiang | 5a216c1 | 2016-03-30 13:08:24 -0700 | [diff] [blame] | 875 | ue_unittest_delta_generator \ |
Alex Deymo | c90be63 | 2016-02-17 19:25:20 -0800 | [diff] [blame] | 876 | ue_unittest_disk_ext2_1k.img \ |
| 877 | ue_unittest_disk_ext2_4k.img \ |
| 878 | ue_unittest_disk_ext2_4k_empty.img \ |
Sen Jiang | 923886a | 2016-03-14 15:04:28 -0700 | [diff] [blame] | 879 | ue_unittest_disk_ext2_unittest.img \ |
| 880 | ue_unittest_key.pem \ |
| 881 | ue_unittest_key.pub.pem \ |
| 882 | ue_unittest_key2.pem \ |
Sen Jiang | e0d0428 | 2016-03-01 14:22:52 -0800 | [diff] [blame] | 883 | ue_unittest_key2.pub.pem \ |
Sen Jiang | a050711 | 2017-10-06 15:18:46 -0700 | [diff] [blame] | 884 | ue_unittest_update_engine.conf |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 885 | LOCAL_CPP_EXTENSION := .cc |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 886 | LOCAL_CFLAGS := $(ue_common_cflags) |
| 887 | LOCAL_CPPFLAGS := $(ue_common_cppflags) |
| 888 | LOCAL_LDFLAGS := $(ue_common_ldflags) |
| 889 | LOCAL_C_INCLUDES := \ |
| 890 | $(ue_common_c_includes) \ |
| 891 | $(ue_libupdate_engine_exported_c_includes) |
| 892 | LOCAL_STATIC_LIBRARIES := \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 893 | libpayload_generator \ |
| 894 | libbrillo-test-helpers \ |
| 895 | libgmock \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 896 | libchrome_test_helpers \ |
Dan Albert | 6cacaf5 | 2016-08-11 13:05:40 -0700 | [diff] [blame] | 897 | $(ue_common_static_libraries) \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 898 | $(ue_libpayload_generator_exported_static_libraries:-host=) |
| 899 | LOCAL_SHARED_LIBRARIES := \ |
| 900 | $(ue_common_shared_libraries) \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 901 | $(ue_libpayload_generator_exported_shared_libraries:-host=) |
| 902 | LOCAL_SRC_FILES := \ |
Alex Deymo | 14c0da8 | 2016-07-20 16:45:45 -0700 | [diff] [blame] | 903 | certificate_checker_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 904 | common/action_pipe_unittest.cc \ |
| 905 | common/action_processor_unittest.cc \ |
| 906 | common/action_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 907 | common/cpu_limiter_unittest.cc \ |
| 908 | common/fake_prefs.cc \ |
Alex Deymo | 2c131bb | 2016-05-26 16:43:13 -0700 | [diff] [blame] | 909 | common/file_fetcher_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 910 | common/hash_calculator_unittest.cc \ |
| 911 | common/http_fetcher_unittest.cc \ |
| 912 | common/hwid_override_unittest.cc \ |
| 913 | common/mock_http_fetcher.cc \ |
| 914 | common/prefs_unittest.cc \ |
| 915 | common/subprocess_unittest.cc \ |
| 916 | common/terminator_unittest.cc \ |
| 917 | common/test_utils.cc \ |
| 918 | common/utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 919 | payload_consumer/bzip_extent_writer_unittest.cc \ |
Amin Hassani | acd7be8 | 2017-08-25 15:32:13 -0700 | [diff] [blame] | 920 | payload_consumer/cached_file_descriptor_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 921 | payload_consumer/delta_performer_integration_test.cc \ |
| 922 | payload_consumer/delta_performer_unittest.cc \ |
Amin Hassani | ee6d9a1 | 2017-08-31 14:09:15 -0700 | [diff] [blame] | 923 | payload_consumer/extent_reader_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 924 | payload_consumer/extent_writer_unittest.cc \ |
Alex Deymo | a48f630 | 2016-11-04 15:49:53 -0700 | [diff] [blame] | 925 | payload_consumer/fake_file_descriptor.cc \ |
| 926 | payload_consumer/file_descriptor_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 927 | payload_consumer/file_writer_unittest.cc \ |
| 928 | payload_consumer/filesystem_verifier_action_unittest.cc \ |
| 929 | payload_consumer/postinstall_runner_action_unittest.cc \ |
| 930 | payload_consumer/xz_extent_writer_unittest.cc \ |
| 931 | payload_generator/ab_generator_unittest.cc \ |
| 932 | payload_generator/blob_file_writer_unittest.cc \ |
| 933 | payload_generator/block_mapping_unittest.cc \ |
| 934 | payload_generator/cycle_breaker_unittest.cc \ |
Amin Hassani | 924183b | 2017-09-27 14:50:59 -0700 | [diff] [blame] | 935 | payload_generator/deflate_utils_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 936 | payload_generator/delta_diff_utils_unittest.cc \ |
| 937 | payload_generator/ext2_filesystem_unittest.cc \ |
| 938 | payload_generator/extent_ranges_unittest.cc \ |
| 939 | payload_generator/extent_utils_unittest.cc \ |
| 940 | payload_generator/fake_filesystem.cc \ |
| 941 | payload_generator/full_update_generator_unittest.cc \ |
| 942 | payload_generator/graph_utils_unittest.cc \ |
| 943 | payload_generator/inplace_generator_unittest.cc \ |
Alex Deymo | 20bdc70 | 2016-12-07 21:07:11 -0800 | [diff] [blame] | 944 | payload_generator/mapfile_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 945 | payload_generator/payload_file_unittest.cc \ |
| 946 | payload_generator/payload_generation_config_unittest.cc \ |
| 947 | payload_generator/payload_signer_unittest.cc \ |
Amin Hassani | d7da8f4 | 2017-08-23 14:29:40 -0700 | [diff] [blame] | 948 | payload_generator/squashfs_filesystem_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 949 | payload_generator/tarjan_unittest.cc \ |
| 950 | payload_generator/topological_sort_unittest.cc \ |
| 951 | payload_generator/zip_unittest.cc \ |
Alex Deymo | 3582194 | 2017-02-05 04:36:02 +0000 | [diff] [blame] | 952 | proxy_resolver_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 953 | testrunner.cc |
| 954 | ifeq ($(local_use_omaha),1) |
| 955 | LOCAL_C_INCLUDES += \ |
| 956 | $(ue_libupdate_engine_exported_c_includes) |
| 957 | LOCAL_STATIC_LIBRARIES += \ |
| 958 | libupdate_engine \ |
| 959 | $(ue_libupdate_engine_exported_static_libraries:-host=) |
| 960 | LOCAL_SHARED_LIBRARIES += \ |
| 961 | $(ue_libupdate_engine_exported_shared_libraries:-host=) |
| 962 | LOCAL_SRC_FILES += \ |
| 963 | common_service_unittest.cc \ |
| 964 | fake_system_state.cc \ |
Sen Jiang | b56fe9f | 2017-06-16 15:19:35 -0700 | [diff] [blame] | 965 | image_properties_android_unittest.cc \ |
Tianjie Xu | 98333a8 | 2017-09-22 21:29:29 -0700 | [diff] [blame] | 966 | metrics_reporter_omaha_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 967 | metrics_utils_unittest.cc \ |
| 968 | omaha_request_action_unittest.cc \ |
| 969 | omaha_request_params_unittest.cc \ |
| 970 | omaha_response_handler_action_unittest.cc \ |
| 971 | omaha_utils_unittest.cc \ |
| 972 | p2p_manager_unittest.cc \ |
| 973 | payload_consumer/download_action_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 974 | payload_state_unittest.cc \ |
Aaron Wood | 7f92e2b | 2017-08-28 14:51:21 -0700 | [diff] [blame] | 975 | parcelable_update_engine_status_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 976 | update_attempter_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 977 | update_manager/android_things_policy_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 978 | update_manager/boxed_value_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 979 | update_manager/chromeos_policy.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 980 | update_manager/chromeos_policy_unittest.cc \ |
| 981 | update_manager/evaluation_context_unittest.cc \ |
| 982 | update_manager/generic_variables_unittest.cc \ |
Aaron Wood | 56d8ab3 | 2017-09-22 15:56:18 -0700 | [diff] [blame] | 983 | update_manager/next_update_check_policy_impl_unittest.cc \ |
| 984 | update_manager/policy_test_utils.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 985 | update_manager/prng_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 986 | update_manager/real_device_policy_provider_unittest.cc \ |
| 987 | update_manager/real_random_provider_unittest.cc \ |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 988 | update_manager/real_system_provider_unittest.cc \ |
| 989 | update_manager/real_time_provider_unittest.cc \ |
| 990 | update_manager/real_updater_provider_unittest.cc \ |
| 991 | update_manager/umtest_utils.cc \ |
| 992 | update_manager/update_manager_unittest.cc \ |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 993 | update_manager/variable_unittest.cc |
| 994 | else # local_use_omaha == 1 |
| 995 | LOCAL_STATIC_LIBRARIES += \ |
| 996 | libupdate_engine_android \ |
| 997 | $(ue_libupdate_engine_android_exported_static_libraries:-host=) |
| 998 | LOCAL_SHARED_LIBRARIES += \ |
| 999 | $(ue_libupdate_engine_android_exported_shared_libraries:-host=) |
Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 1000 | LOCAL_SRC_FILES += \ |
| 1001 | update_attempter_android_unittest.cc |
Sen Jiang | 24ab6c0 | 2016-06-22 16:26:47 -0700 | [diff] [blame] | 1002 | endif # local_use_omaha == 1 |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1003 | include $(BUILD_NATIVE_TEST) |
Alex Deymo | 80f70ff | 2016-02-10 16:08:11 -0800 | [diff] [blame] | 1004 | |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1005 | # Update payload signing public key. |
| 1006 | # ======================================================== |
Alex Deymo | 78850aa | 2017-04-05 04:25:36 -0700 | [diff] [blame] | 1007 | ifeq ($(PRODUCT_IOT),true) |
Gaurav Shah | 263614f | 2015-09-24 14:20:38 -0700 | [diff] [blame] | 1008 | include $(CLEAR_VARS) |
| 1009 | LOCAL_MODULE := brillo-update-payload-key |
| 1010 | LOCAL_MODULE_CLASS := ETC |
| 1011 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/update_engine |
| 1012 | LOCAL_MODULE_STEM := update-payload-key.pub.pem |
| 1013 | LOCAL_SRC_FILES := update_payload_key/brillo-update-payload-key.pub.pem |
| 1014 | LOCAL_BUILT_MODULE_STEM := update_payload_key/brillo-update-payload-key.pub.pem |
| 1015 | include $(BUILD_PREBUILT) |
Alex Deymo | 78850aa | 2017-04-05 04:25:36 -0700 | [diff] [blame] | 1016 | endif # PRODUCT_IOT |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 1017 | |
| 1018 | # Brillo update payload generation script |
| 1019 | # ======================================================== |
| 1020 | ifeq ($(HOST_OS),linux) |
| 1021 | include $(CLEAR_VARS) |
| 1022 | LOCAL_SRC_FILES := scripts/brillo_update_payload |
| 1023 | LOCAL_MODULE := brillo_update_payload |
| 1024 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 1025 | LOCAL_IS_HOST_MODULE := true |
| 1026 | LOCAL_MODULE_TAGS := optional |
| 1027 | LOCAL_REQUIRED_MODULES := \ |
| 1028 | delta_generator \ |
Sen Jiang | db537c1 | 2017-09-20 14:53:05 -0700 | [diff] [blame] | 1029 | shflags \ |
| 1030 | simg2img |
Tao Bao | 042f8a1 | 2016-01-07 16:52:14 -0800 | [diff] [blame] | 1031 | include $(BUILD_PREBUILT) |
| 1032 | endif # HOST_OS == linux |
Daniel Cardenas | 0c37e31 | 2017-11-06 12:01:33 -0800 | [diff] [blame] | 1033 | |
| 1034 | endif # ifneq ($(TARGET_BUILD_PDK),true) |