1// Copyright (C) 2020 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 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "packages_modules_adb_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["packages_modules_adb_license"], 22} 23 24cc_defaults { 25 name: "libadb_pairing_connection_defaults", 26 cflags: [ 27 "-Wall", 28 "-Wextra", 29 "-Wthread-safety", 30 "-Werror", 31 ], 32 33 compile_multilib: "both", 34 35 srcs: [ 36 "pairing_connection.cpp", 37 ], 38 target: { 39 android: { 40 version_script: "libadb_pairing_connection.map.txt", 41 }, 42 windows: { 43 compile_multilib: "first", 44 enabled: true, 45 }, 46 }, 47 export_include_dirs: ["include"], 48 49 visibility: [ 50 "//art:__subpackages__", 51 "//frameworks/base/services:__subpackages__", 52 "//packages/modules/adb:__subpackages__", 53 54 // This needs to be visible to minadbd, even though it's removed via exclude_shared_libs. 55 "//bootable/recovery/minadbd:__subpackages__", 56 ], 57 apex_available: [ 58 "com.android.adbd", 59 ], 60 61 // libadb_pairing_connection doesn't need an embedded build number. 62 use_version_lib: false, 63 64 stl: "libc++_static", 65 66 host_supported: true, 67 recovery_available: false, 68 69 static_libs: [ 70 "libbase", 71 "libssl", 72 ], 73 shared_libs: [ 74 "libcrypto", 75 "liblog", 76 "libadb_pairing_auth", 77 ], 78} 79 80cc_library { 81 name: "libadb_pairing_connection", 82 defaults: ["libadb_pairing_connection_defaults"], 83 84 min_sdk_version: "30", 85 apex_available: [ 86 "com.android.adbd", 87 ], 88 89 stubs: { 90 symbol_file: "libadb_pairing_connection.map.txt", 91 versions: ["30"], 92 }, 93 94 static_libs: [ 95 "libadb_protos", 96 // Statically link libadb_tls_connection because it is not 97 // ABI-stable. 98 "libadb_tls_connection", 99 "libprotobuf-cpp-lite", 100 ], 101} 102 103// For running atest (b/147158681) 104cc_library_static { 105 name: "libadb_pairing_connection_static", 106 defaults: ["libadb_pairing_connection_defaults"], 107 108 apex_available: [ 109 "//apex_available:platform", 110 ], 111 112 static_libs: [ 113 "libadb_protos_static", 114 "libprotobuf-cpp-lite", 115 "libadb_tls_connection_static", 116 ], 117} 118 119cc_defaults { 120 name: "libadb_pairing_server_defaults", 121 cflags: [ 122 "-Wall", 123 "-Wextra", 124 "-Wthread-safety", 125 "-Werror", 126 ], 127 128 compile_multilib: "both", 129 130 srcs: [ 131 "pairing_server.cpp", 132 ], 133 target: { 134 android: { 135 version_script: "libadb_pairing_server.map.txt", 136 }, 137 }, 138 export_include_dirs: ["include"], 139 140 visibility: [ 141 "//art:__subpackages__", 142 "//frameworks/base/services:__subpackages__", 143 "//packages/modules/adb:__subpackages__", 144 ], 145 146 recovery_available: false, 147 148 stl: "libc++_static", 149 150 static_libs: [ 151 "libbase", 152 ], 153 shared_libs: [ 154 "libcrypto", 155 "libcrypto_utils", 156 "libcutils", 157 "liblog", 158 "libadb_pairing_auth", 159 "libadb_pairing_connection", 160 ], 161} 162 163cc_library { 164 name: "libadb_pairing_server", 165 defaults: ["libadb_pairing_server_defaults"], 166 167 min_sdk_version: "30", 168 apex_available: [ 169 "com.android.adbd", 170 ], 171 172 stubs: { 173 symbol_file: "libadb_pairing_server.map.txt", 174 versions: ["30"], 175 }, 176 177 static_libs: [ 178 // Statically link libadb_crypto because it is not 179 // ABI-stable. 180 "libadb_crypto", 181 "libadb_protos", 182 ], 183} 184 185// For running atest (b/147158681) 186cc_library_static { 187 name: "libadb_pairing_server_static", 188 defaults: ["libadb_pairing_server_defaults"], 189 190 apex_available: [ 191 "//apex_available:platform", 192 ], 193 194 static_libs: [ 195 "libadb_crypto_static", 196 "libadb_protos_static", 197 ], 198} 199