xref: /aosp_15_r20/external/libtracefs/Android.bp (revision 287e80b3a36113050663245e7f2c00d274188f18)
1package {
2    default_applicable_licenses: ["external_libtracefs_license"],
3}
4
5// See: http://go/android-license-faq
6license {
7    name: "external_libtracefs_license",
8
9    visibility: [":__subpackages__"],
10
11    license_kinds: [
12        "SPDX-license-identifier-GPL-2.0",
13        "SPDX-license-identifier-GPL-2.0-only",
14        "SPDX-license-identifier-GPL-2.0+",
15        "SPDX-license-identifier-GPL-2.0-or-later",
16        "SPDX-license-identifier-GPL-3.0",
17        "SPDX-license-identifier-LGPL-2.1",
18        "SPDX-license-identifier-LGPL-2.1+",
19    ],
20
21    license_text: [
22        "LICENSE",
23    ],
24}
25
26cc_library {
27    name: "libtracefs",
28
29    // Restrict visibility due to GPL license
30    visibility: [
31        "//external/trace-cmd:__subpackages__",
32    ],
33
34    local_include_dirs: [
35        "include",
36        "src",
37    ],
38
39    export_include_dirs: [
40        "include",
41    ],
42
43    srcs: ["src/*.c"],
44
45    shared: {
46        shared_libs: [
47            "libtraceevent",
48        ],
49        export_shared_lib_headers: [
50            "libtraceevent",
51        ],
52    },
53
54    static: {
55        static_libs: [
56            "libtraceevent",
57        ],
58        export_static_lib_headers: [
59            "libtraceevent",
60        ],
61    },
62
63    cflags: [
64        "-D_GNU_SOURCE",
65        "-Wno-unused-parameter",
66    ],
67
68    c_std: "gnu99",
69}
70