blob: c39c73443167449dabaec9f1e45aa02fb76a6789 [file] [log] [blame]
Tao Bao8c7761e2017-11-15 11:45:23 -08001// 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
Tao Bao5de19e22019-01-02 09:35:59 -080024 cpp_std: "experimental",
25
Tao Bao8c7761e2017-11-15 11:45:23 -080026 include_dirs: [
Tao Bao8c7761e2017-11-15 11:45:23 -080027 "system/core/adb",
28 ],
Tao Bao3305d482019-09-26 00:02:29 -070029
30 header_libs: [
31 "libminadbd_headers",
32 ],
Tao Bao8c7761e2017-11-15 11:45:23 -080033}
34
Tao Bao7d2a63a2018-08-13 11:15:29 -070035// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
36// the sideload service only.
37cc_library {
38 name: "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -070039 recovery_available: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080040
41 defaults: [
42 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -070043 "librecovery_utils_defaults",
Tao Bao8c7761e2017-11-15 11:45:23 -080044 ],
45
46 srcs: [
47 "fuse_adb_provider.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080048 "minadbd_services.cpp",
49 ],
50
xunchang311e6ca2019-03-22 08:54:35 -070051 static_libs: [
Tao Baob548bea2019-09-30 16:16:07 -070052 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -070053 "libotautil",
54 ],
55
Tao Bao7d2a63a2018-08-13 11:15:29 -070056 shared_libs: [
57 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -080058 "libbase",
59 "libcrypto",
Tao Bao7d2a63a2018-08-13 11:15:29 -070060 "libfusesideload",
Tao Bao8c7761e2017-11-15 11:45:23 -080061 ],
62}
63
xunchang34690ce2019-04-05 16:16:07 -070064cc_library_headers {
65 name: "libminadbd_headers",
66 recovery_available: true,
xunchang34690ce2019-04-05 16:16:07 -070067 export_include_dirs: [
Tao Bao3305d482019-09-26 00:02:29 -070068 "include",
69 ],
70 // adb_install.cpp
71 visibility: [
72 "//bootable/recovery/install",
xunchang34690ce2019-04-05 16:16:07 -070073 ],
74}
75
76cc_binary {
77 name: "minadbd",
78 recovery: true,
79
80 defaults: [
81 "minadbd_defaults",
82 ],
83
84 srcs: [
85 "minadbd.cpp",
86 ],
87
88 shared_libs: [
89 "libadbd",
90 "libbase",
91 "libcrypto",
xunchang34690ce2019-04-05 16:16:07 -070092 "libminadbd_services",
93 ],
Josh Gaoa91e4562019-10-22 16:10:48 -070094
95 required: [
96 "adbd_system_binaries_recovery",
97 ]
xunchang34690ce2019-04-05 16:16:07 -070098}
99
Tao Bao8c7761e2017-11-15 11:45:23 -0800100cc_test {
101 name: "minadbd_test",
Christopher Ferris272467d2018-08-22 19:38:49 -0700102 isolated: true,
Tao Bao8c7761e2017-11-15 11:45:23 -0800103
104 defaults: [
105 "minadbd_defaults",
Tao Baob548bea2019-09-30 16:16:07 -0700106 "librecovery_utils_defaults",
Tao Bao8c7761e2017-11-15 11:45:23 -0800107 ],
108
109 srcs: [
110 "fuse_adb_provider_test.cpp",
xunchang9c04eb42019-04-17 14:43:58 -0700111 "minadbd_services_test.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -0800112 ],
113
114 static_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700115 "libminadbd_services",
xunchangea2912f2019-03-17 16:45:12 -0700116 "libfusesideload",
Tao Baob548bea2019-09-30 16:16:07 -0700117 "librecovery_utils",
xunchang311e6ca2019-03-22 08:54:35 -0700118 "libotautil",
Tao Bao7d2a63a2018-08-13 11:15:29 -0700119 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -0800120 ],
121
122 shared_libs: [
123 "libbase",
Pete Bentley189d4242019-09-12 19:53:46 +0100124 "libcrypto",
Tao Bao8c7761e2017-11-15 11:45:23 -0800125 "libcutils",
126 "liblog",
127 ],
128
129 test_suites: [
130 "device-tests",
131 ],
132}