• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
15cc_defaults {
16    name: "hwservicemanager_defaults",
17    cflags: [
18        "-Wall",
19        "-Wextra",
20        "-Werror",
21    ],
22    shared_libs: [
23        "libhidlbase",
24        "libhidltransport",
25        "liblog",
26    ],
27}
28
29cc_defaults {
30    name: "libhwservicemanager_shared_libs",
31    shared_libs: [
32        "libbase",
33        "libhidl-gen-utils",
34        "libhwbinder",
35        "libselinux",
36        "libutils",
37        "libvintf",
38    ],
39}
40
41cc_library_static {
42    name: "libhwservicemanager",
43    defaults: [
44        "hwservicemanager_defaults",
45        "libhwservicemanager_shared_libs",
46    ],
47    srcs: [
48        "AccessControl.cpp",
49        "HidlService.cpp",
50        "ServiceManager.cpp",
51        "Vintf.cpp",
52    ],
53}
54
55cc_defaults {
56    name: "libtokenmanager_shared_libs",
57    shared_libs: [
58        "android.hidl.token@1.0",
59        "libcrypto",
60    ],
61}
62
63cc_library_static {
64    name: "libtokenmanager",
65    defaults: [
66        "hwservicemanager_defaults",
67        "libtokenmanager_shared_libs",
68    ],
69    srcs: [
70        "TokenManager.cpp",
71    ],
72}
73
74cc_binary {
75    name: "hwservicemanager",
76    defaults: [
77        "hwservicemanager_defaults",
78        "libhwservicemanager_shared_libs",
79        "libtokenmanager_shared_libs",
80    ],
81    init_rc: [
82        "hwservicemanager.rc",
83    ],
84    srcs: [
85        "service.cpp",
86    ],
87    shared_libs: [
88        "libcutils",
89    ],
90    static_libs: [
91        "libhwservicemanager",
92        "libtokenmanager",
93    ],
94}
95
96cc_test {
97    name: "hwservicemanager_test",
98    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}
111