1package { 2 default_applicable_licenses: ["external_iproute2_lib_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_lib_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 ], 27 license_text: [ 28 "NOTICE", 29 ], 30} 31 32cc_library_shared { 33 name: "libiprouteutil", 34 defaults: ["iproute2_defaults"], 35 36 system_shared_libs: [ 37 "libc", 38 "libdl", 39 ], 40 41 srcs: [ 42 "color.c", 43 "utils.c", 44 "rt_names.c", 45 "ll_types.c", 46 "ll_proto.c", 47 "ll_addr.c", 48 "inet_proto.c", 49 "mpls_pton.c", 50 "namespace.c", 51 "names.c", 52 "libgenl.c", 53 "libnetlink.c", 54 "bpf.c", 55 "exec.c", 56 "fs.c", 57 "json_print.c", 58 "json_writer.c", 59 ], 60 cflags: [ 61 "-DCONFDIR=\"/data/misc/net\"", 62 "-DNETNS_RUN_DIR=\"" + NETNS_RUN_DIR + "\"", 63 "-D_GNU_SOURCE", 64 ], 65 66 // This is a work around for b/18403920 67 ldflags: ["-Wl,--no-gc-sections"], 68} 69 70cc_library_shared { 71 name: "libnetlink", 72 defaults: ["iproute2_defaults"], 73 74 system_shared_libs: ["libc"], 75 srcs: [ 76 "ll_map.c", 77 "libnetlink.c", 78 ], 79} 80