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