blob: 24c475cb8ca179d3567d86ffb3054e0dc1511bdd [file] [log] [blame]
Stan Rokita2e37ec442019-07-30 11:35:48 -04001//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16cc_defaults {
17 name: "android.hardware.sensors@2.0-multihal-defaults",
18 header_libs: [
19 "android.hardware.sensors@2.0-multihal.header",
20 ],
21 shared_libs: [
22 "android.hardware.sensors@1.0",
23 "android.hardware.sensors@2.0",
24 "libbase",
25 "libcutils",
26 "libfmq",
27 "libhidlbase",
28 "liblog",
29 "libpower",
30 "libutils",
31 ],
32 cflags: ["-DLOG_TAG=\"SensorsMultiHal\""],
33}
34
35cc_binary {
36 name: "android.hardware.sensors@2.0-service.multihal",
37 defaults: [
38 "hidl_defaults",
39 "android.hardware.sensors@2.0-multihal-defaults",
40 ],
41 vendor: true,
42 relative_install_path: "hw",
43 srcs: [
44 "service.cpp",
45 "HalProxy.cpp",
Stan Rokita2e37ec442019-07-30 11:35:48 -040046 ],
47 init_rc: ["android.hardware.sensors@2.0-service-multihal.rc"],
48 vintf_fragments: ["android.hardware.sensors@2.0-multihal.xml"],
Stan Rokita48201382020-02-04 09:03:42 -080049 shared_libs: ["android.hardware.sensors@2.0-ScopedWakelock"],
Stan Rokita2e37ec442019-07-30 11:35:48 -040050}
51
52cc_library_headers {
53 name: "android.hardware.sensors@2.0-multihal.header",
54 vendor_available: true,
55 export_include_dirs: ["include"],
56}
57
Stan Rokita1d53f952019-11-21 13:23:55 -080058cc_library_shared {
59 name: "android.hardware.sensors@2.0-ScopedWakelock",
60 defaults: [
61 "hidl_defaults",
62 "android.hardware.sensors@2.0-multihal-defaults",
63 ],
64 srcs: [
65 "ScopedWakelock.cpp",
66 ],
67 vendor_available: true,
68 export_header_lib_headers: [
Stan Rokita48201382020-02-04 09:03:42 -080069 "android.hardware.sensors@2.0-multihal.header",
70 ],
Stan Rokita1d53f952019-11-21 13:23:55 -080071}
72
Stan Rokita2e37ec442019-07-30 11:35:48 -040073// The below targets should only be used for testing.
74cc_test_library {
75 name: "android.hardware.sensors@2.0-HalProxy",
Stan Rokita1d53f952019-11-21 13:23:55 -080076 defaults: [
77 "hidl_defaults",
78 "android.hardware.sensors@2.0-multihal-defaults",
79 ],
Stan Rokita2e37ec442019-07-30 11:35:48 -040080 vendor_available: true,
81 srcs: [
82 "HalProxy.cpp",
Stan Rokita2e37ec442019-07-30 11:35:48 -040083 ],
84 export_header_lib_headers: [
85 "android.hardware.sensors@2.0-multihal.header",
86 ],
Stan Rokita1d53f952019-11-21 13:23:55 -080087 export_shared_lib_headers: [
Stan Rokita48201382020-02-04 09:03:42 -080088 "android.hardware.sensors@2.0-ScopedWakelock",
Stan Rokita1d53f952019-11-21 13:23:55 -080089 ],
Stan Rokita2e37ec442019-07-30 11:35:48 -040090 shared_libs: [
91 "libutils",
Stan Rokita1d53f952019-11-21 13:23:55 -080092 "android.hardware.sensors@2.0-ScopedWakelock",
Stan Rokita2e37ec442019-07-30 11:35:48 -040093 ],
94}