blob: e7f9499db0c10425c49c0f4958704f96df741b87 [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-fakesubhal-defaults",
18 srcs: [
19 "fake_subhal/*.cpp",
20 ],
21 header_libs: [
22 "android.hardware.sensors@2.0-multihal.header",
23 ],
24 export_include_dirs: ["fake_subhal"],
25 shared_libs: [
26 "android.hardware.sensors@1.0",
27 "android.hardware.sensors@2.0",
28 "libcutils",
29 "libfmq",
30 "libhardware",
31 "libhidlbase",
32 "liblog",
33 "libpower",
34 "libutils",
35 ],
36 static_libs: [
37 "android.hardware.sensors@2.0-HalProxy",
38 ],
39 cflags: [
40 "-DLOG_TAG=\"FakeSubHal\""
41 ],
42}
43
44cc_library {
45 name: "android.hardware.sensors@2.0-fakesubhal-config1",
46 vendor: true,
47 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
48 cflags: [
49 "-DSUPPORT_CONTINUOUS_SENSORS",
50 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"",
51 ],
52}
53
54cc_library {
55 name: "android.hardware.sensors@2.0-fakesubhal-config2",
56 vendor: true,
57 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
58 cflags: [
59 "-DSUPPORT_ON_CHANGE_SENSORS",
60 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
61 ],
62}
63
64cc_test_library {
65 name: "android.hardware.sensors@2.0-fakesubhal-unittest",
66 vendor_available: true,
67 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
68 cflags: [
69 "-DSUPPORT_ON_CHANGE_SENSORS",
70 "-DSUPPORT_CONTINUOUS_SENSORS",
71 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"",
72 ],
73}
74
75cc_test {
76 name: "android.hardware.sensors@2.0-halproxy-unit-tests",
77 srcs: ["HalProxy_test.cpp"],
78 vendor: true,
79 static_libs: [
80 "android.hardware.sensors@2.0-HalProxy",
81 "android.hardware.sensors@2.0-fakesubhal-unittest",
82 ],
83 shared_libs: [
84 "android.hardware.sensors@1.0",
85 "android.hardware.sensors@2.0",
86 "libbase",
87 "libcutils",
88 "libfmq",
89 "libhardware",
90 "libhidlbase",
91 "liblog",
92 "libpower",
93 "libutils",
94 ],
95 test_suites: ["device-tests"],
96 cflags: [
97 "-DLOG_TAG=\"HalProxyUnitTests\"",
98 ],
99}