package { // See: http://go/android-license-faq // A large-scale-change added 'default_applicable_licenses' to import // all of the 'license_kinds' from "system_bt_license" // to get the below license kinds: // SPDX-license-identifier-Apache-2.0 default_applicable_licenses: ["system_bt_license"], } sh_binary { name: "headless_build_timestamp", host_supported: true, src: "tools/build_timestamp.sh", } genrule { name: "HeadlessBuildTimestamp", tools: [ "headless_build_timestamp", ], cmd: "$(location headless_build_timestamp) > $(out)", out: [ "build_timestamp.h", ], } cc_binary { name: "bt_headless", host_supported: true, defaults: [ "fluoride_defaults", "latest_android_hardware_audio_common_ndk_static", "latest_android_hardware_bluetooth_audio_ndk_android_static", "latest_android_hardware_bluetooth_audio_ndk_static", "latest_android_media_audio_common_types_ndk_static", ], cflags: [ "-Wall", "-Werror", "-Wextra", "-Wno-date-time", ], generated_headers: [ "HeadlessBuildTimestamp", ], srcs: [ "adapter/adapter.cc", "bt_stack_info.cc", "connect/connect.cc", "discovery/discovery.cc", "dumpsys/dumpsys.cc", "get_options.cc", "handler.cc", "headless.cc", "log.cc", "main.cc", "messenger.cc", "mode/mode.cc", "nop/nop.cc", "pairing/pairing.cc", "property.cc", "read/name.cc", "read/read.cc", "scan/scan.cc", "sdp/sdp.cc", "sdp/sdp_db.cc", "text.cc", "util.cc", ], include_dirs: [ "packages/modules/Bluetooth/system", "packages/modules/Bluetooth/system/gd", "packages/modules/Bluetooth/system/include", "packages/modules/Bluetooth/system/stack/include", ], static_libs: [ "android.hardware.audio.common@5.0", "android.hardware.bluetooth.a2dp@1.0", "android.hardware.common-V2-ndk", "android.hardware.common.fmq-V1-ndk", "avrcp-target-service", "lib-bt-packets", "lib-bt-packets-avrcp", "lib-bt-packets-base", "libFraunhoferAAC", "libaudio-a2dp-hw-utils", "libbase", "libbluetooth-dumpsys", "libbluetooth-gdx", "libbluetooth-types", "libbluetooth_core_rs", "libbluetooth_crypto_toolbox", "libbluetooth_gd", "libbluetooth_log", "libbluetooth_rust_interop", "libbt-audio-asrc", "libbt-audio-hal-interface", "libbt-bta", "libbt-bta-core", "libbt-btu-main-thread", "libbt-common", "libbt-hci", "libbt-jni-thread", "libbt-sbc-decoder", "libbt-sbc-encoder", "libbt-stack", "libbt-stack-core", "libbt_shim_bridge", "libbt_shim_ffi", "libbtcore", "libbtdevice", "libbte", "libbtif", "libbtif-core", "libchrome", "libevent", "libflatbuffers-cpp", "libfmq", "libg722codec", "liblc3", "libmodpb64", "libopus", "libosi", "libprotobuf-cpp-lite", "libstatslog_bt", "libudrv-uipc", "libz", ], shared_libs: [ "libPlatformProperties", "libaconfig_storage_read_api_cc", "libcrypto", "libcutils", // property_get_bool "libhidlbase", "libjsoncpp", "liblog", // __android_log_print "libutils", "server_configurable_flags", ], header_libs: ["libbluetooth_headers"], target: { android: { static_libs: [ "android.hardware.bluetooth.audio@2.0", "android.hardware.bluetooth.audio@2.1", "android.hardware.bluetooth@1.0", "android.hardware.bluetooth@1.1", "android.system.suspend.control-V1-ndk", ], shared_libs: [ "android.system.suspend-V1-ndk", "libaaudio", "libbinder_ndk", "libstatssocket", ], }, host: { static_libs: [ "android.hardware.bluetooth.audio@2.0", "android.hardware.bluetooth.audio@2.1", "libbinder_ndk", ], }, }, }