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