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 "//vendor:__subpackages__", 51 ], 52 apex_available: [ 53 "com.android.btservices", 54 ], 55 min_sdk_version: "33", 56} 57 58// Generate the python parser+serializer backend 59genrule { 60 name: "gd_hci_packets_python3_gen", 61 defaults: ["pdl_python_generator_defaults"], 62 cmd: "$(location :pdlc) $(in) |" + 63 " $(location :pdl_python_generator)" + 64 " --output $(out) --custom-type-location blueberry.utils.bluetooth", 65 srcs: [ 66 "hci_packets.pdl", 67 ], 68 out: [ 69 "hci_packets.py", 70 ], 71} 72