• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_iw_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//
19// large-scale-change included anything that looked like it might be a license
20// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
21//
22// Please consider removing redundant or irrelevant files from 'license_text:'.
23// See: http://go/android-license-faq
24license {
25    name: "external_iw_license",
26    visibility: [":__subpackages__"],
27    license_kinds: [
28        "SPDX-license-identifier-BSD",
29        "SPDX-license-identifier-ISC",
30    ],
31    license_text: [
32        "COPYING",
33        "NOTICE",
34    ],
35}
36
37genrule {
38    name: "iw_version",
39    cmd: "echo '#include \"iw.h\"' >$(out) && " +
40        "echo \"const char iw_version[] = $$(grep ^VERSION $(location version.sh) | sed \"s/VERSION=//\");\" >>$(out)",
41    srcs: ["version.sh"],
42    out: ["version.c"],
43}
44
45cc_defaults {
46    name: "iw_common",
47
48    srcs: [
49        "iw.c",
50        "genl.c",
51        "event.c",
52        "info.c",
53        "phy.c",
54        "interface.c",
55        "ibss.c",
56        "station.c",
57        "survey.c",
58        "util.c",
59        "ocb.c",
60        "mesh.c",
61        "mpath.c",
62        "mpp.c",
63        "scan.c",
64        "reg.c",
65        "reason.c",
66        "status.c",
67        "connect.c",
68        "link.c",
69        "offch.c",
70        "ps.c",
71        "cqm.c",
72        "bitrate.c",
73        "wowlan.c",
74        "coalesce.c",
75        "roc.c",
76        "p2p.c",
77        "vendor.c",
78        "sections.c",
79
80        ":iw_version",
81    ],
82
83    cflags: [
84        "-D_GNU_SOURCE",
85        "-DCONFIG_LIBNL20",
86
87        // Silence some warnings for now. Needs to be fixed upstream. b/26105799
88        "-Wno-unused-parameter",
89        "-Wno-sign-compare",
90        "-Wno-format",
91        "-Wno-absolute-value",
92        "-Wno-enum-conversion",
93        "-Werror",
94    ],
95
96    ldflags: ["-Wl,--no-gc-sections"],
97    shared_libs: ["libnl"],
98}
99
100cc_binary {
101    name: "iw",
102
103    defaults: ["iw_common"],
104}
105
106cc_binary {
107    name: "iw_vendor",
108    stem: "iw",
109    vendor: true,
110    defaults: ["iw_common"],
111}
112