1genrule { 2 name: "BluetoothGeneratedPacketsHci_h", 3 defaults: ["BluetoothGeneratedPackets_default"], 4 srcs: ["hci_packets.pdl"], 5 out: ["hci/hci_packets.h"], 6 visibility: ["//visibility:private"], 7} 8 9cc_library_headers { 10 name: "libbluetooth_hci_pdl_header", 11 vendor_available: true, 12 export_include_dirs: [ 13 "include", 14 ], 15 generated_headers: [ 16 "BluetoothGeneratedPacketsHci_h", 17 ], 18 export_generated_headers: [ 19 "BluetoothGeneratedPacketsHci_h", 20 ], 21 host_supported: true, 22 apex_available: [ 23 "com.android.btservices", 24 ], 25 min_sdk_version: "33", 26} 27 28cc_library_static { 29 name: "libbluetooth_hci_pdl", 30 vendor_available: true, 31 srcs: [ 32 "address.cc", 33 "class_of_device.cc", 34 ], 35 header_libs: [ 36 "libbluetooth_hci_pdl_header", 37 ], 38 export_header_lib_headers: [ 39 "libbluetooth_hci_pdl_header", 40 ], 41 // TODO remove this 42 // Directly add the common library + the os library as a dependency that export their header_libs 43 include_dirs: [ 44 "packages/modules/Bluetooth/system/gd", 45 ], 46 host_supported: true, 47 visibility: [ 48 "//hardware/interfaces/bluetooth/aidl/vts", 49 "//packages/modules/Bluetooth/system:__subpackages__", 50 ], 51 apex_available: [ 52 "com.android.btservices", 53 ], 54 min_sdk_version: "33", 55} 56 57// Generate the python parser+serializer backend 58genrule { 59 name: "gd_hci_packets_python3_gen", 60 defaults: ["pdl_python_generator_defaults"], 61 cmd: "$(location :pdlc) $(in) |" + 62 " $(location :pdl_python_generator)" + 63 " --output $(out) --custom-type-location blueberry.utils.bluetooth", 64 srcs: [ 65 "hci_packets.pdl", 66 ], 67 out: [ 68 "hci_packets.py", 69 ], 70} 71