Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -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 | # |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 16 | { |
| 17 | 'target_defaults': { |
| 18 | 'variables': { |
| 19 | 'deps': [ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 20 | 'libbrillo-<(libbase_ver)', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 21 | 'libchrome-<(libbase_ver)', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 22 | ], |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 23 | # The -DUSE_* flags are passed from platform2.py. We use sane defaults |
| 24 | # here when these USE flags are not defined. You can set the default value |
| 25 | # for the USE flag in the ebuild. |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame^] | 26 | 'USE_binder%': '0', |
Alex Deymo | 4218b7e | 2015-11-17 21:14:42 -0300 | [diff] [blame] | 27 | 'USE_dbus%': '1', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 28 | 'USE_hwid_override%': '0', |
Alex Deymo | 787dc41 | 2015-10-29 11:39:20 -0700 | [diff] [blame] | 29 | 'USE_mtd%': '0', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 30 | 'USE_power_management%': '0', |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 31 | 'USE_buffet%': '0', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 32 | }, |
| 33 | 'cflags': [ |
| 34 | '-g', |
| 35 | '-ffunction-sections', |
| 36 | '-Wall', |
| 37 | '-Wextra', |
| 38 | '-Werror', |
| 39 | '-Wno-unused-parameter', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 40 | ], |
| 41 | 'cflags_cc': [ |
| 42 | '-fno-strict-aliasing', |
Nam T. Nguyen | fc144e6 | 2014-12-03 09:50:49 -0800 | [diff] [blame] | 43 | '-Wnon-virtual-dtor', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 44 | ], |
| 45 | 'ldflags': [ |
| 46 | '-Wl,--gc-sections', |
| 47 | ], |
| 48 | 'defines': [ |
Alex Deymo | 6f20dd4 | 2015-08-18 16:42:46 -0700 | [diff] [blame] | 49 | '_FILE_OFFSET_BITS=64', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 50 | '_POSIX_C_SOURCE=199309L', |
Alex Deymo | 78a954f | 2016-01-21 20:32:40 -0800 | [diff] [blame^] | 51 | 'USE_BINDER=<(USE_binder)', |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 52 | 'USE_DBUS=<(USE_dbus)', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 53 | 'USE_HWID_OVERRIDE=<(USE_hwid_override)', |
Nam T. Nguyen | f1d582e | 2014-12-08 15:07:17 -0800 | [diff] [blame] | 54 | 'USE_MTD=<(USE_mtd)', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 55 | 'USE_POWER_MANAGEMENT=<(USE_power_management)', |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 56 | 'USE_WEAVE=<(USE_buffet)', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 57 | ], |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 58 | 'include_dirs': [ |
| 59 | # We need this include dir because we include all the local code as |
| 60 | # "update_engine/...". |
| 61 | '<(platform2_root)/../aosp/system', |
Christopher Wiley | cc8ce0e | 2015-10-01 16:48:47 -0700 | [diff] [blame] | 62 | '<(platform2_root)/../aosp/system/update_engine/client_library/include', |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 63 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 64 | }, |
| 65 | 'targets': [ |
| 66 | # Protobufs. |
| 67 | { |
| 68 | 'target_name': 'update_metadata-protos', |
| 69 | 'type': 'static_library', |
| 70 | 'variables': { |
| 71 | 'proto_in_dir': '.', |
| 72 | 'proto_out_dir': 'include/update_engine', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 73 | 'exported_deps': [ |
Alex Deymo | b8f16a1 | 2014-06-10 18:59:22 -0700 | [diff] [blame] | 74 | 'protobuf-lite', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 75 | ], |
| 76 | 'deps': ['<@(exported_deps)'], |
| 77 | }, |
| 78 | 'all_dependent_settings': { |
| 79 | 'variables': { |
| 80 | 'deps': [ |
| 81 | '<@(exported_deps)', |
| 82 | ], |
| 83 | }, |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 84 | }, |
| 85 | 'sources': [ |
| 86 | 'update_metadata.proto' |
| 87 | ], |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 88 | 'includes': ['../../../platform2/common-mk/protoc.gypi'], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 89 | }, |
Alex Deymo | b7ca096 | 2014-10-01 17:58:07 -0700 | [diff] [blame] | 90 | # Chrome D-Bus bindings. |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 91 | { |
Alex Deymo | b7ca096 | 2014-10-01 17:58:07 -0700 | [diff] [blame] | 92 | 'target_name': 'update_engine-dbus-adaptor', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 93 | 'type': 'none', |
| 94 | 'variables': { |
Alex Deymo | 6f20dd4 | 2015-08-18 16:42:46 -0700 | [diff] [blame] | 95 | 'dbus_adaptors_out_dir': 'include/dbus_bindings', |
Alex Deymo | 8a7d0ca | 2015-08-25 17:30:27 -0700 | [diff] [blame] | 96 | 'dbus_xml_extension': 'dbus-xml', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 97 | }, |
| 98 | 'sources': [ |
Alex Deymo | 8a7d0ca | 2015-08-25 17:30:27 -0700 | [diff] [blame] | 99 | 'dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 100 | ], |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 101 | 'includes': ['../../../platform2/common-mk/generate-dbus-adaptors.gypi'], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 102 | }, |
Alex Deymo | f7feb23 | 2015-08-14 10:54:02 -0700 | [diff] [blame] | 103 | { |
Alex Deymo | b8803bb | 2015-08-19 23:14:49 -0700 | [diff] [blame] | 104 | 'target_name': 'update_engine-other-dbus-proxies', |
Alex Deymo | f7feb23 | 2015-08-14 10:54:02 -0700 | [diff] [blame] | 105 | 'type': 'none', |
| 106 | 'actions': [ |
| 107 | { |
Alex Deymo | b8803bb | 2015-08-19 23:14:49 -0700 | [diff] [blame] | 108 | 'action_name': 'update_engine-dbus-libcros-client', |
| 109 | 'variables': { |
| 110 | 'mock_output_file': 'include/libcros/dbus-proxy-mocks.h', |
| 111 | 'proxy_output_file': 'include/libcros/dbus-proxies.h' |
| 112 | }, |
| 113 | 'sources': [ |
Alex Deymo | 6f20dd4 | 2015-08-18 16:42:46 -0700 | [diff] [blame] | 114 | 'dbus_bindings/org.chromium.LibCrosService.dbus-xml', |
Alex Deymo | f7feb23 | 2015-08-14 10:54:02 -0700 | [diff] [blame] | 115 | ], |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 116 | 'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'], |
Alex Deymo | f7feb23 | 2015-08-14 10:54:02 -0700 | [diff] [blame] | 117 | }, |
| 118 | ], |
| 119 | }, |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 120 | # The payload application component and common dependencies. |
| 121 | { |
| 122 | 'target_name': 'libpayload_consumer', |
| 123 | 'type': 'static_library', |
| 124 | 'dependencies': [ |
| 125 | 'update_metadata-protos', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 126 | ], |
| 127 | #TODO(deymo): Remove unused dependencies once we stop including files |
| 128 | # from the root directory. |
| 129 | 'variables': { |
| 130 | 'exported_deps': [ |
| 131 | 'libcrypto', |
| 132 | 'libcurl', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 133 | 'libssl', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 134 | 'xz-embedded', |
| 135 | ], |
| 136 | 'deps': ['<@(exported_deps)'], |
| 137 | }, |
| 138 | 'all_dependent_settings': { |
| 139 | 'variables': { |
| 140 | 'deps': [ |
| 141 | '<@(exported_deps)', |
| 142 | ], |
| 143 | }, |
| 144 | }, |
| 145 | 'link_settings': { |
| 146 | 'variables': { |
| 147 | 'deps': [ |
| 148 | '<@(exported_deps)', |
| 149 | ], |
| 150 | }, |
| 151 | 'libraries': [ |
| 152 | '-lbz2', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 153 | '-lrt', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 154 | ], |
| 155 | }, |
| 156 | 'sources': [ |
| 157 | 'common/action_processor.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 158 | 'common/boot_control_stub.cc', |
| 159 | 'common/certificate_checker.cc', |
| 160 | 'common/clock.cc', |
| 161 | 'common/constants.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 162 | 'common/hash_calculator.cc', |
| 163 | 'common/http_common.cc', |
| 164 | 'common/http_fetcher.cc', |
| 165 | 'common/hwid_override.cc', |
| 166 | 'common/libcurl_http_fetcher.cc', |
| 167 | 'common/multi_range_http_fetcher.cc', |
| 168 | 'common/platform_constants_chromeos.cc', |
| 169 | 'common/prefs.cc', |
| 170 | 'common/subprocess.cc', |
| 171 | 'common/terminator.cc', |
| 172 | 'common/utils.cc', |
| 173 | 'payload_consumer/bzip_extent_writer.cc', |
| 174 | 'payload_consumer/delta_performer.cc', |
| 175 | 'payload_consumer/download_action.cc', |
| 176 | 'payload_consumer/extent_writer.cc', |
| 177 | 'payload_consumer/file_descriptor.cc', |
| 178 | 'payload_consumer/file_writer.cc', |
| 179 | 'payload_consumer/filesystem_verifier_action.cc', |
| 180 | 'payload_consumer/install_plan.cc', |
| 181 | 'payload_consumer/payload_constants.cc', |
| 182 | 'payload_consumer/payload_verifier.cc', |
| 183 | 'payload_consumer/postinstall_runner_action.cc', |
| 184 | 'payload_consumer/xz_extent_writer.cc', |
| 185 | ], |
| 186 | 'conditions': [ |
| 187 | ['USE_mtd == 1', { |
| 188 | 'sources': [ |
| 189 | 'payload_consumer/mtd_file_descriptor.cc', |
| 190 | ], |
| 191 | 'link_settings': { |
| 192 | 'libraries': [ |
| 193 | '-lmtdutils', |
| 194 | ], |
| 195 | }, |
| 196 | }], |
| 197 | ], |
| 198 | }, |
| 199 | # The main daemon static_library with all the code used to check for updates |
| 200 | # with Omaha and expose a DBus daemon. |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 201 | { |
| 202 | 'target_name': 'libupdate_engine', |
| 203 | 'type': 'static_library', |
| 204 | 'dependencies': [ |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 205 | 'libpayload_consumer', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 206 | 'update_metadata-protos', |
Alex Deymo | 3053450 | 2015-07-20 15:06:33 -0700 | [diff] [blame] | 207 | 'update_engine-dbus-adaptor', |
Alex Deymo | b8803bb | 2015-08-19 23:14:49 -0700 | [diff] [blame] | 208 | 'update_engine-other-dbus-proxies', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 209 | ], |
| 210 | 'variables': { |
| 211 | 'exported_deps': [ |
| 212 | 'dbus-1', |
Alex Deymo | d6deb1d | 2015-08-28 15:54:37 -0700 | [diff] [blame] | 213 | 'libdebugd-client', |
| 214 | 'libsession_manager-client', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 215 | 'libmetrics-<(libbase_ver)', |
Alex Deymo | d6deb1d | 2015-08-28 15:54:37 -0700 | [diff] [blame] | 216 | 'libpower_manager-client', |
| 217 | 'libupdate_engine-client', |
| 218 | 'libshill-client', |
Alex Deymo | d6deb1d | 2015-08-28 15:54:37 -0700 | [diff] [blame] | 219 | 'expat', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 220 | ], |
| 221 | 'deps': ['<@(exported_deps)'], |
| 222 | }, |
| 223 | 'all_dependent_settings': { |
| 224 | 'variables': { |
| 225 | 'deps': [ |
| 226 | '<@(exported_deps)', |
| 227 | ], |
| 228 | }, |
| 229 | }, |
| 230 | 'link_settings': { |
| 231 | 'variables': { |
| 232 | 'deps': [ |
| 233 | '<@(exported_deps)', |
| 234 | ], |
| 235 | }, |
| 236 | 'libraries': [ |
| 237 | '-lbz2', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 238 | '-lpolicy-<(libbase_ver)', |
| 239 | '-lrootdev', |
| 240 | '-lrt', |
| 241 | '-lvboot_host', |
| 242 | ], |
| 243 | }, |
| 244 | 'sources': [ |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 245 | 'boot_control_chromeos.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 246 | 'chrome_browser_proxy_resolver.cc', |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 247 | 'common_service.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 248 | 'connection_manager.cc', |
Alex Deymo | b7ca096 | 2014-10-01 17:58:07 -0700 | [diff] [blame] | 249 | 'daemon.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 250 | 'dbus_service.cc', |
Alex Deymo | 1b03f9f | 2015-12-09 00:38:36 -0800 | [diff] [blame] | 251 | 'hardware_chromeos.cc', |
Alex Deymo | 8561665 | 2015-10-15 18:48:31 -0700 | [diff] [blame] | 252 | 'image_properties_chromeos.cc', |
Alex Deymo | 3053450 | 2015-07-20 15:06:33 -0700 | [diff] [blame] | 253 | 'libcros_proxy.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 254 | 'metrics.cc', |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 255 | 'metrics_utils.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 256 | 'omaha_request_action.cc', |
| 257 | 'omaha_request_params.cc', |
| 258 | 'omaha_response_handler_action.cc', |
| 259 | 'p2p_manager.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 260 | 'payload_state.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 261 | 'proxy_resolver.cc', |
| 262 | 'real_system_state.cc', |
Alex Deymo | 3053450 | 2015-07-20 15:06:33 -0700 | [diff] [blame] | 263 | 'shill_proxy.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 264 | 'update_attempter.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 265 | 'update_manager/boxed_value.cc', |
| 266 | 'update_manager/chromeos_policy.cc', |
Gilad Arnold | a23e408 | 2014-07-17 11:40:43 -0700 | [diff] [blame] | 267 | 'update_manager/default_policy.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 268 | 'update_manager/evaluation_context.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 269 | 'update_manager/policy.cc', |
| 270 | 'update_manager/real_config_provider.cc', |
| 271 | 'update_manager/real_device_policy_provider.cc', |
| 272 | 'update_manager/real_random_provider.cc', |
| 273 | 'update_manager/real_shill_provider.cc', |
| 274 | 'update_manager/real_system_provider.cc', |
| 275 | 'update_manager/real_time_provider.cc', |
| 276 | 'update_manager/real_updater_provider.cc', |
| 277 | 'update_manager/state_factory.cc', |
| 278 | 'update_manager/update_manager.cc', |
Christopher Wiley | cc8ce0e | 2015-10-01 16:48:47 -0700 | [diff] [blame] | 279 | 'update_status_utils.cc', |
Alex Deymo | f7ead81 | 2015-10-23 17:37:27 -0700 | [diff] [blame] | 280 | 'weave_service_factory.cc', |
| 281 | ], |
| 282 | 'conditions': [ |
| 283 | ['USE_buffet == 1', { |
| 284 | 'sources': [ |
| 285 | 'weave_service.cc', |
| 286 | ], |
| 287 | 'variables': { |
| 288 | 'exported_deps': [ |
| 289 | 'libweave-<(libbase_ver)', |
| 290 | ], |
| 291 | }, |
| 292 | }], |
Nam T. Nguyen | f1d582e | 2014-12-08 15:07:17 -0800 | [diff] [blame] | 293 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 294 | }, |
| 295 | # update_engine daemon. |
| 296 | { |
| 297 | 'target_name': 'update_engine', |
| 298 | 'type': 'executable', |
Alex Deymo | 44666f9 | 2014-07-22 20:29:24 -0700 | [diff] [blame] | 299 | 'dependencies': [ |
| 300 | 'libupdate_engine', |
Alex Deymo | 44666f9 | 2014-07-22 20:29:24 -0700 | [diff] [blame] | 301 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 302 | 'sources': [ |
| 303 | 'main.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 304 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 305 | }, |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 306 | # update_engine client library. |
| 307 | { |
| 308 | 'target_name': 'libupdate_engine_client', |
| 309 | 'type': 'static_library', |
| 310 | 'variables': { |
| 311 | 'deps': [ |
| 312 | 'dbus-1', |
| 313 | 'libupdate_engine-client', |
| 314 | ], |
| 315 | }, |
| 316 | 'sources': [ |
| 317 | 'client_library/client.cc', |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 318 | 'client_library/client_dbus.cc', |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 319 | 'update_status_utils.cc', |
| 320 | ], |
| 321 | 'include_dirs': [ |
| 322 | 'client_library/include', |
| 323 | ], |
| 324 | }, |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 325 | # update_engine console client. |
| 326 | { |
| 327 | 'target_name': 'update_engine_client', |
| 328 | 'type': 'executable', |
Casey Dahlin | e844c1a | 2015-12-16 14:30:58 -0800 | [diff] [blame] | 329 | 'dependencies': [ |
| 330 | 'libupdate_engine_client', |
| 331 | ], |
Alex Deymo | 44666f9 | 2014-07-22 20:29:24 -0700 | [diff] [blame] | 332 | 'variables': { |
| 333 | 'exported_deps': [ |
Alex Deymo | d6deb1d | 2015-08-28 15:54:37 -0700 | [diff] [blame] | 334 | 'libupdate_engine-client', |
Alex Deymo | 05e0e38 | 2015-12-07 20:18:16 -0800 | [diff] [blame] | 335 | 'dbus-1', |
Alex Deymo | 44666f9 | 2014-07-22 20:29:24 -0700 | [diff] [blame] | 336 | ], |
| 337 | 'deps': ['<@(exported_deps)'], |
| 338 | }, |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 339 | 'sources': [ |
| 340 | 'update_engine_client.cc', |
Alex Deymo | 72aa002 | 2015-06-19 21:16:49 -0700 | [diff] [blame] | 341 | ], |
Alex Deymo | d2956cc | 2015-08-17 15:39:40 -0700 | [diff] [blame] | 342 | }, |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 343 | # server-side code. This is used for delta_generator and unittests but not |
| 344 | # for any client code. |
| 345 | { |
| 346 | 'target_name': 'libpayload_generator', |
| 347 | 'type': 'static_library', |
| 348 | 'dependencies': [ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 349 | 'libpayload_consumer', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 350 | 'update_metadata-protos', |
| 351 | ], |
Alex Deymo | 5d52780 | 2014-07-18 14:24:13 -0700 | [diff] [blame] | 352 | 'variables': { |
| 353 | 'exported_deps': [ |
| 354 | 'ext2fs', |
| 355 | ], |
| 356 | 'deps': ['<@(exported_deps)'], |
| 357 | }, |
| 358 | 'all_dependent_settings': { |
| 359 | 'variables': { |
| 360 | 'deps': [ |
| 361 | '<@(exported_deps)', |
| 362 | ], |
| 363 | }, |
| 364 | }, |
| 365 | 'link_settings': { |
| 366 | 'variables': { |
| 367 | 'deps': [ |
| 368 | '<@(exported_deps)', |
| 369 | ], |
| 370 | }, |
| 371 | }, |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 372 | 'sources': [ |
Alex Deymo | 1415857 | 2015-06-13 03:37:08 -0700 | [diff] [blame] | 373 | 'payload_generator/ab_generator.cc', |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 374 | 'payload_generator/annotated_operation.cc', |
Sen Jiang | 8cc502d | 2015-08-10 10:04:54 -0700 | [diff] [blame] | 375 | 'payload_generator/blob_file_writer.cc', |
Alex Deymo | f006135 | 2015-07-01 14:59:15 -0700 | [diff] [blame] | 376 | 'payload_generator/block_mapping.cc', |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 377 | 'payload_generator/bzip.cc', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 378 | 'payload_generator/cycle_breaker.cc', |
| 379 | 'payload_generator/delta_diff_generator.cc', |
Alex Deymo | 1415857 | 2015-06-13 03:37:08 -0700 | [diff] [blame] | 380 | 'payload_generator/delta_diff_utils.cc', |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 381 | 'payload_generator/ext2_filesystem.cc', |
Alex Deymo | 1beda78 | 2015-06-07 23:01:25 +0200 | [diff] [blame] | 382 | 'payload_generator/extent_ranges.cc', |
Alex Deymo | 5c6c655 | 2015-06-03 19:06:50 +0200 | [diff] [blame] | 383 | 'payload_generator/extent_utils.cc', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 384 | 'payload_generator/full_update_generator.cc', |
Alex Deymo | 9b244df | 2015-03-11 21:51:18 -0700 | [diff] [blame] | 385 | 'payload_generator/graph_types.cc', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 386 | 'payload_generator/graph_utils.cc', |
Allie Wood | cd514b5 | 2015-02-19 13:56:07 -0800 | [diff] [blame] | 387 | 'payload_generator/inplace_generator.cc', |
Alex Deymo | 1415857 | 2015-06-13 03:37:08 -0700 | [diff] [blame] | 388 | 'payload_generator/payload_file.cc', |
Alex Deymo | f1cbe17 | 2015-03-05 15:58:37 -0800 | [diff] [blame] | 389 | 'payload_generator/payload_generation_config.cc', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 390 | 'payload_generator/payload_signer.cc', |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 391 | 'payload_generator/raw_filesystem.cc', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 392 | 'payload_generator/tarjan.cc', |
| 393 | 'payload_generator/topological_sort.cc', |
| 394 | ], |
| 395 | }, |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 396 | # server-side delta generator. |
| 397 | { |
| 398 | 'target_name': 'delta_generator', |
| 399 | 'type': 'executable', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 400 | 'dependencies': [ |
Alex Deymo | b09305e | 2015-12-02 16:09:13 -0300 | [diff] [blame] | 401 | 'libpayload_consumer', |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 402 | 'libpayload_generator', |
| 403 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 404 | 'link_settings': { |
| 405 | 'ldflags!': [ |
| 406 | '-pie', |
| 407 | ], |
| 408 | }, |
| 409 | 'sources': [ |
| 410 | 'payload_generator/generate_delta_main.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 411 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 412 | }, |
| 413 | ], |
| 414 | 'conditions': [ |
| 415 | ['USE_test == 1', { |
| 416 | 'targets': [ |
| 417 | # Public keys used for unit testing. |
| 418 | { |
| 419 | 'target_name': 'update_engine-testkeys', |
| 420 | 'type': 'none', |
| 421 | 'variables': { |
| 422 | 'openssl_pem_in_dir': '.', |
| 423 | 'openssl_pem_out_dir': 'include/update_engine', |
| 424 | }, |
| 425 | 'sources': [ |
| 426 | 'unittest_key.pem', |
| 427 | 'unittest_key2.pem', |
| 428 | ], |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 429 | 'includes': ['../../../platform2/common-mk/openssl_pem.gypi'], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 430 | }, |
Alex Deymo | 04ef207 | 2015-08-13 08:19:16 -0700 | [diff] [blame] | 431 | # Unpacks sample images used for testing. |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 432 | { |
| 433 | 'target_name': 'update_engine-test_images', |
| 434 | 'type': 'none', |
| 435 | 'variables': { |
| 436 | 'image_out_dir': '.', |
| 437 | }, |
| 438 | 'sources': [ |
Alex Deymo | 04ef207 | 2015-08-13 08:19:16 -0700 | [diff] [blame] | 439 | 'sample_images/sample_images.tar.bz2', |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 440 | ], |
Alex Deymo | 04ef207 | 2015-08-13 08:19:16 -0700 | [diff] [blame] | 441 | 'includes': ['tar_bunzip2.gypi'], |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 442 | }, |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 443 | # Test HTTP Server. |
| 444 | { |
| 445 | 'target_name': 'test_http_server', |
| 446 | 'type': 'executable', |
| 447 | 'dependencies': ['libupdate_engine'], |
| 448 | 'sources': [ |
| 449 | 'test_http_server.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 450 | ], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 451 | }, |
| 452 | # Main unittest file. |
| 453 | { |
| 454 | 'target_name': 'update_engine_unittests', |
| 455 | 'type': 'executable', |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 456 | 'includes': ['../../../platform2/common-mk/common_test.gypi'], |
Alex Deymo | 509dd53 | 2015-06-10 14:11:05 -0700 | [diff] [blame] | 457 | 'variables': { |
| 458 | 'deps': [ |
Alex Vakulenko | 1bab5a8 | 2015-10-27 11:47:28 -0700 | [diff] [blame] | 459 | 'libbrillo-test-<(libbase_ver)', |
Alex Deymo | 509dd53 | 2015-06-10 14:11:05 -0700 | [diff] [blame] | 460 | 'libchrome-test-<(libbase_ver)', |
Alex Deymo | d6deb1d | 2015-08-28 15:54:37 -0700 | [diff] [blame] | 461 | 'libdebugd-client-test', |
| 462 | 'libpower_manager-client-test', |
| 463 | 'libsession_manager-client-test', |
| 464 | 'libshill-client-test', |
Alex Deymo | 509dd53 | 2015-06-10 14:11:05 -0700 | [diff] [blame] | 465 | ], |
| 466 | }, |
Alex Deymo | 7504e5f | 2014-07-15 17:58:51 -0700 | [diff] [blame] | 467 | 'dependencies': [ |
| 468 | 'libupdate_engine', |
| 469 | 'libpayload_generator', |
| 470 | ], |
Alex Deymo | a7a34d8 | 2015-08-24 20:47:01 -0700 | [diff] [blame] | 471 | 'includes': ['../../../platform2/common-mk/common_test.gypi'], |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 472 | 'sources': [ |
Alex Deymo | e7ba31b | 2015-12-11 18:19:41 -0800 | [diff] [blame] | 473 | 'boot_control_chromeos_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 474 | 'chrome_browser_proxy_resolver_unittest.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 475 | 'common/action_pipe_unittest.cc', |
| 476 | 'common/action_processor_unittest.cc', |
| 477 | 'common/action_unittest.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 478 | 'common/certificate_checker_unittest.cc', |
| 479 | 'common/fake_prefs.cc', |
| 480 | 'common/hash_calculator_unittest.cc', |
| 481 | 'common/http_fetcher_unittest.cc', |
| 482 | 'common/hwid_override_unittest.cc', |
| 483 | 'common/mock_http_fetcher.cc', |
| 484 | 'common/prefs_unittest.cc', |
| 485 | 'common/subprocess_unittest.cc', |
| 486 | 'common/terminator_unittest.cc', |
| 487 | 'common/test_utils.cc', |
| 488 | 'common/utils_unittest.cc', |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 489 | 'common_service_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 490 | 'connection_manager_unittest.cc', |
Alex Deymo | 3053450 | 2015-07-20 15:06:33 -0700 | [diff] [blame] | 491 | 'fake_shill_proxy.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 492 | 'fake_system_state.cc', |
Alex Deymo | 38429cf | 2015-11-11 18:27:22 -0800 | [diff] [blame] | 493 | 'metrics_utils_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 494 | 'omaha_request_action_unittest.cc', |
| 495 | 'omaha_request_params_unittest.cc', |
| 496 | 'omaha_response_handler_action_unittest.cc', |
| 497 | 'p2p_manager_unittest.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 498 | 'payload_consumer/bzip_extent_writer_unittest.cc', |
| 499 | 'payload_consumer/delta_performer_integration_test.cc', |
| 500 | 'payload_consumer/delta_performer_unittest.cc', |
| 501 | 'payload_consumer/download_action_unittest.cc', |
| 502 | 'payload_consumer/extent_writer_unittest.cc', |
| 503 | 'payload_consumer/file_writer_unittest.cc', |
| 504 | 'payload_consumer/filesystem_verifier_action_unittest.cc', |
| 505 | 'payload_consumer/postinstall_runner_action_unittest.cc', |
| 506 | 'payload_consumer/xz_extent_writer_unittest.cc', |
Alex Deymo | 1415857 | 2015-06-13 03:37:08 -0700 | [diff] [blame] | 507 | 'payload_generator/ab_generator_unittest.cc', |
Sen Jiang | 8cc502d | 2015-08-10 10:04:54 -0700 | [diff] [blame] | 508 | 'payload_generator/blob_file_writer_unittest.cc', |
Alex Deymo | f006135 | 2015-07-01 14:59:15 -0700 | [diff] [blame] | 509 | 'payload_generator/block_mapping_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 510 | 'payload_generator/cycle_breaker_unittest.cc', |
Alex Deymo | 1415857 | 2015-06-13 03:37:08 -0700 | [diff] [blame] | 511 | 'payload_generator/delta_diff_utils_unittest.cc', |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 512 | 'payload_generator/ext2_filesystem_unittest.cc', |
Alex Deymo | 1beda78 | 2015-06-07 23:01:25 +0200 | [diff] [blame] | 513 | 'payload_generator/extent_ranges_unittest.cc', |
Alex Deymo | 5c6c655 | 2015-06-03 19:06:50 +0200 | [diff] [blame] | 514 | 'payload_generator/extent_utils_unittest.cc', |
Alex Deymo | 2b19cfb | 2015-03-26 00:35:07 -0700 | [diff] [blame] | 515 | 'payload_generator/fake_filesystem.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 516 | 'payload_generator/full_update_generator_unittest.cc', |
| 517 | 'payload_generator/graph_utils_unittest.cc', |
Allie Wood | cd514b5 | 2015-02-19 13:56:07 -0800 | [diff] [blame] | 518 | 'payload_generator/inplace_generator_unittest.cc', |
Alex Deymo | 1415857 | 2015-06-13 03:37:08 -0700 | [diff] [blame] | 519 | 'payload_generator/payload_file_unittest.cc', |
Sen Jiang | 05feee0 | 2015-11-11 15:59:49 -0800 | [diff] [blame] | 520 | 'payload_generator/payload_generation_config_unittest.cc', |
Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 521 | 'payload_generator/payload_signer_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 522 | 'payload_generator/tarjan_unittest.cc', |
| 523 | 'payload_generator/topological_sort_unittest.cc', |
Alex Deymo | 0bc2611 | 2015-10-19 20:54:57 -0700 | [diff] [blame] | 524 | 'payload_generator/zip_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 525 | 'payload_state_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 526 | 'update_attempter_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 527 | 'update_manager/boxed_value_unittest.cc', |
| 528 | 'update_manager/chromeos_policy_unittest.cc', |
| 529 | 'update_manager/evaluation_context_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 530 | 'update_manager/generic_variables_unittest.cc', |
| 531 | 'update_manager/prng_unittest.cc', |
| 532 | 'update_manager/real_config_provider_unittest.cc', |
| 533 | 'update_manager/real_device_policy_provider_unittest.cc', |
| 534 | 'update_manager/real_random_provider_unittest.cc', |
| 535 | 'update_manager/real_shill_provider_unittest.cc', |
| 536 | 'update_manager/real_system_provider_unittest.cc', |
| 537 | 'update_manager/real_time_provider_unittest.cc', |
| 538 | 'update_manager/real_updater_provider_unittest.cc', |
| 539 | 'update_manager/umtest_utils.cc', |
| 540 | 'update_manager/update_manager_unittest.cc', |
| 541 | 'update_manager/variable_unittest.cc', |
Alex Deymo | 719bfff | 2014-07-11 12:12:32 -0700 | [diff] [blame] | 542 | # Main entry point for runnning tests. |
| 543 | 'testrunner.cc', |
| 544 | ], |
| 545 | }, |
| 546 | ], |
| 547 | }], |
| 548 | ], |
| 549 | } |