1// Common variables 2// ======================================================== 3btifCommonIncludes = [ 4 "system/bt", 5 "system/bt/bta/include", 6 "system/bt/bta/sys", 7 "system/bt/bta/dm", 8 "system/bt/btcore/include", 9 "system/bt/device/include", 10 "system/bt/internal_include", 11 "system/bt/stack/include", 12 "system/bt/stack/l2cap", 13 "system/bt/stack/a2dp", 14 "system/bt/stack/btm", 15 "system/bt/stack/avdt", 16 "system/bt/udrv/include", 17 "system/bt/btif/avrcp", 18 "system/bt/btif/include", 19 "system/bt/btif/co", 20 "system/bt/hci/include", 21 "system/bt/vnd/include", 22 "system/bt/embdrv/sbc/encoder/include", 23 "system/bt/embdrv/sbc/decoder/include", 24 "system/bt/utils/include", 25 "system/bt/include", 26 "system/libhwbinder/include", 27] 28 29// libbtif static library for target 30// ======================================================== 31cc_library_static { 32 name: "libbtif", 33 defaults: ["fluoride_defaults"], 34 include_dirs: btifCommonIncludes, 35 srcs: [ 36 // AVRCP Target Service 37 "avrcp/avrcp_service.cc", 38 // Callouts 39 "co/bta_dm_co.cc", 40 "co/bta_av_co.cc", 41 "co/bta_hh_co.cc", 42 "co/bta_pan_co.cc", 43 "co/bta_gatts_co.cc", 44 // HAL layer 45 "src/bluetooth.cc", 46 // BTIF implementation 47 "src/btif_a2dp.cc", 48 "src/btif_a2dp_audio_interface.cc", 49 "src/btif_a2dp_control.cc", 50 "src/btif_a2dp_sink.cc", 51 "src/btif_a2dp_source.cc", 52 "src/btif_av.cc", 53 "src/btif_avrcp_audio_track.cc", 54 "src/btif_ble_advertiser.cc", 55 "src/btif_ble_scanner.cc", 56 "src/btif_bqr.cc", 57 "src/btif_config.cc", 58 "src/btif_config_cache.cc", 59 "src/btif_config_transcode.cc", 60 "src/btif_core.cc", 61 "src/btif_debug.cc", 62 "src/btif_debug_btsnoop.cc", 63 "src/btif_debug_conn.cc", 64 "src/btif_dm.cc", 65 "src/btif_gatt.cc", 66 "src/btif_gatt_client.cc", 67 "src/btif_gatt_server.cc", 68 "src/btif_gatt_test.cc", 69 "src/btif_gatt_util.cc", 70 "src/btif_hearing_aid.cc", 71 "src/btif_hf.cc", 72 "src/btif_hf_client.cc", 73 "src/btif_hh.cc", 74 "src/btif_hd.cc", 75 "src/btif_mce.cc", 76 "src/btif_pan.cc", 77 "src/btif_profile_queue.cc", 78 "src/btif_rc.cc", 79 "src/btif_sdp.cc", 80 "src/btif_sdp_server.cc", 81 "src/btif_sock.cc", 82 "src/btif_sock_rfc.cc", 83 "src/btif_sock_l2cap.cc", 84 "src/btif_sock_sco.cc", 85 "src/btif_sock_sdp.cc", 86 "src/btif_sock_thread.cc", 87 "src/btif_sock_util.cc", 88 "src/btif_storage.cc", 89 "src/btif_uid.cc", 90 "src/btif_util.cc", 91 "src/btif_keystore.cc", 92 "src/stack_manager.cc", 93 ], 94 header_libs: [ 95 "libmedia_headers", 96 ], 97 shared_libs: [ 98 "libaaudio", 99 "libcutils", 100 "libfmq", 101 "liblog", 102 "libz", 103 "libtinyxml2", 104 "android.hardware.bluetooth.a2dp@1.0", 105 "android.hardware.bluetooth.audio@2.0", 106 "libhidlbase", 107 "libutils", 108 "libcrypto", 109 ], 110 whole_static_libs: [ 111 "avrcp-target-service", 112 "libaudio-a2dp-hw-utils", 113 "lib-bt-packets", 114 "libbt-audio-hal-interface", 115 ], 116 cflags: [ 117 "-DBUILDCFG", 118 ], 119 120} 121 122// btif unit tests for target 123// ======================================================== 124cc_test { 125 name: "net_test_btif", 126 defaults: ["fluoride_defaults"], 127 test_suites: ["device-tests"], 128 include_dirs: btifCommonIncludes, 129 srcs: [ 130 "test/btif_storage_test.cc", 131 ], 132 header_libs: ["libbluetooth_headers"], 133 shared_libs: [ 134 "libaaudio", 135 "android.hardware.bluetooth@1.0", 136 "android.hardware.bluetooth.a2dp@1.0", 137 "android.hardware.bluetooth.audio@2.0", 138 "libfmq", 139 "libhidlbase", 140 "liblog", 141 "libprotobuf-cpp-lite", 142 "libcutils", 143 "libprocessgroup", 144 "libutils", 145 "libcrypto", 146 ], 147 static_libs: [ 148 "libbt-bta", 149 "libbtcore", 150 "libbt-common", 151 "libbt-stack", 152 "libbt-sbc-decoder", 153 "libbt-sbc-encoder", 154 "libbt-utils", 155 "libFraunhoferAAC", 156 "libg722codec", 157 "libbtdevice", 158 "libbt-hci", 159 "libudrv-uipc", 160 "libbluetooth-types", 161 "libosi", 162 "libbt-protos-lite", 163 ], 164 whole_static_libs: [ 165 "libbtif", 166 "libbluetooth-for-tests", 167 ], 168 cflags: ["-DBUILDCFG"], 169 sanitize: { 170 integer_overflow: true, 171 }, 172} 173 174// btif profile queue unit tests for target 175// ======================================================== 176cc_test { 177 name: "net_test_btif_profile_queue", 178 defaults: ["fluoride_defaults"], 179 test_suites: ["device-tests"], 180 include_dirs: btifCommonIncludes, 181 srcs: [ 182 "src/btif_profile_queue.cc", 183 "test/btif_profile_queue_test.cc", 184 ], 185 header_libs: ["libbluetooth_headers"], 186 shared_libs: [ 187 "liblog", 188 "libcutils", 189 ], 190 static_libs: [ 191 "libbluetooth-types", 192 "libosi", 193 ], 194 cflags: ["-DBUILDCFG"], 195} 196 197// btif rc unit tests for target 198// ======================================================== 199cc_test { 200 name: "net_test_btif_rc", 201 defaults: ["fluoride_defaults"], 202 test_suites: ["device-tests"], 203 host_supported: true, 204 include_dirs: btifCommonIncludes, 205 srcs: [ 206 "test/btif_rc_test.cc", 207 ], 208 header_libs: ["libbluetooth_headers"], 209 shared_libs: [ 210 "libcrypto", 211 "libcutils", 212 "liblog", 213 "libprotobuf-cpp-lite", 214 ], 215 static_libs: [ 216 "libbluetooth-types", 217 "libbt-common", 218 "libbt-protos-lite", 219 "libosi", 220 "libosi-AllocationTestHarness", 221 ], 222 cflags: ["-DBUILDCFG"], 223 sanitize: { 224 address: true, 225 cfi: true, 226 misc_undefined: ["bounds"], 227 }, 228} 229 230// btif config cache unit tests for target 231// ======================================================== 232cc_test { 233 name: "net_test_btif_config_cache", 234 defaults: ["fluoride_defaults"], 235 test_suites: ["device-tests"], 236 host_supported: true, 237 include_dirs: btifCommonIncludes, 238 srcs: [ 239 "src/btif_config_cache.cc", 240 "test/btif_config_cache_test.cc", 241 ], 242 header_libs: ["libbluetooth_headers"], 243 shared_libs: [ 244 "liblog", 245 "libcutils", 246 ], 247 static_libs: [ 248 "libbluetooth-types", 249 "libosi", 250 "libgmock", 251 "libc++fs", 252 ], 253 cflags: ["-DBUILDCFG"], 254} 255 256// btif hf client service tests for target 257// ======================================================== 258cc_test { 259 name: "net_test_btif_hf_client_service", 260 defaults: ["fluoride_defaults"], 261 test_suites: ["device-tests"], 262 include_dirs: btifCommonIncludes, 263 srcs: [ 264 "test/btif_hf_client_service_test.cc", 265 ], 266 header_libs: ["libbluetooth_headers"], 267 shared_libs: [ 268 "libcutils", 269 "liblog", 270 ], 271 static_libs: [ 272 "libbluetooth-types", 273 "libosi", 274 ], 275 cflags: ["-DBUILDCFG"], 276} 277