aboutsummaryrefslogtreecommitdiff
path: root/main/Android.bp
blob: 6757e560a1d72cc4673313218286a2d2fbbcc951 (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
// Bluetooth main HW module / shared library for target
// ========================================================
filegroup {
    name: "LibBluetoothSources",
    srcs: [
        "bte_conf.cc",
        "bte_init.cc",
        "bte_init_cpp_logging.cc",
        "bte_logmsg.cc",
        "bte_main.cc",
        "stack_config.cc",
    ]
}

cc_library_shared {
    name: "libbluetooth",
    defaults: ["fluoride_defaults"],
    header_libs: ["libbluetooth_headers"],
    export_header_lib_headers: ["libbluetooth_headers"],
    srcs: [
        ":LibBluetoothSources",
        ":LibBluetoothShimSources",
    ],
    include_dirs: [
        "system/bt",
        "system/bt/bta/include",
        "system/bt/bta/sys",
        "system/bt/bta/dm",
        "system/bt/btcore/include",
        "system/bt/internal_include",
        "system/bt/stack/include",
        "system/bt/stack/l2cap",
        "system/bt/stack/a2dp",
        "system/bt/stack/btm",
        "system/bt/stack/avdt",
        "system/bt/udrv/include",
        "system/bt/btif/include",
        "system/bt/btif/co",
        "system/bt/hci/include",
        "system/bt/vnd/include",
        "system/bt/embdrv/sbc/encoder/include",
        "system/bt/embdrv/sbc/decoder/include",
        "system/bt/utils/include",
        "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",
        "android.hardware.bluetooth.a2dp@1.0",
        "android.hardware.bluetooth.audio@2.0",
        "libaaudio",
        "libcutils",
        "libdl",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libprocessgroup",
        "libprotobuf-cpp-lite",
        "libutils",
        "libtinyxml2",
        "libz",
        "libcrypto",
        //"android.hardware.keymaster@4.0",
        //"libkeymaster4support",
        //"libkeystore_binder",
    ],
    static_libs: [
        "libbt-sbc-decoder",
        "libbt-sbc-encoder",
        "libFraunhoferAAC",
        "libg722codec",
        "libudrv-uipc",
        "libbluetooth_gd", // Gabeldorsche
    ],
    whole_static_libs: [
        "libbt-bta",
        "libbt-common",
        "libbtdevice",
        "libbtif",
        "libbt-hci",
        "libbt-stack",
        "libbt-utils",
        "libbtcore",
        "libosi",
        "libbt-protos-lite",
    ],
    // 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",
        "libldacBT_enc",
        "libldacBT_abr",
    ],
    cflags: [
        "-DBUILDCFG",
    ],
    sanitize: {
        scs: true,
    },
}

cc_library_static {
    name: "libbluetooth-for-tests",
    defaults: ["fluoride_defaults"],

    srcs: [
        ":LibBluetoothSources",
        ":LibBluetoothShimSources",
    ],
    host_supported: true,
    include_dirs: [
        "system/bt",
        "system/bt/bta/include",
        "system/bt/btcore/include",
        "system/bt/btif/include",
        "system/bt/hci/include",
        "system/bt/internal_include",
        "system/bt/stack/include",
        "system/bt/utils/include",
    ],
    cflags: [
        "-DBUILDCFG",
    ],
}

cc_test {
    name: "bluetooth_test_legacy",
    defaults: ["fluoride_defaults",
               "fluoride_osi_defaults",
    ],
    test_suites: ["device-tests"],
    host_supported: true,
    srcs: [
        ":LibBluetoothShimTestSources",
        ":LibBluetoothShimStubSources",
    ],
    static_libs: [
        "libgmock",
        "libbluetooth-for-tests",
        "libosi",
    ],
    shared_libs: [
        "libchrome",
        "liblog",
    ],
}