Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 1 | // Copyright (C) 2018 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 | |
| 15 | cc_defaults { |
| 16 | name: "minadbd_defaults", |
| 17 | |
| 18 | cflags: [ |
| 19 | "-DADB_HOST=0", |
| 20 | "-Wall", |
| 21 | "-Werror", |
| 22 | ], |
| 23 | |
Tao Bao | 5de19e2 | 2019-01-02 09:35:59 -0800 | [diff] [blame] | 24 | cpp_std: "experimental", |
| 25 | |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 26 | include_dirs: [ |
Baligh Uddin | 1503248 | 2020-10-23 22:46:09 +0000 | [diff] [blame^] | 27 | "packages/modules/adb", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 28 | ], |
Tao Bao | 3305d48 | 2019-09-26 00:02:29 -0700 | [diff] [blame] | 29 | |
| 30 | header_libs: [ |
| 31 | "libminadbd_headers", |
| 32 | ], |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 33 | } |
| 34 | |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 35 | // `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing |
| 36 | // the sideload service only. |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 37 | cc_library_static { |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 38 | name: "libminadbd_services", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 39 | recovery_available: true, |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 40 | |
| 41 | defaults: [ |
| 42 | "minadbd_defaults", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 43 | "librecovery_utils_defaults", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 44 | ], |
| 45 | |
| 46 | srcs: [ |
| 47 | "fuse_adb_provider.cpp", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 48 | "minadbd_services.cpp", |
| 49 | ], |
| 50 | |
xunchang | 311e6ca | 2019-03-22 08:54:35 -0700 | [diff] [blame] | 51 | static_libs: [ |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 52 | "librecovery_utils", |
xunchang | 311e6ca | 2019-03-22 08:54:35 -0700 | [diff] [blame] | 53 | "libotautil", |
| 54 | ], |
| 55 | |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 56 | shared_libs: [ |
| 57 | "libadbd", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 58 | "libbase", |
| 59 | "libcrypto", |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 60 | "libfusesideload", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 61 | ], |
| 62 | } |
| 63 | |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 64 | cc_library_headers { |
| 65 | name: "libminadbd_headers", |
| 66 | recovery_available: true, |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 67 | export_include_dirs: [ |
Tao Bao | 3305d48 | 2019-09-26 00:02:29 -0700 | [diff] [blame] | 68 | "include", |
| 69 | ], |
| 70 | // adb_install.cpp |
| 71 | visibility: [ |
| 72 | "//bootable/recovery/install", |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 73 | ], |
| 74 | } |
| 75 | |
| 76 | cc_binary { |
| 77 | name: "minadbd", |
| 78 | recovery: true, |
| 79 | |
| 80 | defaults: [ |
| 81 | "minadbd_defaults", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 82 | "libadbd_binary_dependencies", |
| 83 | "librecovery_utils_defaults", |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 84 | ], |
| 85 | |
| 86 | srcs: [ |
| 87 | "minadbd.cpp", |
| 88 | ], |
| 89 | |
| 90 | shared_libs: [ |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 91 | "libbase", |
| 92 | "libcrypto", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 93 | ], |
| 94 | |
| 95 | static_libs: [ |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 96 | "libminadbd_services", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 97 | "libfusesideload", |
| 98 | "librecovery_utils", |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 99 | ], |
Josh Gao | a91e456 | 2019-10-22 16:10:48 -0700 | [diff] [blame] | 100 | |
| 101 | required: [ |
Josh Gao | 4473e16 | 2020-06-01 18:58:57 -0700 | [diff] [blame] | 102 | "adbd_system_api_recovery", |
Josh Gao | a91e456 | 2019-10-22 16:10:48 -0700 | [diff] [blame] | 103 | ] |
xunchang | 34690ce | 2019-04-05 16:16:07 -0700 | [diff] [blame] | 104 | } |
| 105 | |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 106 | cc_test { |
| 107 | name: "minadbd_test", |
Christopher Ferris | 272467d | 2018-08-22 19:38:49 -0700 | [diff] [blame] | 108 | isolated: true, |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 109 | |
| 110 | defaults: [ |
| 111 | "minadbd_defaults", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 112 | "librecovery_utils_defaults", |
Josh Gao | 22beef1 | 2020-03-27 20:37:07 -0700 | [diff] [blame] | 113 | "libadbd_binary_dependencies", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 114 | ], |
| 115 | |
| 116 | srcs: [ |
| 117 | "fuse_adb_provider_test.cpp", |
xunchang | 9c04eb4 | 2019-04-17 14:43:58 -0700 | [diff] [blame] | 118 | "minadbd_services_test.cpp", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 119 | ], |
| 120 | |
| 121 | static_libs: [ |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 122 | "libminadbd_services", |
xunchang | ea2912f | 2019-03-17 16:45:12 -0700 | [diff] [blame] | 123 | "libfusesideload", |
Tao Bao | b548bea | 2019-09-30 16:16:07 -0700 | [diff] [blame] | 124 | "librecovery_utils", |
xunchang | 311e6ca | 2019-03-22 08:54:35 -0700 | [diff] [blame] | 125 | "libotautil", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 126 | ], |
| 127 | |
| 128 | shared_libs: [ |
| 129 | "libbase", |
Pete Bentley | 189d424 | 2019-09-12 19:53:46 +0100 | [diff] [blame] | 130 | "libcrypto", |
Tao Bao | 8c7761e | 2017-11-15 11:45:23 -0800 | [diff] [blame] | 131 | "libcutils", |
| 132 | "liblog", |
| 133 | ], |
| 134 | |
| 135 | test_suites: [ |
| 136 | "device-tests", |
| 137 | ], |
| 138 | } |