blob: 0717125990d162d570c66cb20838808b315b0c56 [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",
43 ],
44
45 srcs: [
46 "fuse_adb_provider.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080047 "minadbd_services.cpp",
48 ],
49
xunchang311e6ca2019-03-22 08:54:35 -070050 static_libs: [
51 "libotautil",
52 ],
53
Tao Bao7d2a63a2018-08-13 11:15:29 -070054 shared_libs: [
55 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -080056 "libbase",
57 "libcrypto",
Tao Bao7d2a63a2018-08-13 11:15:29 -070058 "libfusesideload",
Tao Bao8c7761e2017-11-15 11:45:23 -080059 ],
60}
61
xunchang34690ce2019-04-05 16:16:07 -070062cc_library_headers {
63 name: "libminadbd_headers",
64 recovery_available: true,
xunchang34690ce2019-04-05 16:16:07 -070065 export_include_dirs: [
Tao Bao3305d482019-09-26 00:02:29 -070066 "include",
67 ],
68 // adb_install.cpp
69 visibility: [
70 "//bootable/recovery/install",
xunchang34690ce2019-04-05 16:16:07 -070071 ],
72}
73
74cc_binary {
75 name: "minadbd",
76 recovery: true,
77
78 defaults: [
79 "minadbd_defaults",
80 ],
81
82 srcs: [
83 "minadbd.cpp",
84 ],
85
86 shared_libs: [
87 "libadbd",
88 "libbase",
89 "libcrypto",
xunchang34690ce2019-04-05 16:16:07 -070090 "libminadbd_services",
91 ],
92}
93
Tao Bao8c7761e2017-11-15 11:45:23 -080094cc_test {
95 name: "minadbd_test",
Christopher Ferris272467d2018-08-22 19:38:49 -070096 isolated: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080097
98 defaults: [
99 "minadbd_defaults",
100 ],
101
102 srcs: [
103 "fuse_adb_provider_test.cpp",
xunchang9c04eb42019-04-17 14:43:58 -0700104 "minadbd_services_test.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -0800105 ],
106
107 static_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700108 "libminadbd_services",
xunchangea2912f2019-03-17 16:45:12 -0700109 "libfusesideload",
xunchang311e6ca2019-03-22 08:54:35 -0700110 "libotautil",
Tao Bao7d2a63a2018-08-13 11:15:29 -0700111 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -0800112 ],
113
114 shared_libs: [
115 "libbase",
Pete Bentley189d4242019-09-12 19:53:46 +0100116 "libcrypto",
Tao Bao8c7761e2017-11-15 11:45:23 -0800117 "libcutils",
118 "liblog",
119 ],
120
121 test_suites: [
122 "device-tests",
123 ],
124}