xref: /aosp_15_r20/system/nfc/utils/Android.bp (revision 7eba2f3b06c51ae21384f6a4f14577b668a869b3)
1package {
2    default_team: "trendy_team_fwk_nfc",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "system_nfc_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["system_nfc_license"],
9}
10
11cc_defaults {
12    name: "nfc_utils_defaults",
13    include_dirs: [
14        "system/nfc",
15    ],
16    cflags: [
17        "-Wall",
18        "-Werror",
19    ],
20    target: {
21        host_linux: {
22            cflags: ["-D_GNU_SOURCE"],
23        },
24        darwin: {
25            enabled: false,
26        },
27    },
28    sanitize: {
29        integer_overflow: true,
30        misc_undefined: ["bounds"],
31        scs: true,
32    },
33
34}
35
36cc_library_static {
37    name: "libnfcutils",
38    defaults: ["nfc_utils_defaults"],
39    export_include_dirs: ["include"],
40    host_supported: true,
41    srcs: [
42        "config.cc",
43        "ringbuffer.cc",
44    ],
45    shared_libs: [
46        "libbase",
47    ],
48    apex_available: [
49        "//apex_available:platform",
50        "com.android.nfcservices",
51    ],
52    min_sdk_version: "35", // Make it 36 once available.
53}
54
55cc_fuzz {
56    name: "nfc_utils_ringbuffer_fuzzer",
57    host_supported: true,
58    srcs: [
59        "test/ringbuffer_fuzzer/ringbuffer_fuzzer.cpp",
60    ],
61    static_libs: [
62        "libnfcutils",
63    ],
64    corpus: [
65        "test/ringbuffer_fuzzer/corpus/*",
66    ],
67}
68