1 2package { 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 38cc_library { 39 name: "libnl", 40 host_supported: true, 41 vendor_available: true, 42 product_available: true, 43 vndk: { 44 enabled: true, 45 }, 46 47 target: { 48 darwin: { 49 enabled: false, 50 }, 51 linux_glibc: { 52 local_include_dirs: [ 53 "include/linux-private", 54 ], 55 }, 56 host: { 57 srcs: [ 58 "lib/route/link/macvlan.c", 59 ], 60 }, 61 }, 62 63 srcs: [ 64 "lib/*.c", 65 "lib/fib_lookup/lookup.c", 66 "lib/fib_lookup/request.c", 67 "lib/genl/ctrl.c", 68 "lib/genl/family.c", 69 "lib/genl/genl.c", 70 "lib/genl/mngt.c", 71 "lib/netfilter/nfnl.c", 72 "lib/route/link.c", 73 "lib/route/link/api.c", 74 "lib/route/link/macsec.c", 75 "lib/route/link/sriov.c", 76 "lib/route/link/vlan.c", 77 "lib/route/nexthop.c", 78 "lib/route/nexthop_encap.c", 79 "lib/route/nh_encap_mpls.c", 80 "lib/route/route.c", 81 "lib/route/route_obj.c", 82 "lib/route/route_utils.c", 83 "lib/route/rtnl.c", 84 ], 85 86 local_include_dirs: [ 87 "include", 88 ], 89 export_include_dirs: ["include"], 90 cflags: [ 91 "-D_BSD_SOURCE", 92 "-Wall", 93 "-Werror", 94 "-Wno-unused-parameter", 95 "-Wno-sign-compare", 96 "-Wno-missing-field-initializers", 97 "-Wno-tautological-compare", 98 "-Wno-pointer-arith", 99 "-UNDEBUG", 100 "-D_GNU_SOURCE", 101 "-DSYSCONFDIR=\"\\\"/etc/libnl\\\"\"", 102 ], 103 104 sanitize: { 105 integer_overflow: true, 106 }, 107 apex_available: [ 108 "//apex_available:platform", 109 "com.android.virt", 110 ], 111} 112