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 16cc_defaults { 17 name: "android.hardware.sensors@2.X-multihal-defaults", 18 header_libs: [ 19 "android.hardware.sensors@2.X-multihal.header", 20 "android.hardware.sensors@2.X-shared-utils", 21 ], 22 shared_libs: [ 23 "android.hardware.sensors@1.0", 24 "android.hardware.sensors@2.0", 25 "android.hardware.sensors@2.1", 26 "libbase", 27 "libcutils", 28 "libfmq", 29 "libhidlbase", 30 "liblog", 31 "libpower", 32 "libutils", 33 ], 34 static_libs: [ 35 "android.hardware.sensors@1.0-convert", 36 ], 37 cflags: ["-DLOG_TAG=\"SensorsMultiHal\""], 38} 39 40// Header target for sub-HALs that implement the Multi-HAL 2.0 interface 41cc_library_headers { 42 name: "android.hardware.sensors@2.0-multihal.header", 43 vendor_available: true, 44 export_include_dirs: ["include/V2_0"], 45} 46 47// Header target for sub-HALs that implement the Multi-HAL 2.1 interface 48cc_library_headers { 49 name: "android.hardware.sensors@2.1-multihal.header", 50 vendor_available: true, 51 export_include_dirs: ["include/V2_1"], 52} 53 54// Header target for Multi-HAL so it can reference both 2.0/2.1 headers 55cc_library_headers { 56 name: "android.hardware.sensors@2.X-multihal.header", 57 vendor_available: true, 58 export_include_dirs: ["include"], 59} 60 61cc_library_static { 62 name: "android.hardware.sensors@2.X-multihal", 63 defaults: [ 64 "hidl_defaults", 65 "android.hardware.sensors@2.X-multihal-defaults", 66 ], 67 srcs: [ 68 "HalProxy.cpp", 69 "HalProxyCallback.cpp", 70 ], 71 vendor_available: true, 72 export_header_lib_headers: [ 73 "android.hardware.sensors@2.X-multihal.header", 74 ], 75} 76 77cc_library_shared { 78 name: "android.hardware.sensors@2.0-ScopedWakelock", 79 defaults: [ 80 "hidl_defaults", 81 "android.hardware.sensors@2.X-multihal-defaults", 82 ], 83 srcs: [ 84 "ScopedWakelock.cpp", 85 ], 86 header_libs: [ 87 "android.hardware.sensors@2.0-multihal.header", 88 ], 89 vendor_available: true, 90 export_header_lib_headers: [ 91 "android.hardware.sensors@2.0-multihal.header", 92 ], 93} 94 95cc_test_library { 96 name: "android.hardware.sensors@2.0-ScopedWakelock.testlib", 97 defaults: [ 98 "hidl_defaults", 99 "android.hardware.sensors@2.X-multihal-defaults", 100 ], 101 srcs: [ 102 "ScopedWakelock.cpp", 103 ], 104 vendor_available: true, 105 header_libs: [ 106 "android.hardware.sensors@2.0-multihal.header", 107 ], 108 export_header_lib_headers: [ 109 "android.hardware.sensors@2.0-multihal.header", 110 ], 111} 112