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 15package { 16 default_applicable_licenses: ["system_hwservicemanager_license"], 17} 18 19// Added automatically by a large-scale-change 20// http://go/android-license-faq 21license { 22 name: "system_hwservicemanager_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-Apache-2.0", 26 ], 27 license_text: [ 28 "NOTICE", 29 ], 30} 31 32cc_defaults { 33 name: "hwservicemanager_defaults", 34 cflags: [ 35 "-Wall", 36 "-Wextra", 37 "-Werror", 38 ], 39 shared_libs: [ 40 "libhidlbase", 41 "liblog", 42 ], 43} 44 45cc_defaults { 46 name: "libhwservicemanager_shared_libs", 47 shared_libs: [ 48 "libbase", 49 "libhidl-gen-utils", 50 "libselinux", 51 "libutils", 52 "libvintf", 53 ], 54} 55 56cc_library_static { 57 name: "libhwservicemanager", 58 host_supported: true, 59 defaults: [ 60 "hwservicemanager_defaults", 61 "libhwservicemanager_shared_libs", 62 ], 63 srcs: [ 64 "AccessControl.cpp", 65 "HidlService.cpp", 66 "ServiceManager.cpp", 67 "Vintf.cpp", 68 ], 69} 70 71cc_defaults { 72 name: "libtokenmanager_shared_libs", 73 shared_libs: [ 74 "android.hidl.token@1.0", 75 "libcrypto", 76 ], 77} 78 79cc_library_static { 80 name: "libtokenmanager", 81 defaults: [ 82 "hwservicemanager_defaults", 83 "libtokenmanager_shared_libs", 84 ], 85 srcs: [ 86 "TokenManager.cpp", 87 ], 88} 89 90cc_binary { 91 name: "hwservicemanager", 92 defaults: [ 93 "hwservicemanager_defaults", 94 "libhwservicemanager_shared_libs", 95 "libtokenmanager_shared_libs", 96 ], 97 init_rc: [ 98 "hwservicemanager.rc", 99 ], 100 srcs: [ 101 "service.cpp", 102 ], 103 shared_libs: [ 104 "libcutils", 105 ], 106 static_libs: [ 107 "libhwservicemanager", 108 "libtokenmanager", 109 ], 110} 111 112cc_test { 113 name: "hwservicemanager_test", 114 host_supported: true, 115 defaults: [ 116 "hwservicemanager_defaults", 117 "libhwservicemanager_shared_libs", 118 ], 119 static_libs: [ 120 "libgmock", 121 "libhwservicemanager", 122 ], 123 srcs: [ 124 "test_lazy.cpp", 125 ], 126 test_suites: ["device-tests"], 127} 128