• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_iproute2_ip_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_iproute2_ip_license",
21    visibility: [":__subpackages__"],
22    license_kinds: [
23        "SPDX-license-identifier-GPL",
24        "SPDX-license-identifier-GPL-2.0",
25        "SPDX-license-identifier-LGPL",
26        "legacy_unencumbered",
27    ],
28    license_text: [
29        "NOTICE",
30    ],
31}
32
33cc_binary {
34    name: "ip",
35    defaults: ["iproute2_defaults"],
36
37    // ordering affects link order, so cannot be quite fully sorted
38    srcs: [
39        "ip6tunnel.c",
40        "ipaddress.c",
41        "ipaddrlabel.c",
42        "ip.c",
43        "ipfou.c",
44        "ipila.c",
45        "ipl2tp.c",
46        "iplink_bond.c",
47        "iplink_bond_slave.c",
48        "iplink_bridge.c",
49        "iplink_bridge_slave.c",
50        "iplink.c",
51        "iplink_can.c",
52        "iplink_dummy.c",
53        "iplink_geneve.c",
54        "iplink_hsr.c",
55        "iplink_ifb.c",
56        "iplink_ipoib.c",
57        "iplink_ipvlan.c",
58        "iplink_macvlan.c",
59        "iplink_nlmon.c",
60        "iplink_team.c",
61        "iplink_vcan.c",
62        "iplink_vlan.c",
63        "iplink_vrf.c",
64        "iplink_vxcan.c",
65        "iplink_vxlan.c",
66        "iplink_xdp.c",
67        "iplink_xstats.c",
68        "ipmacsec.c",
69        "ipmaddr.c",
70        "ipmonitor.c",
71        "ipmroute.c",
72        "ipneigh.c",
73        "ipnetconf.c",
74        "ipnetns.c",
75        "ipntable.c",
76        "ipprefix.c",
77        "iproute.c",
78        "iproute_lwtunnel.c",
79        "iprule.c",
80        "ipseg6.c",
81        "iptoken.c",
82        "iptunnel.c",
83        "iptuntap.c",
84        "ipvrf.c",
85        "ipxfrm.c",
86        "link_gre6.c",
87        "link_gre.c",
88        "link_ip6tnl.c",
89        "link_iptnl.c",
90        "link_veth.c",
91        "link_vti6.c",
92        "link_vti.c",
93        "rtm_map.c",
94        "static-syms.c",
95        "tcp_metrics.c",
96        "tunnel.c",
97        "xfrm_monitor.c",
98        "xfrm_policy.c",
99        "xfrm_state.c",
100    ],
101
102    shared_libs: [
103        "libiprouteutil",
104        "libnetlink",
105    ],
106
107    cflags: [
108        "-Wno-implicit-function-declaration",
109        "-Wno-int-conversion",
110        "-Wno-missing-field-initializers",
111        "-D_GNU_SOURCE",
112        "-DNETNS_RUN_DIR=\"" + NETNS_RUN_DIR + "\"",
113    ],
114
115    ldflags: [
116        "-Wl,-export-dynamic",
117        "-Wl,--no-gc-sections",
118    ],
119}
120