xref: /aosp_15_r20/external/iputils/Android.bp (revision bd1f8aeb6080fa6544ec30aeca3eb4da100f359f)
1package {
2    default_applicable_licenses: ["external_iputils_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20    name: "external_iputils_license",
21    visibility: [":__subpackages__"],
22    license_kinds: [
23        "SPDX-license-identifier-BSD",
24        "SPDX-license-identifier-GPL-2.0",
25        "SPDX-license-identifier-ISC",
26        "legacy_unencumbered",
27    ],
28    license_text: [
29        "NOTICE",
30    ],
31}
32
33cc_defaults {
34    name: "iputils_defaults",
35
36    // This code uses K&R prototypes, which are invalid in C23 or later.
37    c_std: "gnu17",
38
39    cflags: [
40        "-fno-strict-aliasing",
41        "-D_GNU_SOURCE",
42        "-Wall",
43        "-Werror",
44        "-Wno-constant-conversion",
45        "-Wno-missing-field-initializers",
46        "-Wno-sign-compare",
47        "-Wno-unused-parameter",
48    ],
49}
50
51cc_binary {
52    name: "ping",
53    defaults: ["iputils_defaults"],
54    srcs: [
55        "ping.c",
56        "ping_common.c",
57    ],
58}
59
60cc_binary {
61    name: "ping6",
62    defaults: ["iputils_defaults"],
63    shared_libs: ["libcrypto"],
64    srcs: [
65        "ping6.c",
66        "ping_common.c",
67    ],
68}
69
70cc_binary {
71    name: "tracepath",
72    defaults: ["iputils_defaults"],
73    srcs: ["tracepath.c"],
74}
75
76cc_binary {
77    name: "tracepath6",
78    defaults: ["iputils_defaults"],
79    srcs: ["tracepath6.c"],
80}
81
82cc_binary {
83    name: "traceroute6",
84    defaults: ["iputils_defaults"],
85    srcs: ["traceroute6.c"],
86}
87
88cc_binary {
89    name: "arping",
90    defaults: ["iputils_defaults"],
91    srcs: ["arping.c"],
92}
93