summaryrefslogtreecommitdiff
path: root/system/test/headless/Android.bp
blob: 0cafcfba63aed79df196d9b434c792631c7bcdd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
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: [
        "-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: [
        "aics",
        "android.hardware.audio.common@5.0",
        "android.hardware.common-V2-ndk",
        "android.hardware.common.fmq-V1-ndk",
        "avrcp-target-service",
        "bluetooth_flags_c_lib",
        "lib-bt-packets",
        "lib-bt-packets-avrcp",
        "lib-bt-packets-base",
        "libFraunhoferAAC",
        "libbase",
        "libbluetooth-types",
        "libbluetooth_core_rs",
        "libbluetooth_crypto_toolbox",
        "libbluetooth_gd",
        "libbluetooth_log",
        "libbt-audio-asrc",
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-hci",
        "libbt-jni-thread",
        "libbt-sbc-decoder",
        "libbt-sbc-encoder",
        "libbt-stack",
        "libbtcore",
        "libbtdevice",
        "libbte",
        "libbtif",
        "libchrome",
        "libcom.android.sysprop.bluetooth.wrapped",
        "libevent",
        "libflags_rust_cpp_bridge",
        "libflatbuffers-cpp",
        "libfmq",
        "libg722codec",
        "liblc3",
        "libmodpb64",
        "libopus",
        "libosi",
        "libprotobuf-cpp-lite",
        "libstatslog_bt",
        "libudrv-uipc",
        "libz",
    ],
    aidl: {
        libs: ["bluetooth_constants"],
    },
    shared_libs: [
        "libPlatformProperties",
        "libaconfig_storage_read_api_cc",
        "libbinder",
        "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",
                "libexpresslog",
                "libperfetto_client_experimental",
                "libstatslog_express",
                "libtextclassifier_hash_static",
            ],
            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",
            ],
        },
    },
}