GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 1 | // Copyright (C) 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "adb_defaults", |
| 17 | |
| 18 | cflags: [ |
| 19 | "-Wall", |
| 20 | "-Wextra", |
| 21 | "-Werror", |
Pirama Arumuga Nainar | 7982178 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 22 | "-Wexit-time-destructors", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 23 | "-Wno-unused-parameter", |
| 24 | "-Wno-missing-field-initializers", |
| 25 | "-Wvla", |
| 26 | ], |
Josh Gao | 6eb7882 | 2018-11-16 15:40:16 -0800 | [diff] [blame] | 27 | cpp_std: "experimental", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 28 | |
Josh Gao | c7567fa | 2018-02-27 15:49:23 -0800 | [diff] [blame] | 29 | use_version_lib: true, |
| 30 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 31 | compile_multilib: "first", |
| 32 | product_variables: { |
| 33 | debuggable: { |
| 34 | cflags: [ |
| 35 | "-DALLOW_ADBD_ROOT", |
| 36 | "-DALLOW_ADBD_DISABLE_VERITY", |
| 37 | "-DALLOW_ADBD_NO_AUTH", |
| 38 | ], |
| 39 | }, |
| 40 | }, |
| 41 | |
| 42 | target: { |
| 43 | android: { |
Josh Gao | 560a547 | 2018-10-12 16:37:31 -0700 | [diff] [blame] | 44 | cflags: [ |
| 45 | "-DADB_HOST=0", |
| 46 | "-Wthread-safety", |
| 47 | ], |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 48 | }, |
| 49 | |
| 50 | host: { |
| 51 | cflags: ["-DADB_HOST=1"], |
| 52 | }, |
| 53 | |
| 54 | darwin: { |
| 55 | host_ldlibs: [ |
| 56 | "-lpthread", |
| 57 | "-framework CoreFoundation", |
| 58 | "-framework IOKit", |
| 59 | "-lobjc", |
| 60 | ], |
| 61 | }, |
| 62 | |
| 63 | windows: { |
| 64 | cflags: [ |
| 65 | // Define windows.h and tchar.h Unicode preprocessor symbols so that |
| 66 | // CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the |
| 67 | // build if you accidentally pass char*. Fix by calling like: |
| 68 | // std::wstring path_wide; |
| 69 | // if (!android::base::UTF8ToWide(path_utf8, &path_wide)) { /* error handling */ } |
| 70 | // CreateFileW(path_wide.c_str()); |
| 71 | "-DUNICODE=1", |
| 72 | "-D_UNICODE=1", |
| 73 | |
Elliott Hughes | 3c59cb8 | 2018-12-03 09:02:18 -0800 | [diff] [blame] | 74 | // Unlike on Linux, -std=gnu++ doesn't set _GNU_SOURCE on Windows. |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 75 | "-D_GNU_SOURCE", |
Josh Gao | 2e1e789 | 2018-03-23 13:03:28 -0700 | [diff] [blame] | 76 | |
| 77 | // MinGW hides some things behind _POSIX_SOURCE. |
| 78 | "-D_POSIX_SOURCE", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 79 | ], |
Josh Gao | f8a97c1 | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 80 | |
| 81 | host_ldlibs: [ |
| 82 | "-lws2_32", |
| 83 | "-lgdi32", |
| 84 | "-luserenv", |
| 85 | ], |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 86 | }, |
Pirama Arumuga Nainar | 7982178 | 2018-06-01 11:31:38 -0700 | [diff] [blame] | 87 | |
| 88 | not_windows: { |
| 89 | cflags: [ |
| 90 | "-Wthread-safety", |
| 91 | ], |
| 92 | }, |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 93 | }, |
| 94 | } |
| 95 | |
| 96 | // libadb |
| 97 | // ========================================================= |
| 98 | // These files are compiled for both the host and the device. |
| 99 | libadb_srcs = [ |
| 100 | "adb.cpp", |
| 101 | "adb_io.cpp", |
| 102 | "adb_listeners.cpp", |
| 103 | "adb_trace.cpp", |
Josh Gao | 6e1246c | 2018-05-24 22:54:50 -0700 | [diff] [blame] | 104 | "adb_unique_fd.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 105 | "adb_utils.cpp", |
| 106 | "fdevent.cpp", |
| 107 | "services.cpp", |
| 108 | "sockets.cpp", |
| 109 | "socket_spec.cpp", |
| 110 | "sysdeps/errno.cpp", |
| 111 | "transport.cpp", |
Josh Gao | 6082e7d | 2018-04-05 16:16:04 -0700 | [diff] [blame] | 112 | "transport_fd.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 113 | "transport_local.cpp", |
| 114 | "transport_usb.cpp", |
| 115 | ] |
| 116 | |
| 117 | libadb_posix_srcs = [ |
| 118 | "sysdeps_unix.cpp", |
| 119 | "sysdeps/posix/network.cpp", |
| 120 | ] |
| 121 | |
| 122 | libadb_test_srcs = [ |
| 123 | "adb_io_test.cpp", |
| 124 | "adb_listeners_test.cpp", |
| 125 | "adb_utils_test.cpp", |
| 126 | "fdevent_test.cpp", |
| 127 | "socket_spec_test.cpp", |
| 128 | "socket_test.cpp", |
| 129 | "sysdeps_test.cpp", |
| 130 | "sysdeps/stat_test.cpp", |
| 131 | "transport_test.cpp", |
Josh Gao | 7c738cd | 2018-04-03 14:37:11 -0700 | [diff] [blame] | 132 | "types_test.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 133 | ] |
| 134 | |
| 135 | cc_library_host_static { |
| 136 | name: "libadb_host", |
| 137 | defaults: ["adb_defaults"], |
| 138 | |
| 139 | srcs: libadb_srcs + [ |
| 140 | "client/auth.cpp", |
| 141 | "client/usb_libusb.cpp", |
| 142 | "client/usb_dispatch.cpp", |
| 143 | "client/transport_mdns.cpp", |
Idries Hamadi | ed409ea | 2018-01-29 16:30:36 +0000 | [diff] [blame] | 144 | "client/fastdeploy.cpp", |
| 145 | "client/fastdeploycallbacks.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 146 | ], |
| 147 | |
Dan Willemsen | ab971b5 | 2018-08-29 14:58:02 -0700 | [diff] [blame] | 148 | generated_headers: ["platform_tools_version"], |
| 149 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 150 | target: { |
| 151 | linux: { |
| 152 | srcs: ["client/usb_linux.cpp"], |
| 153 | }, |
| 154 | darwin: { |
| 155 | srcs: ["client/usb_osx.cpp"], |
| 156 | }, |
| 157 | |
| 158 | not_windows: { |
| 159 | srcs: libadb_posix_srcs, |
| 160 | }, |
| 161 | windows: { |
| 162 | enabled: true, |
| 163 | srcs: [ |
| 164 | "client/usb_windows.cpp", |
| 165 | "sysdeps_win32.cpp", |
| 166 | "sysdeps/win32/errno.cpp", |
| 167 | "sysdeps/win32/stat.cpp", |
| 168 | ], |
| 169 | shared_libs: ["AdbWinApi"], |
| 170 | }, |
| 171 | }, |
| 172 | |
| 173 | static_libs: [ |
| 174 | "libbase", |
| 175 | "libcrypto_utils", |
| 176 | "libcrypto", |
| 177 | "libdiagnose_usb", |
| 178 | "libmdnssd", |
| 179 | "libusb", |
Idries Hamadi | 269a4b4 | 2018-09-13 18:00:25 +0100 | [diff] [blame] | 180 | "libandroidfw", |
| 181 | "libziparchive", |
| 182 | "libz", |
| 183 | "libutils", |
| 184 | "liblog", |
| 185 | "libcutils", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 186 | ], |
| 187 | } |
| 188 | |
| 189 | cc_test_host { |
| 190 | name: "adb_test", |
| 191 | defaults: ["adb_defaults"], |
| 192 | srcs: libadb_test_srcs, |
| 193 | static_libs: [ |
| 194 | "libadb_host", |
| 195 | "libbase", |
| 196 | "libcutils", |
| 197 | "libcrypto_utils", |
| 198 | "libcrypto", |
| 199 | "libmdnssd", |
| 200 | "libdiagnose_usb", |
| 201 | "libusb", |
| 202 | ], |
Josh Gao | f8a97c1 | 2018-03-23 15:37:20 -0700 | [diff] [blame] | 203 | |
| 204 | target: { |
| 205 | windows: { |
| 206 | enabled: true, |
| 207 | shared_libs: ["AdbWinApi"], |
| 208 | }, |
| 209 | }, |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 210 | } |
| 211 | |
Josh Gao | 9c59649 | 2018-04-04 11:27:24 -0700 | [diff] [blame] | 212 | cc_benchmark { |
| 213 | name: "adb_benchmark", |
| 214 | defaults: ["adb_defaults"], |
| 215 | |
| 216 | srcs: ["transport_benchmark.cpp"], |
| 217 | target: { |
| 218 | android: { |
| 219 | static_libs: [ |
| 220 | "libadbd", |
| 221 | ], |
| 222 | }, |
| 223 | host: { |
| 224 | static_libs: [ |
| 225 | "libadb_host", |
| 226 | ], |
| 227 | }, |
| 228 | }, |
| 229 | |
| 230 | static_libs: [ |
| 231 | "libbase", |
| 232 | "libcutils", |
| 233 | "libcrypto_utils", |
| 234 | "libcrypto", |
| 235 | "libdiagnose_usb", |
| 236 | "liblog", |
| 237 | "libusb", |
| 238 | ], |
| 239 | } |
| 240 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 241 | cc_binary_host { |
| 242 | name: "adb", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 243 | |
| 244 | defaults: ["adb_defaults"], |
| 245 | |
| 246 | srcs: [ |
| 247 | "client/adb_client.cpp", |
| 248 | "client/bugreport.cpp", |
| 249 | "client/commandline.cpp", |
| 250 | "client/file_sync_client.cpp", |
| 251 | "client/main.cpp", |
| 252 | "client/console.cpp", |
Idries Hamadi | ed409ea | 2018-01-29 16:30:36 +0000 | [diff] [blame] | 253 | "client/adb_install.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 254 | "client/line_printer.cpp", |
| 255 | "shell_service_protocol.cpp", |
| 256 | ], |
| 257 | |
| 258 | static_libs: [ |
| 259 | "libadb_host", |
| 260 | "libbase", |
| 261 | "libcutils", |
| 262 | "libcrypto_utils", |
| 263 | "libcrypto", |
| 264 | "libdiagnose_usb", |
| 265 | "liblog", |
| 266 | "libmdnssd", |
| 267 | "libusb", |
Idries Hamadi | 269a4b4 | 2018-09-13 18:00:25 +0100 | [diff] [blame] | 268 | "libandroidfw", |
| 269 | "libziparchive", |
| 270 | "libz", |
| 271 | "libutils", |
| 272 | "liblog", |
| 273 | "libcutils", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 274 | ], |
| 275 | |
| 276 | stl: "libc++_static", |
| 277 | |
| 278 | // Don't add anything here, we don't want additional shared dependencies |
| 279 | // on the host adb tool, and shared libraries that link against libc++ |
| 280 | // will violate ODR |
| 281 | shared_libs: [], |
| 282 | |
Idries Hamadi | 7575cd9 | 2018-08-24 11:46:45 +0100 | [diff] [blame] | 283 | required: [ |
| 284 | "deploypatchgenerator", |
| 285 | ], |
| 286 | |
Dan Willemsen | 3f439a7 | 2018-11-19 19:11:35 -0800 | [diff] [blame] | 287 | // Archive adb, adb.exe. |
| 288 | dist: { |
| 289 | targets: [ |
| 290 | "dist_files", |
| 291 | "sdk", |
| 292 | "win_sdk", |
| 293 | ], |
| 294 | }, |
| 295 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 296 | target: { |
| 297 | darwin: { |
| 298 | cflags: [ |
| 299 | "-Wno-sizeof-pointer-memaccess", |
| 300 | ], |
| 301 | }, |
| 302 | windows: { |
| 303 | enabled: true, |
| 304 | ldflags: ["-municode"], |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 305 | shared_libs: ["AdbWinApi"], |
| 306 | required: [ |
| 307 | "AdbWinUsbApi", |
| 308 | ], |
| 309 | }, |
| 310 | }, |
| 311 | } |
| 312 | |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 313 | // libadbd_core contains the common sources to build libadbd and libadbd_services. |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 314 | cc_library_static { |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 315 | name: "libadbd_core", |
| 316 | defaults: ["adb_defaults"], |
| 317 | recovery_available: true, |
| 318 | |
| 319 | // libminadbd wants both, as it's used to build native tests. |
| 320 | compile_multilib: "both", |
| 321 | |
| 322 | srcs: libadb_srcs + libadb_posix_srcs + [ |
| 323 | "daemon/auth.cpp", |
| 324 | "daemon/jdwp_service.cpp", |
Josh Gao | c51726c | 2018-10-11 16:33:05 -0700 | [diff] [blame] | 325 | "daemon/usb.cpp", |
Josh Gao | 613cbb4 | 2018-10-08 14:20:29 -0700 | [diff] [blame] | 326 | "daemon/usb_ffs.cpp", |
Josh Gao | 61e9e39 | 2018-10-08 14:42:19 -0700 | [diff] [blame] | 327 | "daemon/usb_legacy.cpp", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 328 | ], |
| 329 | |
| 330 | local_include_dirs: [ |
| 331 | "daemon/include", |
| 332 | ], |
| 333 | |
Dan Willemsen | ab971b5 | 2018-08-29 14:58:02 -0700 | [diff] [blame] | 334 | generated_headers: ["platform_tools_version"], |
| 335 | |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 336 | static_libs: [ |
| 337 | "libdiagnose_usb", |
| 338 | "libqemu_pipe", |
| 339 | ], |
| 340 | |
| 341 | shared_libs: [ |
| 342 | "libasyncio", |
| 343 | "libbase", |
| 344 | "libcrypto", |
| 345 | "libcrypto_utils", |
| 346 | "libcutils", |
| 347 | "liblog", |
| 348 | ], |
| 349 | } |
| 350 | |
| 351 | cc_library { |
| 352 | name: "libadbd_services", |
| 353 | defaults: ["adb_defaults"], |
| 354 | recovery_available: true, |
| 355 | compile_multilib: "both", |
| 356 | |
| 357 | srcs: [ |
Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame^] | 358 | "daemon/abb_service.cpp", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 359 | "daemon/file_sync_service.cpp", |
| 360 | "daemon/framebuffer_service.cpp", |
| 361 | "daemon/mdns.cpp", |
| 362 | "daemon/remount_service.cpp", |
| 363 | "daemon/services.cpp", |
| 364 | "daemon/set_verity_enable_state_service.cpp", |
| 365 | "daemon/shell_service.cpp", |
| 366 | "shell_service_protocol.cpp", |
| 367 | ], |
| 368 | |
| 369 | cflags: [ |
| 370 | "-D_GNU_SOURCE", |
| 371 | "-Wno-deprecated-declarations", |
| 372 | ], |
| 373 | |
| 374 | static_libs: [ |
| 375 | "libadbd_core", |
| 376 | "libavb_user", |
| 377 | "libdiagnose_usb", |
| 378 | "libqemu_pipe", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 379 | ], |
| 380 | |
| 381 | shared_libs: [ |
| 382 | "libasyncio", |
| 383 | "libbase", |
| 384 | "libbootloader_message", |
| 385 | "libcrypto", |
| 386 | "libcrypto_utils", |
| 387 | "libcutils", |
| 388 | "libext4_utils", |
| 389 | "libfec", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 390 | "libfs_mgr", |
| 391 | "liblog", |
| 392 | "libmdnssd", |
Peter Collingbourne | fc03737 | 2018-09-13 14:20:28 -0700 | [diff] [blame] | 393 | "libselinux", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 394 | ], |
Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame^] | 395 | |
| 396 | target: { |
| 397 | recovery: { |
| 398 | exclude_srcs: [ |
| 399 | "daemon/abb_service.cpp", |
| 400 | ], |
| 401 | }, |
| 402 | }, |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 403 | } |
| 404 | |
| 405 | cc_library { |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 406 | name: "libadbd", |
| 407 | defaults: ["adb_defaults"], |
Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 408 | recovery_available: true, |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 409 | |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 410 | // Avoid getting duplicate symbol of android::build::GetBuildNumber(). |
| 411 | use_version_lib: false, |
| 412 | |
| 413 | // libminadbd wants both, as it's used to build native tests. |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 414 | compile_multilib: "both", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 415 | |
| 416 | // libadbd doesn't build any additional source, but to expose libadbd_core as a shared library. |
| 417 | whole_static_libs: [ |
| 418 | "libadbd_core", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 419 | ], |
| 420 | |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 421 | shared_libs: [ |
| 422 | "libadbd_services", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 423 | "libasyncio", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 424 | "libbase", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 425 | "libcrypto", |
| 426 | "libcrypto_utils", |
| 427 | "libcutils", |
| 428 | "liblog", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 429 | ], |
Jerry Zhang | b156c60 | 2018-05-07 15:14:47 -0700 | [diff] [blame] | 430 | |
| 431 | export_include_dirs: [ |
| 432 | "daemon/include", |
| 433 | ], |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 434 | } |
| 435 | |
| 436 | cc_binary { |
| 437 | name: "adbd", |
| 438 | defaults: ["adb_defaults"], |
Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 439 | recovery_available: true, |
Josh Gao | 8db99f8 | 2018-03-06 12:57:27 -0800 | [diff] [blame] | 440 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 441 | srcs: [ |
| 442 | "daemon/main.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 443 | ], |
| 444 | |
| 445 | cflags: [ |
| 446 | "-D_GNU_SOURCE", |
| 447 | "-Wno-deprecated-declarations", |
| 448 | ], |
| 449 | |
| 450 | strip: { |
| 451 | keep_symbols: true, |
| 452 | }, |
| 453 | |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 454 | shared_libs: [ |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 455 | "libadbd", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 456 | "libadbd_services", |
| 457 | "libbase", |
| 458 | "libcap", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 459 | "libcrypto", |
Tao Bao | eca59ae | 2018-07-30 20:45:27 -0700 | [diff] [blame] | 460 | "libcutils", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 461 | "liblog", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 462 | "libminijail", |
| 463 | "libselinux", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 464 | ], |
| 465 | } |
| 466 | |
Alex Buynytskyy | 640407d | 2018-12-12 10:48:50 -0800 | [diff] [blame^] | 467 | cc_binary { |
| 468 | name: "abb", |
| 469 | |
| 470 | defaults: ["adb_defaults"], |
| 471 | recovery_available: false, |
| 472 | |
| 473 | srcs: [ |
| 474 | "daemon/abb.cpp", |
| 475 | ], |
| 476 | |
| 477 | cflags: [ |
| 478 | "-D_GNU_SOURCE", |
| 479 | "-Wno-deprecated-declarations", |
| 480 | ], |
| 481 | |
| 482 | strip: { |
| 483 | keep_symbols: true, |
| 484 | }, |
| 485 | |
| 486 | static_libs: [ |
| 487 | "libadbd_core", |
| 488 | "libadbd_services", |
| 489 | "libcmd", |
| 490 | ], |
| 491 | |
| 492 | shared_libs: [ |
| 493 | "libbase", |
| 494 | "libbinder", |
| 495 | "liblog", |
| 496 | "libutils", |
| 497 | "libselinux", |
| 498 | ], |
| 499 | } |
| 500 | |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 501 | cc_test { |
| 502 | name: "adbd_test", |
| 503 | defaults: ["adb_defaults"], |
| 504 | srcs: libadb_test_srcs + [ |
Josh Gao | 997cfac | 2018-07-25 18:15:52 -0700 | [diff] [blame] | 505 | "daemon/services.cpp", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 506 | "daemon/shell_service.cpp", |
| 507 | "daemon/shell_service_test.cpp", |
| 508 | "shell_service_protocol.cpp", |
| 509 | "shell_service_protocol_test.cpp", |
| 510 | ], |
| 511 | |
| 512 | static_libs: [ |
| 513 | "libadbd", |
| 514 | "libbase", |
Josh Gao | 997cfac | 2018-07-25 18:15:52 -0700 | [diff] [blame] | 515 | "libbootloader_message", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 516 | "libcutils", |
| 517 | "libcrypto_utils", |
| 518 | "libcrypto", |
| 519 | "libdiagnose_usb", |
| 520 | "liblog", |
| 521 | "libusb", |
| 522 | "libmdnssd", |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 523 | "libselinux", |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 524 | ], |
Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 525 | test_suites: ["device-tests"], |
Josh Gao | 2776845 | 2018-01-02 12:01:43 -0800 | [diff] [blame] | 526 | } |
| 527 | |
Julien Desprez | 75fea7e | 2018-08-08 12:08:50 -0700 | [diff] [blame] | 528 | python_test_host { |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 529 | name: "adb_integration_test_adb", |
| 530 | main: "test_adb.py", |
| 531 | srcs: [ |
| 532 | "test_adb.py", |
| 533 | ], |
Julien Desprez | 75fea7e | 2018-08-08 12:08:50 -0700 | [diff] [blame] | 534 | test_config: "adb_integration_test_adb.xml", |
| 535 | test_suites: ["general-tests"], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 536 | version: { |
| 537 | py2: { |
Josh Gao | 9b6522b | 2018-08-07 14:31:17 -0700 | [diff] [blame] | 538 | enabled: false, |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 539 | }, |
| 540 | py3: { |
Josh Gao | 9b6522b | 2018-08-07 14:31:17 -0700 | [diff] [blame] | 541 | enabled: true, |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 542 | }, |
GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 543 | }, |
GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 544 | } |
| 545 | |
Julien Desprez | 618f0e1 | 2018-10-12 13:48:14 -0700 | [diff] [blame] | 546 | python_test_host { |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 547 | name: "adb_integration_test_device", |
| 548 | main: "test_device.py", |
| 549 | srcs: [ |
| 550 | "test_device.py", |
| 551 | ], |
| 552 | libs: [ |
| 553 | "adb_py", |
| 554 | ], |
Julien Desprez | 618f0e1 | 2018-10-12 13:48:14 -0700 | [diff] [blame] | 555 | test_config: "adb_integration_test_device.xml", |
| 556 | test_suites: ["general-tests"], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 557 | version: { |
| 558 | py2: { |
| 559 | enabled: true, |
| 560 | }, |
| 561 | py3: { |
| 562 | enabled: false, |
| 563 | }, |
GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 564 | }, |
GuangHui Liu | 41bda34 | 2017-05-10 14:37:17 -0700 | [diff] [blame] | 565 | } |