Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 1 | // |
| 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 | |
| 16 | cc_defaults { |
| 17 | name: "android.hardware.sensors@2.0-fakesubhal-defaults", |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 18 | srcs: [ |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 19 | "fake_subhal/*.cpp", |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 20 | ], |
| 21 | header_libs: [ |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 22 | "android.hardware.sensors@2.0-multihal.header", |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 23 | ], |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 24 | export_include_dirs: ["fake_subhal"], |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 25 | shared_libs: [ |
| 26 | "android.hardware.sensors@1.0", |
| 27 | "android.hardware.sensors@2.0", |
| 28 | "libcutils", |
| 29 | "libfmq", |
| 30 | "libhidlbase", |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 31 | "liblog", |
| 32 | "libpower", |
| 33 | "libutils", |
| 34 | ], |
Stan Rokita | d0cd57d | 2019-09-17 15:52:51 -0700 | [diff] [blame] | 35 | static_libs: [ |
| 36 | "android.hardware.sensors@2.0-HalProxy", |
| 37 | ], |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | cc_library { |
| 41 | name: "android.hardware.sensors@2.0-fakesubhal-config1", |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 42 | vendor: true, |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 43 | defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"], |
| 44 | cflags: [ |
| 45 | "-DSUPPORT_CONTINUOUS_SENSORS", |
| 46 | "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"", |
| 47 | ], |
| 48 | } |
| 49 | |
| 50 | cc_library { |
| 51 | name: "android.hardware.sensors@2.0-fakesubhal-config2", |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 52 | vendor: true, |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 53 | defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"], |
| 54 | cflags: [ |
| 55 | "-DSUPPORT_ON_CHANGE_SENSORS", |
| 56 | "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"", |
| 57 | ], |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | cc_test_library { |
| 61 | name: "android.hardware.sensors@2.0-fakesubhal-unittest", |
| 62 | vendor_available: true, |
| 63 | defaults: ["android.hardware.sensors@2.0-fakesubhal-defaults"], |
| 64 | cflags: [ |
| 65 | "-DSUPPORT_ON_CHANGE_SENSORS", |
| 66 | "-DSUPPORT_CONTINUOUS_SENSORS", |
| 67 | "-DSUB_HAL_NAME=\"FakeSubHal-Test\"", |
| 68 | ], |
| 69 | } |
| 70 | |
| 71 | cc_test { |
| 72 | name: "android.hardware.sensors@2.0-halproxy-unit-tests", |
| 73 | srcs: ["HalProxy_test.cpp"], |
| 74 | vendor: true, |
| 75 | static_libs: [ |
| 76 | "android.hardware.sensors@2.0-HalProxy", |
| 77 | "android.hardware.sensors@2.0-fakesubhal-unittest", |
| 78 | ], |
| 79 | shared_libs: [ |
| 80 | "android.hardware.sensors@1.0", |
| 81 | "android.hardware.sensors@2.0", |
| 82 | "libcutils", |
| 83 | "libfmq", |
| 84 | "libhidlbase", |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 85 | "liblog", |
| 86 | "libpower", |
| 87 | "libutils", |
| 88 | ], |
| 89 | test_suites: ["device-tests"], |
Stan Rokita | dc7a8e7 | 2019-08-23 12:35:40 -0700 | [diff] [blame] | 90 | } |