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