blob: cf16ae9d3c1e2822e41ff4dd80c4a636a835ee0d [file] [log] [blame]
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
cc_library_headers {
name: "libbpf_headers",
vendor_available: false,
host_supported: false,
export_include_dirs: ["include"],
target: {
linux_bionic: {
enabled: true,
},
},
}
cc_library {
name: "libbpf",
vendor_available: false,
host_supported: false,
target: {
android: {
srcs: [
"BpfUtils.cpp",
"BpfNetworkStats.cpp"
],
sanitize: {
misc_undefined: ["integer"],
},
},
},
shared_libs: [
"libbase",
"libutils",
"liblog",
"libnetdutils",
],
header_libs: [
"libbpf_headers"
],
export_header_lib_headers: ["libbpf_headers"],
local_include_dirs: ["include"],
cflags: [
"-Werror",
"-Wall",
"-Wextra",
],
}
cc_test {
name: "libbpf_test",
srcs: [
"BpfNetworkStatsTest.cpp",
"BpfMapTest.cpp",
],
cflags: [
"-Wall",
"-Werror",
"-Wno-error=unused-variable",
],
static_libs: ["libgmock"],
shared_libs: [
"libbpf",
"libbase",
"liblog",
"libnetdutils",
"libutils",
],
}