1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "hardware_interfaces_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["hardware_interfaces_license"],
8}
9
10cc_defaults {
11    name: "android.hardware.audio-util_default",
12    defaults: ["hidl_defaults"],
13
14    vendor_available: true,
15
16    export_include_dirs: ["include"],
17
18    srcs: [
19        "CoreUtils.cpp",
20    ],
21
22    shared_libs: [
23        "liblog",
24        "libutils",
25        "libhidlbase",
26        "android.hardware.audio.common-util",
27    ],
28    export_shared_lib_headers: [
29        "android.hardware.audio.common-util",
30    ],
31
32    header_libs: [
33        "libaudio_system_headers",
34        "libhardware_headers",
35    ],
36}
37
38cc_library_shared {
39    name: "android.hardware.audio@2.0-util",
40    defaults: ["android.hardware.audio-util_default"],
41    shared_libs: [
42        "android.hardware.audio.common@2.0",
43        "android.hardware.audio.common@2.0-util",
44        "android.hardware.audio@2.0",
45    ],
46    cflags: [
47        "-DMAJOR_VERSION=2",
48        "-DMINOR_VERSION=0",
49        "-include common/all-versions/VersionMacro.h",
50    ],
51}
52
53cc_library_shared {
54    name: "android.hardware.audio@4.0-util",
55    defaults: ["android.hardware.audio-util_default"],
56    shared_libs: [
57        "android.hardware.audio.common@4.0",
58        "android.hardware.audio.common@4.0-util",
59        "android.hardware.audio@4.0",
60    ],
61    cflags: [
62        "-DMAJOR_VERSION=4",
63        "-DMINOR_VERSION=0",
64        "-include common/all-versions/VersionMacro.h",
65    ],
66}
67
68cc_library_shared {
69    name: "android.hardware.audio@5.0-util",
70    defaults: ["android.hardware.audio-util_default"],
71    shared_libs: [
72        "android.hardware.audio.common@5.0",
73        "android.hardware.audio.common@5.0-util",
74        "android.hardware.audio@5.0",
75    ],
76    cflags: [
77        "-DMAJOR_VERSION=5",
78        "-DMINOR_VERSION=0",
79        "-include common/all-versions/VersionMacro.h",
80    ],
81}
82
83cc_library_shared {
84    name: "android.hardware.audio@6.0-util",
85    defaults: ["android.hardware.audio-util_default"],
86    shared_libs: [
87        "android.hardware.audio.common@6.0",
88        "android.hardware.audio.common@6.0-util",
89        "android.hardware.audio@6.0",
90    ],
91    cflags: [
92        "-DMAJOR_VERSION=6",
93        "-DMINOR_VERSION=0",
94        "-include common/all-versions/VersionMacro.h",
95    ],
96}
97
98cc_library {
99    name: "android.hardware.audio@7.0-util",
100    defaults: ["android.hardware.audio-util_default"],
101    shared_libs: [
102        "android.hardware.audio.common@7.0",
103        "android.hardware.audio.common@7.0-enums",
104        "android.hardware.audio.common@7.0-util",
105        "android.hardware.audio@7.0",
106        "libbase",
107    ],
108    cflags: [
109        "-DMAJOR_VERSION=7",
110        "-DMINOR_VERSION=0",
111        "-include common/all-versions/VersionMacro.h",
112    ],
113}
114
115// Note: this isn't a VTS test, but rather a unit test
116// to verify correctness of conversion utilities.
117cc_test {
118    name: "android.hardware.audio@7.0-util_tests",
119    defaults: ["android.hardware.audio-util_default"],
120
121    srcs: ["tests/coreutils_tests.cpp"],
122
123    // Use static linking to allow running in presubmit on
124    // targets that don't have HAL V7.
125    static_libs: [
126        "android.hardware.audio.common@7.0",
127        "android.hardware.audio.common@7.0-enums",
128        "android.hardware.audio.common@7.0-util",
129        "android.hardware.audio@7.0",
130        "android.hardware.audio@7.0-util",
131    ],
132
133    shared_libs: [
134        "libbase",
135        "libxml2",
136    ],
137
138    cflags: [
139        "-Werror",
140        "-Wall",
141        "-DMAJOR_VERSION=7",
142        "-DMINOR_VERSION=0",
143        "-include common/all-versions/VersionMacro.h",
144    ],
145
146    test_suites: ["device-tests"],
147}
148