aboutsummaryrefslogtreecommitdiff
path: root/btcore/Android.bp
blob: fc2cd4e94d5bbe183e64a63f9981a022d6ebb84b (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
// libbtcore static library for target and host
// ========================================================
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"],
}

cc_library_static {
    name: "libbtcore",
    defaults: ["fluoride_defaults"],
    local_include_dirs: ["include"],
    include_dirs: ["system/bt"],
    srcs: [
        "src/device_class.cc",
        "src/hal_util.cc",
        "src/module.cc",
        "src/osi_module.cc",
        "src/property.cc",
    ],
    shared_libs: [
        "liblog",
    ],
    header_libs: ["libbluetooth_headers"],
    host_supported: true,
    target: {
        linux_glibc: {
            cflags: ["-D_GNU_SOURCE"],
        },
    },
}

// Note: It's good to get the tests compiled both for the host and the target so
// we get to test with both Bionic libc and glibc
// libbtcore unit tests for target and host
// ========================================================
cc_test {
    name: "net_test_btcore",
    test_suites: ["device-tests"],
    defaults: ["fluoride_defaults"],
    local_include_dirs: ["include"],
    include_dirs: ["system/bt"],
    srcs: [
        "test/device_class_test.cc",
        "test/property_test.cc",
    ],
    shared_libs: [
        "liblog",
    ],
    static_libs: [
        "libbtcore",
        "libosi-AllocationTestHarness",
        "libosi",
    ],
    host_supported: true,
    test_options: {
        unit_test: true,
    },
}