Steven Moreland | 66ac401 | 2016-12-21 15:06:10 -0800 | [diff] [blame] | 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 | |
Steven Moreland | 8e0cc27 | 2019-02-01 14:01:01 -0800 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "hwservicemanager_defaults", |
Dan Willemsen | 376ac9b | 2016-09-13 16:32:54 -0700 | [diff] [blame] | 17 | cflags: [ |
| 18 | "-Wall", |
| 19 | "-Wextra", |
| 20 | "-Werror", |
| 21 | ], |
| 22 | shared_libs: [ |
Yifan Hong | 275a88c | 2016-11-16 14:16:32 -0800 | [diff] [blame] | 23 | "libhidlbase", |
Steven Moreland | 8e0cc27 | 2019-02-01 14:01:01 -0800 | [diff] [blame] | 24 | "liblog", |
| 25 | ], |
| 26 | } |
| 27 | |
| 28 | cc_defaults { |
| 29 | name: "libhwservicemanager_shared_libs", |
| 30 | shared_libs: [ |
| 31 | "libbase", |
Steven Moreland | 37aed80 | 2017-04-06 09:16:42 -0700 | [diff] [blame] | 32 | "libhidl-gen-utils", |
Dan Willemsen | 376ac9b | 2016-09-13 16:32:54 -0700 | [diff] [blame] | 33 | "libselinux", |
Dan Willemsen | 376ac9b | 2016-09-13 16:32:54 -0700 | [diff] [blame] | 34 | "libutils", |
Steven Moreland | 37aed80 | 2017-04-06 09:16:42 -0700 | [diff] [blame] | 35 | "libvintf", |
Steven Moreland | d83d110 | 2016-10-25 15:01:47 -0700 | [diff] [blame] | 36 | ], |
Dan Willemsen | 376ac9b | 2016-09-13 16:32:54 -0700 | [diff] [blame] | 37 | } |
Steven Moreland | 8e0cc27 | 2019-02-01 14:01:01 -0800 | [diff] [blame] | 38 | |
| 39 | cc_library_static { |
| 40 | name: "libhwservicemanager", |
Steven Moreland | a910b77 | 2019-09-25 15:30:32 -0700 | [diff] [blame] | 41 | host_supported: true, |
Steven Moreland | 8e0cc27 | 2019-02-01 14:01:01 -0800 | [diff] [blame] | 42 | 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 | |
| 54 | cc_defaults { |
| 55 | name: "libtokenmanager_shared_libs", |
| 56 | shared_libs: [ |
| 57 | "android.hidl.token@1.0", |
| 58 | "libcrypto", |
| 59 | ], |
| 60 | } |
| 61 | |
| 62 | cc_library_static { |
| 63 | name: "libtokenmanager", |
| 64 | defaults: [ |
| 65 | "hwservicemanager_defaults", |
| 66 | "libtokenmanager_shared_libs", |
| 67 | ], |
| 68 | srcs: [ |
| 69 | "TokenManager.cpp", |
| 70 | ], |
| 71 | } |
| 72 | |
| 73 | cc_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 Moreland | 501bc8e | 2019-02-01 16:21:46 -0800 | [diff] [blame] | 94 | |
| 95 | cc_test { |
| 96 | name: "hwservicemanager_test", |
Steven Moreland | a910b77 | 2019-09-25 15:30:32 -0700 | [diff] [blame] | 97 | host_supported: true, |
Steven Moreland | 501bc8e | 2019-02-01 16:21:46 -0800 | [diff] [blame] | 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 | } |