• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// libbtcore static library for target and host
2// ========================================================
3package {
4    // See: http://go/android-license-faq
5    // A large-scale-change added 'default_applicable_licenses' to import
6    // all of the 'license_kinds' from "system_bt_license"
7    // to get the below license kinds:
8    //   SPDX-license-identifier-Apache-2.0
9    default_applicable_licenses: ["system_bt_license"],
10}
11
12cc_library_static {
13    name: "libbtcore",
14    defaults: ["fluoride_defaults"],
15    local_include_dirs: ["include"],
16    include_dirs: ["system/bt"],
17    srcs: [
18        "src/device_class.cc",
19        "src/hal_util.cc",
20        "src/module.cc",
21        "src/osi_module.cc",
22        "src/property.cc",
23    ],
24    shared_libs: [
25        "liblog",
26    ],
27    header_libs: ["libbluetooth_headers"],
28    host_supported: true,
29    target: {
30        linux_glibc: {
31            cflags: ["-D_GNU_SOURCE"],
32        },
33    },
34}
35
36// Note: It's good to get the tests compiled both for the host and the target so
37// we get to test with both Bionic libc and glibc
38// libbtcore unit tests for target and host
39// ========================================================
40cc_test {
41    name: "net_test_btcore",
42    test_suites: ["device-tests"],
43    defaults: ["fluoride_defaults"],
44    local_include_dirs: ["include"],
45    include_dirs: ["system/bt"],
46    srcs: [
47        "test/device_class_test.cc",
48        "test/property_test.cc",
49    ],
50    shared_libs: [
51        "liblog",
52    ],
53    static_libs: [
54        "libbtcore",
55        "libosi-AllocationTestHarness",
56        "libosi",
57    ],
58    host_supported: true,
59    test_options: {
60        unit_test: true,
61    },
62}
63