Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 1 | // Bluetooth main HW module / shared library for target |
| 2 | // ======================================================== |
Chris Manton | 28c4c58 | 2019-09-09 21:11:59 -0700 | [diff] [blame] | 3 | filegroup { |
| 4 | name: "LibBluetoothSources", |
| 5 | srcs: [ |
| 6 | "bte_conf.cc", |
Chris Manton | 28c4c58 | 2019-09-09 21:11:59 -0700 | [diff] [blame] | 7 | "bte_init_cpp_logging.cc", |
| 8 | "bte_logmsg.cc", |
| 9 | "bte_main.cc", |
Chris Manton | 28c4c58 | 2019-09-09 21:11:59 -0700 | [diff] [blame] | 10 | "stack_config.cc", |
| 11 | ] |
| 12 | } |
| 13 | |
Chris Manton | 878cadc | 2020-01-07 14:05:36 -0800 | [diff] [blame] | 14 | cc_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 Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 23 | "packages/modules/Bluetooth/system/gd", |
Chris Manton | 878cadc | 2020-01-07 14:05:36 -0800 | [diff] [blame] | 24 | "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 Manton | 615296f | 2020-06-16 08:58:34 -0700 | [diff] [blame] | 45 | shared_libs: [ |
| 46 | "libflatbuffers-cpp", |
| 47 | ], |
Jakub Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 48 | generated_headers: [ |
Chris Manton | 2e14309 | 2020-07-22 12:42:20 -0700 | [diff] [blame] | 49 | "BluetoothGeneratedBundlerSchema_h_bfbs", |
Chris Manton | ed1c08b | 2020-06-26 22:17:14 -0700 | [diff] [blame] | 50 | "BluetoothGeneratedDumpsysDataSchema_h", |
Jakub Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 51 | "BluetoothGeneratedPackets_h", |
| 52 | ], |
Chris Manton | 878cadc | 2020-01-07 14:05:36 -0800 | [diff] [blame] | 53 | host_supported: true, |
| 54 | } |
| 55 | |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 56 | cc_library_shared { |
Jakub Pawlowski | a75a654 | 2017-10-19 00:26:09 -0700 | [diff] [blame] | 57 | name: "libbluetooth", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 58 | defaults: ["fluoride_defaults"], |
Jakub Pawlowski | a75a654 | 2017-10-19 00:26:09 -0700 | [diff] [blame] | 59 | header_libs: ["libbluetooth_headers"], |
| 60 | export_header_lib_headers: ["libbluetooth_headers"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 61 | 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 Pawlowski | 9e9eb4b | 2017-10-17 16:40:41 -0700 | [diff] [blame] | 67 | "packages/modules/Bluetooth/system/internal_include", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 68 | "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 He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 80 | "packages/modules/Bluetooth/system/utils/include", |
Martin Brabham | f1e5738 | 2019-02-01 13:42:58 -0800 | [diff] [blame] | 81 | "system/security/keystore/include", |
| 82 | "hardware/interfaces/keymaster/4.0/support/include", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 83 | ], |
| 84 | logtags: ["../../EventLogTags.logtags"], |
| 85 | shared_libs: [ |
Sunny Kapdi | 42b0821 | 2018-02-12 21:52:50 -0800 | [diff] [blame] | 86 | "android.hardware.bluetooth.a2dp@1.0", |
Cheney Ni | 68ce281 | 2018-11-08 16:41:02 +0800 | [diff] [blame] | 87 | "android.hardware.bluetooth.audio@2.0", |
Michael Sun | 0e67533 | 2020-11-06 01:19:16 +0000 | [diff] [blame] | 88 | "android.hardware.bluetooth@1.0", |
| 89 | "android.hardware.bluetooth@1.1", |
| 90 | "android.system.suspend.control-ndk", |
Zach Johnson | f736a2c | 2019-11-20 19:08:01 -0800 | [diff] [blame] | 91 | "libaaudio", |
Michael Sun | 0e67533 | 2020-11-06 01:19:16 +0000 | [diff] [blame] | 92 | "libbinder_ndk", |
| 93 | "libcrypto", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 94 | "libcutils", |
| 95 | "libdl", |
Chris Manton | 615296f | 2020-06-16 08:58:34 -0700 | [diff] [blame] | 96 | "libflatbuffers-cpp", |
Cheney Ni | 68ce281 | 2018-11-08 16:41:02 +0800 | [diff] [blame] | 97 | "libfmq", |
Andre Eisenbach | b76bbdc | 2016-11-10 16:11:00 -0800 | [diff] [blame] | 98 | "libhidlbase", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 99 | "liblog", |
Suren Baghdasaryan | 270fee6 | 2018-12-19 17:36:37 -0800 | [diff] [blame] | 100 | "libprocessgroup", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 101 | "libprotobuf-cpp-lite", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 102 | "libtinyxml2", |
Michael Sun | 0e67533 | 2020-11-06 01:19:16 +0000 | [diff] [blame] | 103 | "libutils", |
Andre Eisenbach | b76bbdc | 2016-11-10 16:11:00 -0800 | [diff] [blame] | 104 | "libz", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 105 | ], |
| 106 | static_libs: [ |
Chris Manton | 878cadc | 2020-01-07 14:05:36 -0800 | [diff] [blame] | 107 | "libbte", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 108 | "libbt-sbc-decoder", |
| 109 | "libbt-sbc-encoder", |
Pavlin Radoslavov | 262b15d | 2017-01-03 16:53:18 -0800 | [diff] [blame] | 110 | "libFraunhoferAAC", |
Jakub Pawlowski | f9a0e63 | 2017-11-24 15:19:54 -0800 | [diff] [blame] | 111 | "libg722codec", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 112 | "libudrv-uipc", |
Chris Manton | 28c4c58 | 2019-09-09 21:11:59 -0700 | [diff] [blame] | 113 | "libbluetooth_gd", // Gabeldorsche |
Zach Johnson | a5a0402 | 2020-12-09 00:39:55 +0000 | [diff] [blame^] | 114 | "libbluetooth_rust_interop", |
| 115 | "libbt_common_ffi", |
| 116 | "libcxxbridge05", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 117 | ], |
| 118 | whole_static_libs: [ |
| 119 | "libbt-bta", |
Jack He | 63d2fa3 | 2018-07-25 21:43:01 -0700 | [diff] [blame] | 120 | "libbt-common", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 121 | "libbtdevice", |
| 122 | "libbtif", |
| 123 | "libbt-hci", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 124 | "libbt-stack", |
| 125 | "libbt-utils", |
| 126 | "libbtcore", |
| 127 | "libosi", |
Jack He | 9a30a9f | 2018-03-03 00:03:25 -0800 | [diff] [blame] | 128 | "libbt-protos-lite", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 129 | ], |
| 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 He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 139 | "libldacBT_enc", |
Pavlin Radoslavov | c7d2d87 | 2017-03-28 18:40:32 -0700 | [diff] [blame] | 140 | "libldacBT_abr", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 141 | ], |
| 142 | cflags: [ |
| 143 | "-DBUILDCFG", |
| 144 | ], |
Peter Collingbourne | fc97afd | 2018-12-06 17:04:43 -0800 | [diff] [blame] | 145 | sanitize: { |
| 146 | scs: true, |
| 147 | }, |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 148 | } |
Pavlin Radoslavov | 96e9e34 | 2017-11-02 14:27:09 -0700 | [diff] [blame] | 149 | |
| 150 | cc_library_static { |
| 151 | name: "libbluetooth-for-tests", |
| 152 | defaults: ["fluoride_defaults"], |
| 153 | |
| 154 | srcs: [ |
Chris Manton | 28c4c58 | 2019-09-09 21:11:59 -0700 | [diff] [blame] | 155 | ":LibBluetoothSources", |
Chris Manton | 011f6a7 | 2019-12-15 13:20:13 -0800 | [diff] [blame] | 156 | ":LibBluetoothShimSources", |
Pavlin Radoslavov | 96e9e34 | 2017-11-02 14:27:09 -0700 | [diff] [blame] | 157 | ], |
Chris Manton | 3ee967b | 2019-11-05 11:39:07 -0800 | [diff] [blame] | 158 | host_supported: true, |
Pavlin Radoslavov | 96e9e34 | 2017-11-02 14:27:09 -0700 | [diff] [blame] | 159 | include_dirs: [ |
| 160 | "packages/modules/Bluetooth/system", |
Jakub Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 161 | "packages/modules/Bluetooth/system/gd", |
Pavlin Radoslavov | 96e9e34 | 2017-11-02 14:27:09 -0700 | [diff] [blame] | 162 | "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 Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 170 | generated_headers: [ |
Chris Manton | 2e14309 | 2020-07-22 12:42:20 -0700 | [diff] [blame] | 171 | "BluetoothGeneratedBundlerSchema_h_bfbs", |
Jakub Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 172 | "BluetoothGeneratedPackets_h", |
Chris Manton | ed1c08b | 2020-06-26 22:17:14 -0700 | [diff] [blame] | 173 | "BluetoothGeneratedDumpsysDataSchema_h", |
Jakub Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 174 | ], |
Pavlin Radoslavov | 96e9e34 | 2017-11-02 14:27:09 -0700 | [diff] [blame] | 175 | cflags: [ |
| 176 | "-DBUILDCFG", |
| 177 | ], |
Chris Manton | 615296f | 2020-06-16 08:58:34 -0700 | [diff] [blame] | 178 | shared_libs: [ |
| 179 | "libflatbuffers-cpp", |
| 180 | ], |
Jakub Pawlowski | d4e4705 | 2020-02-16 01:03:04 +0100 | [diff] [blame] | 181 | whole_static_libs: [ |
| 182 | "libbluetooth_gd", // Gabeldorsche |
Chris Manton | 3ee967b | 2019-11-05 11:39:07 -0800 | [diff] [blame] | 183 | ], |
| 184 | } |