blob: 01588d2795ce2f32e756e20bf0fba5258ed7f4df [file] [log] [blame]
Steven Moreland66ac4012016-12-21 15:06:10 -08001// Copyright (C) 2016 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
Steven Moreland8e0cc272019-02-01 14:01:01 -080015cc_defaults {
16 name: "hwservicemanager_defaults",
Dan Willemsen376ac9b2016-09-13 16:32:54 -070017 cflags: [
18 "-Wall",
19 "-Wextra",
20 "-Werror",
21 ],
22 shared_libs: [
Yifan Hong275a88c2016-11-16 14:16:32 -080023 "libhidlbase",
Steven Moreland8e0cc272019-02-01 14:01:01 -080024 "liblog",
25 ],
26}
27
28cc_defaults {
29 name: "libhwservicemanager_shared_libs",
30 shared_libs: [
31 "libbase",
Steven Moreland37aed802017-04-06 09:16:42 -070032 "libhidl-gen-utils",
Dan Willemsen376ac9b2016-09-13 16:32:54 -070033 "libselinux",
Dan Willemsen376ac9b2016-09-13 16:32:54 -070034 "libutils",
Steven Moreland37aed802017-04-06 09:16:42 -070035 "libvintf",
Steven Morelandd83d1102016-10-25 15:01:47 -070036 ],
Dan Willemsen376ac9b2016-09-13 16:32:54 -070037}
Steven Moreland8e0cc272019-02-01 14:01:01 -080038
39cc_library_static {
40 name: "libhwservicemanager",
Steven Morelanda910b772019-09-25 15:30:32 -070041 host_supported: true,
Steven Moreland8e0cc272019-02-01 14:01:01 -080042 defaults: [
43 "hwservicemanager_defaults",
44 "libhwservicemanager_shared_libs",
45 ],
46 srcs: [
47 "AccessControl.cpp",
48 "HidlService.cpp",
49 "ServiceManager.cpp",
50 "Vintf.cpp",
51 ],
52}
53
54cc_defaults {
55 name: "libtokenmanager_shared_libs",
56 shared_libs: [
57 "android.hidl.token@1.0",
58 "libcrypto",
59 ],
60}
61
62cc_library_static {
63 name: "libtokenmanager",
64 defaults: [
65 "hwservicemanager_defaults",
66 "libtokenmanager_shared_libs",
67 ],
68 srcs: [
69 "TokenManager.cpp",
70 ],
71}
72
73cc_binary {
74 name: "hwservicemanager",
75 defaults: [
76 "hwservicemanager_defaults",
77 "libhwservicemanager_shared_libs",
78 "libtokenmanager_shared_libs",
79 ],
80 init_rc: [
81 "hwservicemanager.rc",
82 ],
83 srcs: [
84 "service.cpp",
85 ],
86 shared_libs: [
87 "libcutils",
88 ],
89 static_libs: [
90 "libhwservicemanager",
91 "libtokenmanager",
92 ],
93}
Steven Moreland501bc8e2019-02-01 16:21:46 -080094
95cc_test {
96 name: "hwservicemanager_test",
Steven Morelanda910b772019-09-25 15:30:32 -070097 host_supported: true,
Steven Moreland501bc8e2019-02-01 16:21:46 -080098 defaults: [
99 "hwservicemanager_defaults",
100 "libhwservicemanager_shared_libs",
101 ],
102 static_libs: [
103 "libgmock",
104 "libhwservicemanager",
105 ],
106 srcs: [
107 "test_lazy.cpp",
108 ],
109 test_suites: ["device-tests"],
110}