blob: 16373122740c1f75fae36418e6b10475e35297e4 [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",
Stan Rokita1d53f952019-11-21 13:23:55 -080028 "android.hardware.sensors@2.0-ScopedWakelock",
Stan Rokita2e37ec442019-07-30 11:35:48 -040029 "libcutils",
30 "libfmq",
31 "libhardware",
32 "libhidlbase",
33 "liblog",
34 "libpower",
35 "libutils",
36 ],
37 static_libs: [
38 "android.hardware.sensors@2.0-HalProxy",
39 ],
40 cflags: [
41 "-DLOG_TAG=\"FakeSubHal\""
42 ],
43}
44
45cc_library {
46 name: "android.hardware.sensors@2.0-fakesubhal-config1",
47 vendor: true,
48 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
49 cflags: [
50 "-DSUPPORT_CONTINUOUS_SENSORS",
51 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"",
52 ],
53}
54
55cc_library {
56 name: "android.hardware.sensors@2.0-fakesubhal-config2",
57 vendor: true,
58 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
59 cflags: [
60 "-DSUPPORT_ON_CHANGE_SENSORS",
61 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
62 ],
63}
64
65cc_test_library {
66 name: "android.hardware.sensors@2.0-fakesubhal-unittest",
67 vendor_available: true,
68 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
69 cflags: [
70 "-DSUPPORT_ON_CHANGE_SENSORS",
71 "-DSUPPORT_CONTINUOUS_SENSORS",
72 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"",
73 ],
74}
75
76cc_test {
77 name: "android.hardware.sensors@2.0-halproxy-unit-tests",
78 srcs: ["HalProxy_test.cpp"],
79 vendor: true,
80 static_libs: [
81 "android.hardware.sensors@2.0-HalProxy",
82 "android.hardware.sensors@2.0-fakesubhal-unittest",
83 ],
84 shared_libs: [
85 "android.hardware.sensors@1.0",
86 "android.hardware.sensors@2.0",
Stan Rokita1d53f952019-11-21 13:23:55 -080087 "android.hardware.sensors@2.0-ScopedWakelock",
Stan Rokita2e37ec442019-07-30 11:35:48 -040088 "libbase",
89 "libcutils",
90 "libfmq",
91 "libhardware",
92 "libhidlbase",
93 "liblog",
94 "libpower",
95 "libutils",
96 ],
97 test_suites: ["device-tests"],
98 cflags: [
99 "-DLOG_TAG=\"HalProxyUnitTests\"",
100 ],
101}