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 "frameworks_av_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_av_license"],
8}
9
10cc_defaults {
11    name: "libnbaio_mono_defaults",
12    srcs: [
13        "MonoPipe.cpp",
14        "MonoPipeReader.cpp",
15        "NBAIO.cpp",
16    ],
17    header_libs: [
18        "libaudio_system_headers",
19        "libaudioclient_headers",
20    ],
21    export_header_lib_headers: [
22        "libaudioclient_headers",
23    ],
24
25    shared_libs: [
26        "libaudioutils",
27        "libcutils",
28        "liblog",
29        "libutils",
30    ],
31    export_shared_lib_headers: [
32        "libaudioutils",
33    ],
34
35    export_include_dirs: ["include_mono"],
36
37    cflags: [
38        "-Wall",
39        "-Werror",
40    ],
41}
42
43// libnbaio_mono is the part of libnbaio that is available for vendors to use. Vendor modules can't
44// link against libnbaio and system modules can't link against libnbaio_mono. The rest of libnbaio
45// pulls in too many other dependencies.
46cc_library_shared {
47    name: "libnbaio_mono",
48    vendor: true,
49    defaults: ["libnbaio_mono_defaults"],
50}
51
52cc_library {
53    name: "libnbaio",
54    defaults: ["libnbaio_mono_defaults"],
55    srcs: [
56        "AudioBufferProviderSource.cpp",
57        "AudioStreamInSource.cpp",
58        "AudioStreamOutSink.cpp",
59        "Pipe.cpp",
60        "PipeReader.cpp",
61        "SourceAudioBufferProvider.cpp",
62    ],
63
64    // libsndfile license is incompatible; uncomment to use for local debug only
65    // srcs: [
66    //     "LibsndfileSink.cpp",
67    //     "LibsndfileSource.cpp",
68    // ],
69    // static_libs: ["libsndfile"],
70
71    shared_libs: [
72        "libmediautils",
73    ],
74
75    header_libs: ["libaudiohal_headers"],
76
77    export_include_dirs: ["include"],
78}
79