blob: 64a6b6637a941ec5346dfef446d9fb4411be9d0b [file] [log] [blame]
Chenbo Fengc10a8a42017-12-15 13:56:33 -08001//
2// Copyright (C) 2017 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17cc_library_headers {
Chenbo Fengd6104d12018-10-16 20:29:29 -070018 name: "libnetdbpf_headers",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080019 vendor_available: false,
20 host_supported: false,
21 export_include_dirs: ["include"],
22 target: {
23 linux_bionic: {
24 enabled: true,
25 },
26 },
27}
28
29cc_library {
Chenbo Fengd6104d12018-10-16 20:29:29 -070030 name: "libnetdbpf",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080031 vendor_available: false,
32 host_supported: false,
33 target: {
34 android: {
35 srcs: [
Chenbo Fengf43bf812017-12-15 18:27:22 -080036 "BpfNetworkStats.cpp"
Chenbo Fengc10a8a42017-12-15 13:56:33 -080037 ],
38 sanitize: {
39 misc_undefined: ["integer"],
40 },
41 },
42 },
43
44 shared_libs: [
45 "libbase",
Chenbo Fengd6104d12018-10-16 20:29:29 -070046 "libbpf",
Chenbo Fengf43bf812017-12-15 18:27:22 -080047 "libutils",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080048 "liblog",
49 "libnetdutils",
50 ],
51 header_libs: [
Chenbo Fengd6104d12018-10-16 20:29:29 -070052 "libnetdbpf_headers"
Chenbo Fengc10a8a42017-12-15 13:56:33 -080053 ],
Chenbo Fengd6104d12018-10-16 20:29:29 -070054 export_header_lib_headers: ["libnetdbpf_headers"],
Chenbo Fengc10a8a42017-12-15 13:56:33 -080055 local_include_dirs: ["include"],
56
Chenbo Fengd6104d12018-10-16 20:29:29 -070057 defaults: ["netd_defaults"],
Chenbo Fengc10a8a42017-12-15 13:56:33 -080058 cflags: [
59 "-Werror",
60 "-Wall",
61 "-Wextra",
62 ],
63}
64
Chenbo Fengdc4e3252017-12-22 11:00:52 -080065cc_test {
Chenbo Fengd6104d12018-10-16 20:29:29 -070066 name: "libnetdbpf_test",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080067 srcs: [
68 "BpfNetworkStatsTest.cpp",
69 ],
Erik Klineab999f12018-07-04 11:29:31 +090070 defaults: ["netd_defaults"],
Chenbo Fengdc4e3252017-12-22 11:00:52 -080071 cflags: [
72 "-Wall",
73 "-Werror",
74 "-Wno-error=unused-variable",
75 ],
76 static_libs: ["libgmock"],
77 shared_libs: [
Chenbo Fengdc4e3252017-12-22 11:00:52 -080078 "libbase",
Chenbo Fengd6104d12018-10-16 20:29:29 -070079 "libbpf",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080080 "liblog",
Chenbo Fengd6104d12018-10-16 20:29:29 -070081 "libnetdbpf",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080082 "libnetdutils",
83 "libutils",
84 ],
85}