blob: 805d12af373e8dbd9473e8134439d5212804742a [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 ],
29}
30
Tao Bao7d2a63a2018-08-13 11:15:29 -070031// `libminadbd_services` is analogous to the `libadbd_services` for regular `adbd`, but providing
32// the sideload service only.
33cc_library {
34 name: "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -070035 recovery_available: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080036
37 defaults: [
38 "minadbd_defaults",
39 ],
40
41 srcs: [
42 "fuse_adb_provider.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080043 "minadbd_services.cpp",
44 ],
45
xunchang311e6ca2019-03-22 08:54:35 -070046 static_libs: [
47 "libotautil",
48 ],
49
Tao Bao7d2a63a2018-08-13 11:15:29 -070050 shared_libs: [
51 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -080052 "libbase",
53 "libcrypto",
Tao Bao7d2a63a2018-08-13 11:15:29 -070054 "libfusesideload",
Tao Bao8c7761e2017-11-15 11:45:23 -080055 ],
56}
57
xunchang34690ce2019-04-05 16:16:07 -070058cc_library_headers {
59 name: "libminadbd_headers",
60 recovery_available: true,
61 // TODO create a include dir
62 export_include_dirs: [
63 ".",
64 ],
65}
66
67cc_binary {
68 name: "minadbd",
69 recovery: true,
70
71 defaults: [
72 "minadbd_defaults",
73 ],
74
75 srcs: [
76 "minadbd.cpp",
77 ],
78
79 shared_libs: [
80 "libadbd",
81 "libbase",
82 "libcrypto",
xunchang34690ce2019-04-05 16:16:07 -070083 "libminadbd_services",
84 ],
85}
86
Tao Bao8c7761e2017-11-15 11:45:23 -080087cc_test {
88 name: "minadbd_test",
Christopher Ferris272467d2018-08-22 19:38:49 -070089 isolated: true,
Tao Bao8c7761e2017-11-15 11:45:23 -080090
91 defaults: [
92 "minadbd_defaults",
93 ],
94
95 srcs: [
96 "fuse_adb_provider_test.cpp",
xunchang9c04eb42019-04-17 14:43:58 -070097 "minadbd_services_test.cpp",
Tao Bao8c7761e2017-11-15 11:45:23 -080098 ],
99
100 static_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700101 "libminadbd_services",
xunchangea2912f2019-03-17 16:45:12 -0700102 "libfusesideload",
xunchang311e6ca2019-03-22 08:54:35 -0700103 "libotautil",
Tao Bao7d2a63a2018-08-13 11:15:29 -0700104 "libadbd",
Tao Bao8c7761e2017-11-15 11:45:23 -0800105 ],
106
107 shared_libs: [
108 "libbase",
Pete Bentley189d4242019-09-12 19:53:46 +0100109 "libcrypto",
Tao Bao8c7761e2017-11-15 11:45:23 -0800110 "libcutils",
111 "liblog",
112 ],
113
114 test_suites: [
115 "device-tests",
116 ],
117}