1// Bluetooth Audio library for target
2// ========================================================
3package {
4    // See: http://go/android-license-faq
5    // A large-scale-change added 'default_applicable_licenses' to import
6    // all of the 'license_kinds' from "system_bt_license"
7    // to get the below license kinds:
8    //   SPDX-license-identifier-Apache-2.0
9    default_applicable_licenses: ["system_bt_license"],
10}
11
12cc_library_static {
13    name: "libbt-audio-hal-interface",
14    defaults: ["fluoride_defaults"],
15    include_dirs: [
16        "system/bt",
17        "system/bt/bta/include",
18        "system/bt/bta/sys",
19        "system/bt/btif/include",
20        "system/bt/stack/include",
21        "system/bt/gd/rust/shim",
22    ],
23    shared_libs: [
24        "android.hardware.bluetooth.audio@2.0",
25        "android.hardware.bluetooth.audio@2.1",
26        "libhidlbase",
27    ],
28    static_libs: [
29        "libosi",
30        "libbt-common",
31    ],
32    target: {
33        android: {
34            shared_libs: [
35                "libfmq",
36            ],
37            srcs: [
38                "a2dp_encoding.cc",
39                "client_interface.cc",
40                "codec_status.cc",
41                "hearing_aid_software_encoding.cc",
42                "le_audio_software.cc",
43            ],
44        },
45        host: {
46            srcs: [
47                "a2dp_encoding_host.cc",
48                "hearing_aid_software_encoding_host.cc",
49            ],
50        },
51    },
52    host_supported: true,
53    cflags: [
54        "-DBUILDCFG",
55    ],
56}
57
58// Bluetooth Audio client interface library unit tests for target and host
59// ========================================================
60cc_test {
61    name: "bluetooth-test-audio-hal-interface",
62    defaults: ["fluoride_defaults"],
63    include_dirs: [
64        "system/bt",
65        "system/bt/stack/include",
66    ],
67    srcs: [
68        "client_interface_unittest.cc",
69    ],
70    shared_libs: [
71        "android.hardware.bluetooth.audio@2.0",
72        "android.hardware.bluetooth.audio@2.1",
73        "libcutils",
74        "libfmq",
75        "libhidlbase",
76        "liblog",
77        "libutils",
78    ],
79    static_libs: [
80        "libbt-audio-hal-interface",
81        "libbt-common",
82    ],
83    cflags: [
84        "-DBUILDCFG",
85    ],
86}
87