Anthony Stange | a689f8a | 2019-07-30 11:35:48 -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 | |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 16 | cc_defaults { |
| 17 | name: "android.hardware.sensors@2.0-multihal-defaults", |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 18 | header_libs: [ |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 19 | "android.hardware.sensors@2.0-multihal.header", |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 20 | ], |
Anthony Stange | a689f8a | 2019-07-30 11:35:48 -0400 | [diff] [blame] | 21 | shared_libs: [ |
| 22 | "android.hardware.sensors@1.0", |
| 23 | "android.hardware.sensors@2.0", |
Stan Rokita | bf46132 | 2019-10-17 13:40:35 -0700 | [diff] [blame] | 24 | "libbase", |
Anthony Stange | a689f8a | 2019-07-30 11:35:48 -0400 | [diff] [blame] | 25 | "libcutils", |
| 26 | "libfmq", |
| 27 | "libhidlbase", |
Anthony Stange | a689f8a | 2019-07-30 11:35:48 -0400 | [diff] [blame] | 28 | "liblog", |
| 29 | "libpower", |
| 30 | "libutils", |
| 31 | ], |
Stan Rokita | 75cc7bf | 2019-09-26 13:17:01 -0700 | [diff] [blame] | 32 | cflags: ["-DLOG_TAG=\"SensorsMultiHal\""], |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | cc_binary { |
| 36 | name: "android.hardware.sensors@2.0-service.multihal", |
| 37 | defaults: [ |
| 38 | "hidl_defaults", |
| 39 | "android.hardware.sensors@2.0-multihal-defaults", |
| 40 | ], |
| 41 | vendor: true, |
| 42 | relative_install_path: "hw", |
| 43 | srcs: [ |
| 44 | "service.cpp", |
| 45 | "HalProxy.cpp", |
Stan Rokita | d0cd57d | 2019-09-17 15:52:51 -0700 | [diff] [blame] | 46 | "ScopedWakelock.cpp", |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 47 | ], |
| 48 | init_rc: ["android.hardware.sensors@2.0-service-multihal.rc"], |
Anthony Stange | a689f8a | 2019-07-30 11:35:48 -0400 | [diff] [blame] | 49 | vintf_fragments: ["android.hardware.sensors@2.0-multihal.xml"], |
| 50 | } |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 51 | |
| 52 | cc_library_headers { |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 53 | name: "android.hardware.sensors@2.0-multihal.header", |
| 54 | vendor_available: true, |
Anthony Stange | c34e668 | 2019-08-09 11:24:17 -0400 | [diff] [blame] | 55 | export_include_dirs: ["include"], |
Stan Rokita | 2879067 | 2019-08-20 14:32:15 -0700 | [diff] [blame] | 56 | } |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 57 | |
| 58 | // The below targets should only be used for testing. |
| 59 | cc_test_library { |
| 60 | name: "android.hardware.sensors@2.0-HalProxy", |
| 61 | defaults: ["android.hardware.sensors@2.0-multihal-defaults"], |
| 62 | vendor_available: true, |
| 63 | srcs: [ |
| 64 | "HalProxy.cpp", |
Stan Rokita | d0cd57d | 2019-09-17 15:52:51 -0700 | [diff] [blame] | 65 | "ScopedWakelock.cpp", |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 66 | ], |
| 67 | export_header_lib_headers: [ |
| 68 | "android.hardware.sensors@2.0-multihal.header", |
| 69 | ], |
Stan Rokita | 75cc7bf | 2019-09-26 13:17:01 -0700 | [diff] [blame] | 70 | shared_libs: [ |
| 71 | "libutils", |
| 72 | ], |
Anthony Stange | aacbf94 | 2019-08-30 15:21:34 -0400 | [diff] [blame] | 73 | } |