1// 2// Copyright (C) 2016 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_library_shared { 26 name: "android.hardware.audio.common-util", 27 defaults: ["hidl_defaults"], 28 vendor_available: true, 29 srcs: [ 30 "EffectMap.cpp", 31 ], 32 33 export_include_dirs: ["include"], 34 35 shared_libs: [ 36 "liblog", 37 "libutils", 38 "libhidlbase", 39 ], 40 41 header_libs: [ 42 "android.hardware.audio.common.util@all-versions", 43 "libaudio_system_headers", 44 "libhardware_headers", 45 ], 46 export_header_lib_headers: [ 47 "android.hardware.audio.common.util@all-versions", 48 ], 49} 50 51filegroup { 52 name: "android.hardware.audio.common-util@2-6", 53 srcs: [ 54 "HidlUtils.cpp", 55 "HidlUtilsCommon.cpp", 56 "UuidUtils.cpp", 57 ], 58} 59 60cc_defaults { 61 name: "android.hardware.audio.common-util_default", 62 defaults: ["hidl_defaults"], 63 64 vendor_available: true, 65 66 export_include_dirs: ["."], 67 68 shared_libs: [ 69 "liblog", 70 "libutils", 71 "libhidlbase", 72 "android.hardware.audio.common-util", 73 ], 74 export_shared_lib_headers: [ 75 "android.hardware.audio.common-util", 76 ], 77 78 header_libs: [ 79 "libaudio_system_headers", 80 "libhardware_headers", 81 ], 82} 83 84cc_library_shared { 85 name: "android.hardware.audio.common@2.0-util", 86 defaults: ["android.hardware.audio.common-util_default"], 87 srcs: [":android.hardware.audio.common-util@2-6"], 88 shared_libs: [ 89 "android.hardware.audio.common@2.0", 90 ], 91 cflags: [ 92 "-DMAJOR_VERSION=2", 93 "-DMINOR_VERSION=0", 94 "-include common/all-versions/VersionMacro.h", 95 ], 96} 97 98cc_library_shared { 99 name: "android.hardware.audio.common@4.0-util", 100 defaults: ["android.hardware.audio.common-util_default"], 101 srcs: [":android.hardware.audio.common-util@2-6"], 102 shared_libs: [ 103 "android.hardware.audio.common@4.0", 104 ], 105 cflags: [ 106 "-DMAJOR_VERSION=4", 107 "-DMINOR_VERSION=0", 108 "-include common/all-versions/VersionMacro.h", 109 ], 110} 111 112cc_library_shared { 113 name: "android.hardware.audio.common@5.0-util", 114 defaults: ["android.hardware.audio.common-util_default"], 115 srcs: [":android.hardware.audio.common-util@2-6"], 116 shared_libs: [ 117 "android.hardware.audio.common@5.0", 118 ], 119 cflags: [ 120 "-DMAJOR_VERSION=5", 121 "-DMINOR_VERSION=0", 122 "-include common/all-versions/VersionMacro.h", 123 ], 124} 125 126cc_library { 127 name: "android.hardware.audio.common@6.0-util", 128 defaults: ["android.hardware.audio.common-util_default"], 129 srcs: [":android.hardware.audio.common-util@2-6"], 130 shared_libs: [ 131 "android.hardware.audio.common@6.0", 132 ], 133 cflags: [ 134 "-DMAJOR_VERSION=6", 135 "-DMINOR_VERSION=0", 136 "-include common/all-versions/VersionMacro.h", 137 ], 138} 139 140cc_library { 141 name: "android.hardware.audio.common@7.0-util", 142 defaults: ["android.hardware.audio.common-util_default"], 143 srcs: [ 144 "7.0/HidlUtils.cpp", 145 "HidlUtilsCommon.cpp", 146 "UuidUtils.cpp", 147 ], 148 shared_libs: [ 149 "android.hardware.audio.common@7.0", 150 "android.hardware.audio.common@7.0-enums", 151 "libbase", 152 ], 153 cflags: [ 154 "-DMAJOR_VERSION=7", 155 "-DMINOR_VERSION=0", 156 "-include common/all-versions/VersionMacro.h", 157 ], 158} 159 160// Note: this isn't a VTS test, but rather a unit test 161// to verify correctness of conversion utilities. 162cc_test { 163 name: "android.hardware.audio.common@6.0-util_tests", 164 defaults: ["android.hardware.audio.common-util_default"], 165 166 srcs: ["tests/hidlutils6_tests.cpp"], 167 168 // Use static linking to allow running in presubmit on 169 // targets that don't have HAL V6. 170 static_libs: [ 171 "android.hardware.audio.common@6.0", 172 "android.hardware.audio.common@6.0-util", 173 ], 174 175 cflags: [ 176 "-Werror", 177 "-Wall", 178 "-DMAJOR_VERSION=6", 179 "-DMINOR_VERSION=0", 180 "-include common/all-versions/VersionMacro.h", 181 ], 182 183 test_suites: ["device-tests"], 184} 185 186// Note: this isn't a VTS test, but rather a unit test 187// to verify correctness of conversion utilities. 188cc_test { 189 name: "android.hardware.audio.common@7.0-util_tests", 190 defaults: ["android.hardware.audio.common-util_default"], 191 192 srcs: ["tests/hidlutils_tests.cpp"], 193 194 // Use static linking to allow running in presubmit on 195 // targets that don't have HAL V7. 196 static_libs: [ 197 "android.hardware.audio.common@7.0-enums", 198 "android.hardware.audio.common@7.0-util", 199 "android.hardware.audio.common@7.0", 200 ], 201 202 shared_libs: [ 203 "libbase", 204 "libxml2", 205 ], 206 207 cflags: [ 208 "-Werror", 209 "-Wall", 210 "-DMAJOR_VERSION=7", 211 "-DMINOR_VERSION=0", 212 "-include common/all-versions/VersionMacro.h", 213 ], 214 215 test_suites: ["device-tests"], 216} 217