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 default_team: "trendy_team_android_media_audio_framework", 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_library_shared { 27 name: "android.hardware.audio.common-util", 28 defaults: ["hidl_defaults"], 29 vendor_available: true, 30 srcs: [ 31 "EffectMap.cpp", 32 ], 33 34 export_include_dirs: ["include"], 35 36 shared_libs: [ 37 "liblog", 38 "libutils", 39 "libhidlbase", 40 ], 41 42 header_libs: [ 43 "android.hardware.audio.common.util@all-versions", 44 "libaudio_system_headers", 45 "libhardware_headers", 46 ], 47 export_header_lib_headers: [ 48 "android.hardware.audio.common.util@all-versions", 49 ], 50} 51 52filegroup { 53 name: "android.hardware.audio.common-util@2-6", 54 srcs: [ 55 "HidlUtils.cpp", 56 "HidlUtilsCommon.cpp", 57 "UuidUtils.cpp", 58 ], 59} 60 61cc_defaults { 62 name: "android.hardware.audio.common-util_default", 63 defaults: ["hidl_defaults"], 64 65 vendor_available: true, 66 67 export_include_dirs: ["."], 68 69 shared_libs: [ 70 "liblog", 71 "libutils", 72 "libhidlbase", 73 "android.hardware.audio.common-util", 74 ], 75 export_shared_lib_headers: [ 76 "android.hardware.audio.common-util", 77 ], 78 79 header_libs: [ 80 "libaudio_system_headers", 81 "libhardware_headers", 82 ], 83} 84 85cc_library_shared { 86 name: "[email protected]", 87 defaults: ["android.hardware.audio.common-util_default"], 88 srcs: [":android.hardware.audio.common-util@2-6"], 89 shared_libs: [ 90 "[email protected]", 91 ], 92 cflags: [ 93 "-DMAJOR_VERSION=2", 94 "-DMINOR_VERSION=0", 95 "-include common/all-versions/VersionMacro.h", 96 ], 97} 98 99cc_library_shared { 100 name: "[email protected]", 101 defaults: ["android.hardware.audio.common-util_default"], 102 srcs: [":android.hardware.audio.common-util@2-6"], 103 shared_libs: [ 104 "[email protected]", 105 ], 106 cflags: [ 107 "-DMAJOR_VERSION=4", 108 "-DMINOR_VERSION=0", 109 "-include common/all-versions/VersionMacro.h", 110 ], 111} 112 113cc_library_shared { 114 name: "[email protected]", 115 defaults: ["android.hardware.audio.common-util_default"], 116 srcs: [":android.hardware.audio.common-util@2-6"], 117 shared_libs: [ 118 "[email protected]", 119 ], 120 cflags: [ 121 "-DMAJOR_VERSION=5", 122 "-DMINOR_VERSION=0", 123 "-include common/all-versions/VersionMacro.h", 124 ], 125} 126 127cc_library { 128 name: "[email protected]", 129 defaults: ["android.hardware.audio.common-util_default"], 130 srcs: [":android.hardware.audio.common-util@2-6"], 131 shared_libs: [ 132 "[email protected]", 133 ], 134 cflags: [ 135 "-DMAJOR_VERSION=6", 136 "-DMINOR_VERSION=0", 137 "-include common/all-versions/VersionMacro.h", 138 ], 139} 140 141cc_library { 142 name: "[email protected]", 143 defaults: ["android.hardware.audio.common-util_default"], 144 srcs: [ 145 "7.0/HidlUtils.cpp", 146 "HidlUtilsCommon.cpp", 147 "UuidUtils.cpp", 148 ], 149 shared_libs: [ 150 "[email protected]", 151 "[email protected]", 152 "libbase", 153 ], 154 cflags: [ 155 "-DMAJOR_VERSION=7", 156 "-DMINOR_VERSION=0", 157 "-include common/all-versions/VersionMacro.h", 158 ], 159} 160 161cc_library { 162 name: "[email protected]", 163 defaults: ["android.hardware.audio.common-util_default"], 164 srcs: [ 165 "7.0/HidlUtils.cpp", 166 "HidlUtilsCommon.cpp", 167 "UuidUtils.cpp", 168 ], 169 shared_libs: [ 170 "[email protected]", 171 "[email protected]", 172 "libbase", 173 ], 174 cflags: [ 175 "-DMAJOR_VERSION=7", 176 "-DMINOR_VERSION=1", 177 "-DCOMMON_TYPES_MINOR_VERSION=0", 178 "-DCORE_TYPES_MINOR_VERSION=0", 179 "-include common/all-versions/VersionMacro.h", 180 ], 181} 182 183// Note: this isn't a VTS test, but rather a unit test 184// to verify correctness of conversion utilities. 185cc_test { 186 name: "[email protected]_tests", 187 defaults: ["android.hardware.audio.common-util_default"], 188 189 srcs: ["tests/hidlutils6_tests.cpp"], 190 191 // Use static linking to allow running in presubmit on 192 // targets that don't have HAL V6. 193 static_libs: [ 194 "[email protected]", 195 "[email protected]", 196 ], 197 198 cflags: [ 199 "-Werror", 200 "-Wall", 201 "-DMAJOR_VERSION=6", 202 "-DMINOR_VERSION=0", 203 "-include common/all-versions/VersionMacro.h", 204 ], 205 206 test_suites: ["device-tests"], 207} 208 209// Note: this isn't a VTS test, but rather a unit test 210// to verify correctness of conversion utilities. 211cc_test { 212 name: "[email protected]_tests", 213 defaults: ["android.hardware.audio.common-util_default"], 214 215 tidy_timeout_srcs: ["tests/hidlutils_tests.cpp"], 216 217 srcs: ["tests/hidlutils_tests.cpp"], 218 219 // Use static linking to allow running in presubmit on 220 // targets that don't have HAL V7. 221 static_libs: [ 222 "[email protected]", 223 "[email protected]", 224 "[email protected]", 225 ], 226 227 shared_libs: [ 228 "libbase", 229 "libxml2", 230 ], 231 232 cflags: [ 233 "-Werror", 234 "-Wall", 235 "-DMAJOR_VERSION=7", 236 "-DMINOR_VERSION=0", 237 "-include common/all-versions/VersionMacro.h", 238 ], 239 240 test_suites: ["device-tests"], 241} 242 243cc_test { 244 name: "[email protected]_tests", 245 defaults: ["android.hardware.audio.common-util_default"], 246 247 tidy_timeout_srcs: ["tests/hidlutils_tests.cpp"], 248 249 srcs: ["tests/hidlutils_tests.cpp"], 250 251 // Use static linking to allow running in presubmit on 252 // targets that don't have HAL V7.1. 253 static_libs: [ 254 "[email protected]", 255 "[email protected]", 256 "[email protected]", 257 ], 258 259 shared_libs: [ 260 "libbase", 261 "libxml2", 262 ], 263 264 cflags: [ 265 "-Werror", 266 "-Wall", 267 "-DMAJOR_VERSION=7", 268 "-DMINOR_VERSION=1", 269 "-DCOMMON_TYPES_MINOR_VERSION=0", 270 "-DCORE_TYPES_MINOR_VERSION=0", 271 "-include common/all-versions/VersionMacro.h", 272 ], 273 274 test_suites: ["device-tests"], 275} 276