summaryrefslogtreecommitdiff
path: root/main/Android.bp
blob: bc2fe796fa9beedeca538ac1080ef66c69ad1b90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
soong_namespace {
}

soong_config_module_type_import {
    from: "device/qcom/qssi/Android.bp",
    module_types: [
         "bredr_vs_btadva_cc_defaults",
         "aosp_vs_qva_cc_defaults",
    ],
}

bredr_vs_btadva_cc_defaults {
    name: "btadva_main_cc-default",

    soong_config_variables: {
        bredr_or_btadva: {
           btadva: {
              include_dirs: [
                 "vendor/qcom/proprietary/commonsys/bt/bt_adv_audio/system/bt/bta/include",
                 "vendor/qcom/proprietary/commonsys/bt/bt_adv_audio/vhal/include",
              ],
              whole_static_libs: [
                 "libbt-btif_qti_adva",
                 "libbt-bta_qti_adva",
              ],
              cflags: [
                 "-DADV_AUDIO_FEATURE=1",
              ],
              required: ["leaudio_configs.xml"],
           }
       }
   }
}

aosp_vs_qva_cc_defaults {
     name: "qva_cc_defaults",
     soong_config_variables: {
         aosp_or_qva: {
           qva: {
             static_libs: [
                "libbt-sbc-encoder",
                "libbt-sbc-decoder",
             ],
           }
        }
    }
}


// Bluetooth main HW module / shared library for target
// ========================================================
cc_library_shared {
    name: "libbluetooth_qti",
    defaults: ["fluoride_defaults_qti", "btadva_main_cc-default", "qva_cc_defaults"],
    header_libs: ["libbluetooth_headers"],
    export_header_lib_headers: ["libbluetooth_headers"],
    system_ext_specific: true,
    srcs: [
        // platform specific
        "bte_conf.cc",
        "bte_init.cc",
        "bte_init_cpp_logging.cc",
        "bte_logmsg.cc",
        "bte_main.cc",
        "stack_config.cc",
    ],
    include_dirs: [
        "vendor/qcom/opensource/commonsys/system/bt",
        "vendor/qcom/opensource/commonsys/system/bt/bta/include",
        "vendor/qcom/opensource/commonsys/system/bt/bta/sys",
        "vendor/qcom/opensource/commonsys/system/bt/bta/dm",
        "vendor/qcom/opensource/commonsys/system/bt/btcore/include",
        "vendor/qcom/opensource/commonsys/system/bt/internal_include",
        "vendor/qcom/opensource/commonsys/system/bt/stack/include",
        "vendor/qcom/opensource/commonsys/system/bt/stack/l2cap",
        "vendor/qcom/opensource/commonsys/system/bt/stack/a2dp",
        "vendor/qcom/opensource/commonsys/system/bt/stack/btm",
        "vendor/qcom/opensource/commonsys/system/bt/stack/avdt",
        "vendor/qcom/opensource/commonsys/system/bt/udrv/include",
        "vendor/qcom/opensource/commonsys/system/bt/btif/include",
        "vendor/qcom/opensource/commonsys/system/bt/btif/co",
        "vendor/qcom/opensource/commonsys/system/bt/hci/include",
        "vendor/qcom/opensource/commonsys/system/bt/vnd/include",
        "packages/modules/Bluetooth/system/embdrv/sbc/encoder/include",
        "packages/modules/Bluetooth/system/embdrv/sbc/decoder/include",
        "vendor/qcom/opensource/commonsys/system/bt/utils/include",
        "vendor/qcom/opensource/commonsys/bluetooth_ext/vhal/include",
        "vendor/qcom/opensource/commonsys/bluetooth_ext/system_bt_ext",
        "system/security/keystore/include",
        "hardware/interfaces/keymaster/4.0/support/include",
    ],
    logtags: ["../EventLogTags.logtags"],
    shared_libs: [
        "android.hardware.bluetooth@1.0",
        "android.hardware.bluetooth@1.1",
        "com.qualcomm.qti.bluetooth_audio@1.0",
        "vendor.qti.hardware.bluetooth_audio@2.0",
        "vendor.qti.hardware.bluetooth_audio@2.1",
        "android.hardware.bluetooth.audio-V2-ndk",
        "libbinder_ndk",
        "android.hardware.audio.common-V1-ndk",
        "vendor.qti.hardware.bluetooth.audio-V1-ndk",
        "libaaudio",
        "libcutils",
        "libdl",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libprotobuf-cpp-lite",
        "libprocessgroup",
        "libutils",
        "libtinyxml2",
        "libz",
        "libcrypto",
        "libbtconfigstore",
        "libxml2",
    ],
    static_libs: [
        "libFraunhoferAAC",
        "libudrv-uipc_qti",
        "libg722codec_qti",
    ],
    whole_static_libs: [
        "libbt-bta_qti",
        "libbtdevice_qti",
        "libbt-bta-ext",
        "libbtdevice_ext",
        "libbt-stack_ext",
        "libbtif_qti",
        "libbtif_ext",
        "libbt-hci_qti",
        "libbt-protos_qti",
        "libbt-stack_qti",
        "libbt-utils_qti",
        "libbtcore_qti",
        "libosi_qti",
        "libbt-stack_ext",
        "libosi_ext",
    ],
    // Shared library link options.
    // References to global symbols and functions should bind to the library
    // itself. This is to avoid issues with some of the unit/system tests
    // that might link statically with some of the code in the library, and
    // also dlopen(3) the shared library.
    ldflags: ["-Wl,-Bsymbolic,-Bsymbolic-functions"],
    required: [
        "bt_did.conf",
        "bt_stack.conf",
        "interop_database.conf",
        "bt_profile.conf",
        "libbt-hci_qti",
        "libldacBT_enc",
        "libldacBT_abr",
    ],
    cflags: [
        "-DBUILDCFG",
    ],
    sanitize: {
        scs: true,
    },
}