blob: 9b01e6f513ccfc00647ff5a7c56ec50d841470df [file] [log] [blame]
Steven Morelandb7f0bfb2017-04-13 13:55:46 -07001
Bob Badour63506182021-02-12 18:19:24 -08002package {
3 default_applicable_licenses: ["external_libnl_license"],
4}
5
6// Added automatically by a large-scale-change that took the approach of
7// 'apply every license found to every target'. While this makes sure we respect
8// every license restriction, it may not be entirely correct.
9//
10// e.g. GPL in an MIT project might only apply to the contrib/ directory.
11//
12// Please consider splitting the single license below into multiple licenses,
13// taking care not to lose any license_kind information, and overriding the
14// default license using the 'licenses: [...]' property on targets as needed.
15//
16// For unused files, consider creating a 'fileGroup' with "//visibility:private"
17// to attach the license to, and including a comment whether the files may be
18// used in the current project.
19// See: http://go/android-license-faq
20license {
21 name: "external_libnl_license",
22 visibility: [":__subpackages__"],
23 license_kinds: [
24 "SPDX-license-identifier-BSD",
25 "SPDX-license-identifier-GPL",
26 "SPDX-license-identifier-GPL-2.0",
27 "SPDX-license-identifier-GPL-3.0",
28 "SPDX-license-identifier-LGPL",
29 "SPDX-license-identifier-LGPL-2.1",
30 "SPDX-license-identifier-LGPL-3.0",
31 "legacy_unencumbered",
32 ],
33 license_text: [
34 "COPYING",
35 ],
36}
37
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070038cc_library {
39 name: "libnl",
Tomasz Wiszkowski7b3e6512017-11-06 12:37:52 -080040 host_supported: true,
Steven Morelanded86cb72017-04-13 14:00:54 -070041 vendor_available: true,
Justin Yun75006a22020-11-11 18:13:31 +090042 product_available: true,
Justin Yun9ee55f72017-07-24 15:19:44 +090043 vndk: {
44 enabled: true,
45 },
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070046
Greg Hartmanc0d2fea2017-11-30 18:18:27 -080047 target: {
48 darwin: {
49 enabled: false,
50 },
Jiyong Park78b225a2020-09-18 16:22:13 +090051 linux_glibc: {
Haibo Huang232e42b2020-03-10 18:06:03 -070052 local_include_dirs: [
53 "include/linux-private",
54 ],
55 },
Dan Willemsend51bf7e2021-08-30 13:50:30 -070056 host: {
57 srcs: [
58 "lib/route/link.c",
59 "lib/route/link/api.c",
60 "lib/route/link/macvlan.c",
61 "lib/route/link/sriov.c",
62 ],
63 },
Greg Hartmanc0d2fea2017-11-30 18:18:27 -080064 },
65
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070066 srcs: [
Haibo Huang232e42b2020-03-10 18:06:03 -070067 "lib/*.c",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070068 "lib/fib_lookup/lookup.c",
69 "lib/fib_lookup/request.c",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070070 "lib/genl/ctrl.c",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070071 "lib/genl/family.c",
72 "lib/genl/genl.c",
Haibo Huang232e42b2020-03-10 18:06:03 -070073 "lib/genl/mngt.c",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070074 "lib/netfilter/nfnl.c",
Haibo Huang232e42b2020-03-10 18:06:03 -070075 "lib/route/route_utils.c",
76 "lib/route/rtnl.c",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070077 ],
78
79 local_include_dirs: [
80 "include",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070081 ],
82 export_include_dirs: ["include"],
83 cflags: [
84 "-D_BSD_SOURCE",
Chih-Hung Hsieh6822e392017-09-29 10:17:10 -070085 "-Wall",
86 "-Werror",
Steven Morelandb7f0bfb2017-04-13 13:55:46 -070087 "-Wno-unused-parameter",
88 "-Wno-sign-compare",
89 "-Wno-missing-field-initializers",
90 "-Wno-tautological-compare",
91 "-Wno-pointer-arith",
92 "-UNDEBUG",
93 "-D_GNU_SOURCE",
94 "-DSYSCONFDIR=\"\\\"/etc/libnl\\\"\"",
95 ],
Ivan Lozanod1792ee2017-09-26 11:08:08 -070096
97 sanitize: {
98 integer_overflow: true,
99 },
Jiyong Park64409702021-01-05 14:44:27 +0900100 apex_available: [
101 "//apex_available:platform",
102 "com.android.virt",
103 ],
Steven Morelandb7f0bfb2017-04-13 13:55:46 -0700104}