blob: ab260a47dc9967f8c713d8185014e8749c1e92d3 [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 ],
Stan Rokitad0cd57d2019-09-17 15:52:51 -070036 static_libs: [
37 "android.hardware.sensors@2.0-HalProxy",
38 ],
Anthony Stangec34e6682019-08-09 11:24:17 -040039}
40
41cc_library {
42 name: "android.hardware.sensors@2.0-fakesubhal-config1",
Anthony Stangeaacbf942019-08-30 15:21:34 -040043 vendor: true,
Anthony Stangec34e6682019-08-09 11:24:17 -040044 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
45 cflags: [
46 "-DSUPPORT_CONTINUOUS_SENSORS",
47 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"",
48 ],
49}
50
51cc_library {
52 name: "android.hardware.sensors@2.0-fakesubhal-config2",
Anthony Stangeaacbf942019-08-30 15:21:34 -040053 vendor: true,
Anthony Stangec34e6682019-08-09 11:24:17 -040054 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
55 cflags: [
56 "-DSUPPORT_ON_CHANGE_SENSORS",
57 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
58 ],
Anthony Stangeaacbf942019-08-30 15:21:34 -040059}
60
61cc_test_library {
62 name: "android.hardware.sensors@2.0-fakesubhal-unittest",
63 vendor_available: true,
64 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
65 cflags: [
66 "-DSUPPORT_ON_CHANGE_SENSORS",
67 "-DSUPPORT_CONTINUOUS_SENSORS",
68 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"",
69 ],
70}
71
72cc_test {
73 name: "android.hardware.sensors@2.0-halproxy-unit-tests",
74 srcs: ["HalProxy_test.cpp"],
75 vendor: true,
76 static_libs: [
77 "android.hardware.sensors@2.0-HalProxy",
78 "android.hardware.sensors@2.0-fakesubhal-unittest",
79 ],
80 shared_libs: [
81 "android.hardware.sensors@1.0",
82 "android.hardware.sensors@2.0",
83 "libcutils",
84 "libfmq",
85 "libhidlbase",
86 "libhidltransport",
87 "liblog",
88 "libpower",
89 "libutils",
90 ],
91 test_suites: ["device-tests"],
Stan Rokitadc7a8e72019-08-23 12:35:40 -070092}