blob: 13d80f7a6da2c569ef08219f5940b3dd79bfb84f [file] [log] [blame]
Anthony Stangec34e6682019-08-09 11:24:17 -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",
Anthony Stangec34e6682019-08-09 11:24:17 -040018 srcs: [
Anthony Stangeaacbf942019-08-30 15:21:34 -040019 "fake_subhal/*.cpp",
Anthony Stangec34e6682019-08-09 11:24:17 -040020 ],
21 header_libs: [
Anthony Stangeaacbf942019-08-30 15:21:34 -040022 "android.hardware.sensors@2.0-multihal.header",
Anthony Stangec34e6682019-08-09 11:24:17 -040023 ],
Anthony Stangeaacbf942019-08-30 15:21:34 -040024 export_include_dirs: ["fake_subhal"],
Anthony Stangec34e6682019-08-09 11:24:17 -040025 shared_libs: [
26 "android.hardware.sensors@1.0",
27 "android.hardware.sensors@2.0",
28 "libcutils",
29 "libfmq",
30 "libhidlbase",
31 "libhidltransport",
32 "liblog",
33 "libpower",
34 "libutils",
35 ],
36}
37
38cc_library {
39 name: "android.hardware.sensors@2.0-fakesubhal-config1",
Anthony Stangeaacbf942019-08-30 15:21:34 -040040 vendor: true,
Anthony Stangec34e6682019-08-09 11:24:17 -040041 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
42 cflags: [
43 "-DSUPPORT_CONTINUOUS_SENSORS",
44 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"",
45 ],
46}
47
48cc_library {
49 name: "android.hardware.sensors@2.0-fakesubhal-config2",
Anthony Stangeaacbf942019-08-30 15:21:34 -040050 vendor: true,
Anthony Stangec34e6682019-08-09 11:24:17 -040051 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
52 cflags: [
53 "-DSUPPORT_ON_CHANGE_SENSORS",
54 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
55 ],
Anthony Stangeaacbf942019-08-30 15:21:34 -040056}
57
58cc_test_library {
59 name: "android.hardware.sensors@2.0-fakesubhal-unittest",
60 vendor_available: true,
61 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
62 cflags: [
63 "-DSUPPORT_ON_CHANGE_SENSORS",
64 "-DSUPPORT_CONTINUOUS_SENSORS",
65 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"",
66 ],
67}
68
69cc_test {
70 name: "android.hardware.sensors@2.0-halproxy-unit-tests",
71 srcs: ["HalProxy_test.cpp"],
72 vendor: true,
73 static_libs: [
74 "android.hardware.sensors@2.0-HalProxy",
75 "android.hardware.sensors@2.0-fakesubhal-unittest",
76 ],
77 shared_libs: [
78 "android.hardware.sensors@1.0",
79 "android.hardware.sensors@2.0",
80 "libcutils",
81 "libfmq",
82 "libhidlbase",
83 "libhidltransport",
84 "liblog",
85 "libpower",
86 "libutils",
87 ],
88 test_suites: ["device-tests"],
Anthony Stangec34e6682019-08-09 11:24:17 -040089}