blob: 460ae46c55e46dd212c10d8585253865fb87d915 [file] [log] [blame]
Jack He65b2a572016-12-07 18:25:17 -08001// Bluetooth main HW module / shared library for target
2// ========================================================
Chris Manton28c4c582019-09-09 21:11:59 -07003filegroup {
4 name: "LibBluetoothSources",
5 srcs: [
6 "bte_conf.cc",
Chris Manton28c4c582019-09-09 21:11:59 -07007 "bte_init_cpp_logging.cc",
8 "bte_logmsg.cc",
9 "bte_main.cc",
Chris Manton28c4c582019-09-09 21:11:59 -070010 "stack_config.cc",
11 ]
12}
13
Chris Manton878cadc2020-01-07 14:05:36 -080014cc_library_static {
15 name: "libbte",
16 defaults: ["fluoride_defaults"],
17 srcs: [
18 ":LibBluetoothSources",
19 ":LibBluetoothShimSources",
20 ],
21 include_dirs: [
22 "packages/modules/Bluetooth/system",
Jakub Pawlowskid4e47052020-02-16 01:03:04 +010023 "packages/modules/Bluetooth/system/gd",
Chris Manton878cadc2020-01-07 14:05:36 -080024 "packages/modules/Bluetooth/system/bta/include",
25 "packages/modules/Bluetooth/system/bta/sys",
26 "packages/modules/Bluetooth/system/bta/dm",
27 "packages/modules/Bluetooth/system/btcore/include",
28 "packages/modules/Bluetooth/system/internal_include",
29 "packages/modules/Bluetooth/system/stack/include",
30 "packages/modules/Bluetooth/system/stack/l2cap",
31 "packages/modules/Bluetooth/system/stack/a2dp",
32 "packages/modules/Bluetooth/system/stack/btm",
33 "packages/modules/Bluetooth/system/stack/avdt",
34 "packages/modules/Bluetooth/system/udrv/include",
35 "packages/modules/Bluetooth/system/btif/include",
36 "packages/modules/Bluetooth/system/btif/co",
37 "packages/modules/Bluetooth/system/hci/include",
38 "packages/modules/Bluetooth/system/vnd/include",
39 "packages/modules/Bluetooth/system/embdrv/sbc/encoder/include",
40 "packages/modules/Bluetooth/system/embdrv/sbc/decoder/include",
41 "packages/modules/Bluetooth/system/utils/include",
42 "system/security/keystore/include",
43 "hardware/interfaces/keymaster/4.0/support/include",
44 ],
Chris Manton615296f2020-06-16 08:58:34 -070045 shared_libs: [
46 "libflatbuffers-cpp",
47 ],
Jakub Pawlowskid4e47052020-02-16 01:03:04 +010048 generated_headers: [
Chris Manton2e143092020-07-22 12:42:20 -070049 "BluetoothGeneratedBundlerSchema_h_bfbs",
Chris Mantoned1c08b2020-06-26 22:17:14 -070050 "BluetoothGeneratedDumpsysDataSchema_h",
Jakub Pawlowskid4e47052020-02-16 01:03:04 +010051 "BluetoothGeneratedPackets_h",
52 ],
Chris Manton878cadc2020-01-07 14:05:36 -080053 host_supported: true,
54}
55
Jack He65b2a572016-12-07 18:25:17 -080056cc_library_shared {
Jakub Pawlowskia75a6542017-10-19 00:26:09 -070057 name: "libbluetooth",
Jack He65b2a572016-12-07 18:25:17 -080058 defaults: ["fluoride_defaults"],
Jakub Pawlowskia75a6542017-10-19 00:26:09 -070059 header_libs: ["libbluetooth_headers"],
60 export_header_lib_headers: ["libbluetooth_headers"],
Jack He65b2a572016-12-07 18:25:17 -080061 include_dirs: [
62 "packages/modules/Bluetooth/system",
63 "packages/modules/Bluetooth/system/bta/include",
64 "packages/modules/Bluetooth/system/bta/sys",
65 "packages/modules/Bluetooth/system/bta/dm",
66 "packages/modules/Bluetooth/system/btcore/include",
Jakub Pawlowski9e9eb4b2017-10-17 16:40:41 -070067 "packages/modules/Bluetooth/system/internal_include",
Jack He65b2a572016-12-07 18:25:17 -080068 "packages/modules/Bluetooth/system/stack/include",
69 "packages/modules/Bluetooth/system/stack/l2cap",
70 "packages/modules/Bluetooth/system/stack/a2dp",
71 "packages/modules/Bluetooth/system/stack/btm",
72 "packages/modules/Bluetooth/system/stack/avdt",
73 "packages/modules/Bluetooth/system/udrv/include",
74 "packages/modules/Bluetooth/system/btif/include",
75 "packages/modules/Bluetooth/system/btif/co",
76 "packages/modules/Bluetooth/system/hci/include",
77 "packages/modules/Bluetooth/system/vnd/include",
78 "packages/modules/Bluetooth/system/embdrv/sbc/encoder/include",
79 "packages/modules/Bluetooth/system/embdrv/sbc/decoder/include",
Jack He65b2a572016-12-07 18:25:17 -080080 "packages/modules/Bluetooth/system/utils/include",
Martin Brabhamf1e57382019-02-01 13:42:58 -080081 "system/security/keystore/include",
82 "hardware/interfaces/keymaster/4.0/support/include",
Jack He65b2a572016-12-07 18:25:17 -080083 ],
84 logtags: ["../../EventLogTags.logtags"],
85 shared_libs: [
Sunny Kapdi42b08212018-02-12 21:52:50 -080086 "android.hardware.bluetooth.a2dp@1.0",
Cheney Ni68ce2812018-11-08 16:41:02 +080087 "android.hardware.bluetooth.audio@2.0",
Michael Sun0e675332020-11-06 01:19:16 +000088 "android.hardware.bluetooth@1.0",
89 "android.hardware.bluetooth@1.1",
90 "android.system.suspend.control-ndk",
Zach Johnsonf736a2c2019-11-20 19:08:01 -080091 "libaaudio",
Michael Sun0e675332020-11-06 01:19:16 +000092 "libbinder_ndk",
93 "libcrypto",
Jack He65b2a572016-12-07 18:25:17 -080094 "libcutils",
95 "libdl",
Chris Manton615296f2020-06-16 08:58:34 -070096 "libflatbuffers-cpp",
Cheney Ni68ce2812018-11-08 16:41:02 +080097 "libfmq",
Andre Eisenbachb76bbdc2016-11-10 16:11:00 -080098 "libhidlbase",
Jack He65b2a572016-12-07 18:25:17 -080099 "liblog",
Suren Baghdasaryan270fee62018-12-19 17:36:37 -0800100 "libprocessgroup",
Jack He65b2a572016-12-07 18:25:17 -0800101 "libprotobuf-cpp-lite",
Jack He65b2a572016-12-07 18:25:17 -0800102 "libtinyxml2",
Michael Sun0e675332020-11-06 01:19:16 +0000103 "libutils",
Andre Eisenbachb76bbdc2016-11-10 16:11:00 -0800104 "libz",
Jack He65b2a572016-12-07 18:25:17 -0800105 ],
106 static_libs: [
Chris Manton878cadc2020-01-07 14:05:36 -0800107 "libbte",
Jack He65b2a572016-12-07 18:25:17 -0800108 "libbt-sbc-decoder",
109 "libbt-sbc-encoder",
Pavlin Radoslavov262b15d2017-01-03 16:53:18 -0800110 "libFraunhoferAAC",
Jakub Pawlowskif9a0e632017-11-24 15:19:54 -0800111 "libg722codec",
Jack He65b2a572016-12-07 18:25:17 -0800112 "libudrv-uipc",
Chris Manton28c4c582019-09-09 21:11:59 -0700113 "libbluetooth_gd", // Gabeldorsche
Zach Johnsona5a04022020-12-09 00:39:55 +0000114 "libbluetooth_rust_interop",
115 "libbt_common_ffi",
116 "libcxxbridge05",
Jack He65b2a572016-12-07 18:25:17 -0800117 ],
118 whole_static_libs: [
119 "libbt-bta",
Jack He63d2fa32018-07-25 21:43:01 -0700120 "libbt-common",
Jack He65b2a572016-12-07 18:25:17 -0800121 "libbtdevice",
122 "libbtif",
123 "libbt-hci",
Jack He65b2a572016-12-07 18:25:17 -0800124 "libbt-stack",
125 "libbt-utils",
126 "libbtcore",
127 "libosi",
Jack He9a30a9f2018-03-03 00:03:25 -0800128 "libbt-protos-lite",
Jack He65b2a572016-12-07 18:25:17 -0800129 ],
130 // Shared library link options.
131 // References to global symbols and functions should bind to the library
132 // itself. This is to avoid issues with some of the unit/system tests
133 // that might link statically with some of the code in the library, and
134 // also dlopen(3) the shared library.
135 ldflags: ["-Wl,-Bsymbolic,-Bsymbolic-functions"],
136 required: [
137 "bt_did.conf",
138 "bt_stack.conf",
Jack He65b2a572016-12-07 18:25:17 -0800139 "libldacBT_enc",
Pavlin Radoslavovc7d2d872017-03-28 18:40:32 -0700140 "libldacBT_abr",
Jack He65b2a572016-12-07 18:25:17 -0800141 ],
142 cflags: [
143 "-DBUILDCFG",
144 ],
Peter Collingbournefc97afd2018-12-06 17:04:43 -0800145 sanitize: {
146 scs: true,
147 },
Jack He65b2a572016-12-07 18:25:17 -0800148}
Pavlin Radoslavov96e9e342017-11-02 14:27:09 -0700149
150cc_library_static {
151 name: "libbluetooth-for-tests",
152 defaults: ["fluoride_defaults"],
153
154 srcs: [
Chris Manton28c4c582019-09-09 21:11:59 -0700155 ":LibBluetoothSources",
Chris Manton011f6a72019-12-15 13:20:13 -0800156 ":LibBluetoothShimSources",
Pavlin Radoslavov96e9e342017-11-02 14:27:09 -0700157 ],
Chris Manton3ee967b2019-11-05 11:39:07 -0800158 host_supported: true,
Pavlin Radoslavov96e9e342017-11-02 14:27:09 -0700159 include_dirs: [
160 "packages/modules/Bluetooth/system",
Jakub Pawlowskid4e47052020-02-16 01:03:04 +0100161 "packages/modules/Bluetooth/system/gd",
Pavlin Radoslavov96e9e342017-11-02 14:27:09 -0700162 "packages/modules/Bluetooth/system/bta/include",
163 "packages/modules/Bluetooth/system/btcore/include",
164 "packages/modules/Bluetooth/system/btif/include",
165 "packages/modules/Bluetooth/system/hci/include",
166 "packages/modules/Bluetooth/system/internal_include",
167 "packages/modules/Bluetooth/system/stack/include",
168 "packages/modules/Bluetooth/system/utils/include",
169 ],
Jakub Pawlowskid4e47052020-02-16 01:03:04 +0100170 generated_headers: [
Chris Manton2e143092020-07-22 12:42:20 -0700171 "BluetoothGeneratedBundlerSchema_h_bfbs",
Jakub Pawlowskid4e47052020-02-16 01:03:04 +0100172 "BluetoothGeneratedPackets_h",
Chris Mantoned1c08b2020-06-26 22:17:14 -0700173 "BluetoothGeneratedDumpsysDataSchema_h",
Jakub Pawlowskid4e47052020-02-16 01:03:04 +0100174 ],
Pavlin Radoslavov96e9e342017-11-02 14:27:09 -0700175 cflags: [
176 "-DBUILDCFG",
177 ],
Chris Manton615296f2020-06-16 08:58:34 -0700178 shared_libs: [
179 "libflatbuffers-cpp",
180 ],
Jakub Pawlowskid4e47052020-02-16 01:03:04 +0100181 whole_static_libs: [
182 "libbluetooth_gd", // Gabeldorsche
Chris Manton3ee967b2019-11-05 11:39:07 -0800183 ],
184}