blob: 1ef608fb1519c08a3d7e99465fff1e559f2c2b59 [file] [log] [blame]
Jack Hee2eeff42016-12-07 18:25:17 -08001// Bluetooth main HW module / shared library for target
2// ========================================================
Chris Manton1bb0e512019-09-09 21:11:59 -07003filegroup {
4 name: "LibBluetoothSources",
5 srcs: [
6 "bte_conf.cc",
7 "bte_init.cc",
8 "bte_init_cpp_logging.cc",
9 "bte_logmsg.cc",
10 "bte_main.cc",
Chris Mantonfaedfe22019-10-01 11:26:49 -070011 "shim/btm.cc",
12 "shim/btm_api.cc",
Chris Manton229de742019-09-10 11:23:13 -070013 "shim/controller.cc",
Chris Manton1bb0e512019-09-09 21:11:59 -070014 "shim/entry.cc",
Chris Manton2f7e1602019-09-30 10:52:55 -070015 "shim/hci_layer.cc",
16 "shim/l2c_api.cc",
17 "shim/l2cap.cc",
Chris Manton1bb0e512019-09-09 21:11:59 -070018 "shim/shim.cc",
19 "stack_config.cc",
20 ]
21}
22
Jack Hee2eeff42016-12-07 18:25:17 -080023cc_library_shared {
Jakub Pawlowskie56fabc2017-10-19 00:26:09 -070024 name: "libbluetooth",
Jack Hee2eeff42016-12-07 18:25:17 -080025 defaults: ["fluoride_defaults"],
Jakub Pawlowskie56fabc2017-10-19 00:26:09 -070026 header_libs: ["libbluetooth_headers"],
27 export_header_lib_headers: ["libbluetooth_headers"],
Jack Hee2eeff42016-12-07 18:25:17 -080028 srcs: [
Chris Manton1bb0e512019-09-09 21:11:59 -070029 ":LibBluetoothSources",
Jack Hee2eeff42016-12-07 18:25:17 -080030 ],
31 include_dirs: [
32 "system/bt",
33 "system/bt/bta/include",
34 "system/bt/bta/sys",
35 "system/bt/bta/dm",
36 "system/bt/btcore/include",
Jakub Pawlowskiecace462017-10-17 16:40:41 -070037 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -080038 "system/bt/stack/include",
39 "system/bt/stack/l2cap",
40 "system/bt/stack/a2dp",
41 "system/bt/stack/btm",
42 "system/bt/stack/avdt",
43 "system/bt/udrv/include",
44 "system/bt/btif/include",
45 "system/bt/btif/co",
46 "system/bt/hci/include",
47 "system/bt/vnd/include",
48 "system/bt/embdrv/sbc/encoder/include",
49 "system/bt/embdrv/sbc/decoder/include",
Jack Hee2eeff42016-12-07 18:25:17 -080050 "system/bt/utils/include",
Martin Brabham9a3f38b2019-02-01 13:42:58 -080051 "system/security/keystore/include",
52 "hardware/interfaces/keymaster/4.0/support/include",
Jack Hee2eeff42016-12-07 18:25:17 -080053 ],
54 logtags: ["../EventLogTags.logtags"],
55 shared_libs: [
Andre Eisenbach796523d2016-11-10 16:11:00 -080056 "android.hardware.bluetooth@1.0",
Sunny Kapdid66d9542018-02-12 21:52:50 -080057 "android.hardware.bluetooth.a2dp@1.0",
Cheney Niad05f3e2018-11-08 16:41:02 +080058 "android.hardware.bluetooth.audio@2.0",
Andre Eisenbach796523d2016-11-10 16:11:00 -080059 "libaudioclient",
Jack Hee2eeff42016-12-07 18:25:17 -080060 "libcutils",
61 "libdl",
Cheney Niad05f3e2018-11-08 16:41:02 +080062 "libfmq",
Andre Eisenbach796523d2016-11-10 16:11:00 -080063 "libhidlbase",
Jack Hee2eeff42016-12-07 18:25:17 -080064 "liblog",
Suren Baghdasaryan08bea742018-12-19 17:36:37 -080065 "libprocessgroup",
Jack Hee2eeff42016-12-07 18:25:17 -080066 "libprotobuf-cpp-lite",
Jack Hee2eeff42016-12-07 18:25:17 -080067 "libutils",
68 "libtinyxml2",
Andre Eisenbach796523d2016-11-10 16:11:00 -080069 "libz",
Jack He78b69d92018-11-16 02:59:43 -080070 "libcrypto",
Martin Brabham9a3f38b2019-02-01 13:42:58 -080071 "android.hardware.keymaster@4.0",
72 "android.hardware.keymaster@3.0",
73 "libkeymaster4support",
74 "libkeystore_aidl",
75 "libkeystore_binder",
76 "libkeystore_parcelables",
Jack Hee2eeff42016-12-07 18:25:17 -080077 ],
78 static_libs: [
79 "libbt-sbc-decoder",
80 "libbt-sbc-encoder",
Pavlin Radoslavovd5f49602017-01-03 16:53:18 -080081 "libFraunhoferAAC",
Jakub Pawlowski2fd870e2017-11-24 15:19:54 -080082 "libg722codec",
Jack Hee2eeff42016-12-07 18:25:17 -080083 "libudrv-uipc",
Chris Manton1bb0e512019-09-09 21:11:59 -070084 "libbluetooth_gd", // Gabeldorsche
Jack Hee2eeff42016-12-07 18:25:17 -080085 ],
86 whole_static_libs: [
87 "libbt-bta",
Jack He6d110522018-07-25 21:43:01 -070088 "libbt-common",
Jack Hee2eeff42016-12-07 18:25:17 -080089 "libbtdevice",
90 "libbtif",
91 "libbt-hci",
Jack Hee2eeff42016-12-07 18:25:17 -080092 "libbt-stack",
93 "libbt-utils",
94 "libbtcore",
95 "libosi",
Jack Head18de02018-03-03 00:03:25 -080096 "libbt-protos-lite",
Jack Hee2eeff42016-12-07 18:25:17 -080097 ],
98 // Shared library link options.
99 // References to global symbols and functions should bind to the library
100 // itself. This is to avoid issues with some of the unit/system tests
101 // that might link statically with some of the code in the library, and
102 // also dlopen(3) the shared library.
103 ldflags: ["-Wl,-Bsymbolic,-Bsymbolic-functions"],
104 required: [
105 "bt_did.conf",
106 "bt_stack.conf",
Jack Hee2eeff42016-12-07 18:25:17 -0800107 "libldacBT_enc",
Pavlin Radoslavove4f2b612017-03-28 18:40:32 -0700108 "libldacBT_abr",
Jack Hee2eeff42016-12-07 18:25:17 -0800109 ],
110 cflags: [
111 "-DBUILDCFG",
112 ],
Peter Collingbourne6fe96ce2018-12-06 17:04:43 -0800113 sanitize: {
114 scs: true,
115 },
Jack Hee2eeff42016-12-07 18:25:17 -0800116}
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700117
118cc_library_static {
119 name: "libbluetooth-for-tests",
120 defaults: ["fluoride_defaults"],
121
122 srcs: [
Chris Manton1bb0e512019-09-09 21:11:59 -0700123 ":LibBluetoothSources",
124 "shim/entry_for_test.cc",
Pavlin Radoslavov4aecb892017-11-02 14:27:09 -0700125 ],
126 include_dirs: [
127 "system/bt",
128 "system/bt/bta/include",
129 "system/bt/btcore/include",
130 "system/bt/btif/include",
131 "system/bt/hci/include",
132 "system/bt/internal_include",
133 "system/bt/stack/include",
134 "system/bt/utils/include",
135 ],
136 cflags: [
137 "-DBUILDCFG",
138 ],
139}