xref: /aosp_15_r20/external/iperf3/Android.bp (revision 7ab6e6ace082586527a400463bc693a412a40341)
1*7ab6e6acSAndroid Build Coastguard Worker// Copyright (C) 2019 The Android Open Source Project
2*7ab6e6acSAndroid Build Coastguard Worker//
3*7ab6e6acSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*7ab6e6acSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*7ab6e6acSAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*7ab6e6acSAndroid Build Coastguard Worker//
7*7ab6e6acSAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*7ab6e6acSAndroid Build Coastguard Worker//
9*7ab6e6acSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*7ab6e6acSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*7ab6e6acSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*7ab6e6acSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*7ab6e6acSAndroid Build Coastguard Worker// limitations under the License.
14*7ab6e6acSAndroid Build Coastguard Worker
15*7ab6e6acSAndroid Build Coastguard Workerpackage {
16*7ab6e6acSAndroid Build Coastguard Worker    default_applicable_licenses: ["external_iperf3_license"],
17*7ab6e6acSAndroid Build Coastguard Worker}
18*7ab6e6acSAndroid Build Coastguard Worker
19*7ab6e6acSAndroid Build Coastguard Worker// Added automatically by a large-scale-change that took the approach of
20*7ab6e6acSAndroid Build Coastguard Worker// 'apply every license found to every target'. While this makes sure we respect
21*7ab6e6acSAndroid Build Coastguard Worker// every license restriction, it may not be entirely correct.
22*7ab6e6acSAndroid Build Coastguard Worker//
23*7ab6e6acSAndroid Build Coastguard Worker// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24*7ab6e6acSAndroid Build Coastguard Worker//
25*7ab6e6acSAndroid Build Coastguard Worker// Please consider splitting the single license below into multiple licenses,
26*7ab6e6acSAndroid Build Coastguard Worker// taking care not to lose any license_kind information, and overriding the
27*7ab6e6acSAndroid Build Coastguard Worker// default license using the 'licenses: [...]' property on targets as needed.
28*7ab6e6acSAndroid Build Coastguard Worker//
29*7ab6e6acSAndroid Build Coastguard Worker// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30*7ab6e6acSAndroid Build Coastguard Worker// to attach the license to, and including a comment whether the files may be
31*7ab6e6acSAndroid Build Coastguard Worker// used in the current project.
32*7ab6e6acSAndroid Build Coastguard Worker// See: http://go/android-license-faq
33*7ab6e6acSAndroid Build Coastguard Workerlicense {
34*7ab6e6acSAndroid Build Coastguard Worker    name: "external_iperf3_license",
35*7ab6e6acSAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
36*7ab6e6acSAndroid Build Coastguard Worker    license_kinds: [
37*7ab6e6acSAndroid Build Coastguard Worker        "SPDX-license-identifier-BSD",
38*7ab6e6acSAndroid Build Coastguard Worker        "SPDX-license-identifier-MIT",
39*7ab6e6acSAndroid Build Coastguard Worker        "SPDX-license-identifier-NCSA",
40*7ab6e6acSAndroid Build Coastguard Worker        "legacy_notice",
41*7ab6e6acSAndroid Build Coastguard Worker        "legacy_unencumbered",
42*7ab6e6acSAndroid Build Coastguard Worker    ],
43*7ab6e6acSAndroid Build Coastguard Worker    license_text: [
44*7ab6e6acSAndroid Build Coastguard Worker        "LICENSE",
45*7ab6e6acSAndroid Build Coastguard Worker    ],
46*7ab6e6acSAndroid Build Coastguard Worker}
47*7ab6e6acSAndroid Build Coastguard Worker
48*7ab6e6acSAndroid Build Coastguard Workercc_binary {
49*7ab6e6acSAndroid Build Coastguard Worker    name: "iperf3",
50*7ab6e6acSAndroid Build Coastguard Worker    host_supported: true,
51*7ab6e6acSAndroid Build Coastguard Worker    srcs: [
52*7ab6e6acSAndroid Build Coastguard Worker        "src/*.c",
53*7ab6e6acSAndroid Build Coastguard Worker    ],
54*7ab6e6acSAndroid Build Coastguard Worker    exclude_srcs: [
55*7ab6e6acSAndroid Build Coastguard Worker        "src/t_*.c",
56*7ab6e6acSAndroid Build Coastguard Worker    ],
57*7ab6e6acSAndroid Build Coastguard Worker    cflags: [
58*7ab6e6acSAndroid Build Coastguard Worker        "-Wno-unused-parameter",
59*7ab6e6acSAndroid Build Coastguard Worker        "-Wno-unused-variable",
60*7ab6e6acSAndroid Build Coastguard Worker        // https://github.com/esnet/iperf/pull/855
61*7ab6e6acSAndroid Build Coastguard Worker        "-Wno-format",
62*7ab6e6acSAndroid Build Coastguard Worker        "-Wno-constant-conversion",
63*7ab6e6acSAndroid Build Coastguard Worker    ],
64*7ab6e6acSAndroid Build Coastguard Worker}
65