blob: 50a55f946e4e583698129cd6b199b308223fd967 [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",
Anthony Stangec34e6682019-08-09 11:24:17 -040031 "liblog",
32 "libpower",
33 "libutils",
34 ],
Stan Rokitad0cd57d2019-09-17 15:52:51 -070035 static_libs: [
36 "android.hardware.sensors@2.0-HalProxy",
37 ],
Stan Rokita75cc7bf2019-09-26 13:17:01 -070038 cflags: [
39 "-DLOG_TAG=\"FakeSubHal\""
40 ],
Anthony Stangec34e6682019-08-09 11:24:17 -040041}
42
43cc_library {
44 name: "android.hardware.sensors@2.0-fakesubhal-config1",
Anthony Stangeaacbf942019-08-30 15:21:34 -040045 vendor: true,
Anthony Stangec34e6682019-08-09 11:24:17 -040046 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
47 cflags: [
48 "-DSUPPORT_CONTINUOUS_SENSORS",
49 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"",
50 ],
51}
52
53cc_library {
54 name: "android.hardware.sensors@2.0-fakesubhal-config2",
Anthony Stangeaacbf942019-08-30 15:21:34 -040055 vendor: true,
Anthony Stangec34e6682019-08-09 11:24:17 -040056 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
57 cflags: [
58 "-DSUPPORT_ON_CHANGE_SENSORS",
59 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"",
60 ],
Anthony Stangeaacbf942019-08-30 15:21:34 -040061}
62
63cc_test_library {
64 name: "android.hardware.sensors@2.0-fakesubhal-unittest",
65 vendor_available: true,
66 defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"],
67 cflags: [
68 "-DSUPPORT_ON_CHANGE_SENSORS",
69 "-DSUPPORT_CONTINUOUS_SENSORS",
70 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"",
71 ],
72}
73
74cc_test {
75 name: "android.hardware.sensors@2.0-halproxy-unit-tests",
76 srcs: ["HalProxy_test.cpp"],
77 vendor: true,
78 static_libs: [
79 "android.hardware.sensors@2.0-HalProxy",
80 "android.hardware.sensors@2.0-fakesubhal-unittest",
81 ],
82 shared_libs: [
83 "android.hardware.sensors@1.0",
84 "android.hardware.sensors@2.0",
Stan Rokitabf461322019-10-17 13:40:35 -070085 "libbase",
Anthony Stangeaacbf942019-08-30 15:21:34 -040086 "libcutils",
87 "libfmq",
88 "libhidlbase",
Anthony Stangeaacbf942019-08-30 15:21:34 -040089 "liblog",
90 "libpower",
91 "libutils",
92 ],
93 test_suites: ["device-tests"],
Stan Rokita75cc7bf2019-09-26 13:17:01 -070094 cflags: [
95 "-DLOG_TAG=\"HalProxyUnitTests\"",
96 ],
Stan Rokitadc7a8e72019-08-23 12:35:40 -070097}