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 15cc_defaults { 16 name: "minadbd_defaults", 17 18 cflags: [ 19 "-DADB_HOST=0", 20 "-Wall", 21 "-Werror", 22 ], 23 24 cpp_std: "experimental", 25 26 include_dirs: [ 27 "system/core/adb", 28 ], 29 30 header_libs: [ 31 "libminadbd_headers", 32 ], 33} 34 35// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing 36// the sideload service only. 37cc_library_static { 38 name: "libminadbd_services", 39 recovery_available: true, 40 41 defaults: [ 42 "minadbd_defaults", 43 "librecovery_utils_defaults", 44 ], 45 46 srcs: [ 47 "fuse_adb_provider.cpp", 48 "minadbd_services.cpp", 49 ], 50 51 static_libs: [ 52 "librecovery_utils", 53 "libotautil", 54 ], 55 56 shared_libs: [ 57 "libadbd", 58 "libbase", 59 "libcrypto", 60 "libfusesideload", 61 ], 62} 63 64cc_library_headers { 65 name: "libminadbd_headers", 66 recovery_available: true, 67 export_include_dirs: [ 68 "include", 69 ], 70 // adb_install.cpp 71 visibility: [ 72 "//bootable/recovery/install", 73 ], 74} 75 76cc_binary { 77 name: "minadbd", 78 recovery: true, 79 80 defaults: [ 81 "minadbd_defaults", 82 "libadbd_binary_dependencies", 83 "librecovery_utils_defaults", 84 ], 85 86 srcs: [ 87 "minadbd.cpp", 88 ], 89 90 shared_libs: [ 91 "libbase", 92 "libcrypto", 93 ], 94 95 static_libs: [ 96 "libminadbd_services", 97 "libfusesideload", 98 "librecovery_utils", 99 ], 100 101 required: [ 102 "adbd_system_api_recovery", 103 ] 104} 105 106cc_test { 107 name: "minadbd_test", 108 isolated: true, 109 110 defaults: [ 111 "minadbd_defaults", 112 "librecovery_utils_defaults", 113 "libadbd_binary_dependencies", 114 ], 115 116 srcs: [ 117 "fuse_adb_provider_test.cpp", 118 "minadbd_services_test.cpp", 119 ], 120 121 static_libs: [ 122 "libminadbd_services", 123 "libfusesideload", 124 "librecovery_utils", 125 "libotautil", 126 ], 127 128 shared_libs: [ 129 "libbase", 130 "libcrypto", 131 "libcutils", 132 "liblog", 133 ], 134 135 test_suites: [ 136 "device-tests", 137 ], 138} 139