blob: b5fefac289a77a165243982f1a4eed0ba1e85e31 [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
Chenbo Fengc10a8a42017-12-15 13:56:33 -080017cc_library {
Chenbo Fengd6104d12018-10-16 20:29:29 -070018 name: "libnetdbpf",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080019 vendor_available: false,
20 host_supported: false,
Bernie Innocentia2989112018-11-12 22:29:04 +090021 srcs: [
22 "BpfNetworkStats.cpp"
23 ],
Chenbo Fengc10a8a42017-12-15 13:56:33 -080024 shared_libs: [
25 "libbase",
Chenbo Fenga54aaf52018-11-07 17:51:51 -080026 "libbpf_android",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080027 "liblog",
28 "libnetdutils",
Bernie Innocentia2989112018-11-12 22:29:04 +090029 "libutils",
Chenbo Fengc10a8a42017-12-15 13:56:33 -080030 ],
Bernie Innocentia2989112018-11-12 22:29:04 +090031 export_include_dirs: ["include"],
Chenbo Fengd6104d12018-10-16 20:29:29 -070032 defaults: ["netd_defaults"],
Chenbo Fengc10a8a42017-12-15 13:56:33 -080033}
34
Chenbo Fengdc4e3252017-12-22 11:00:52 -080035cc_test {
Chenbo Fengd6104d12018-10-16 20:29:29 -070036 name: "libnetdbpf_test",
Bernie Innocentib03430f2019-04-03 06:07:02 +000037 test_suites: ["device-tests"],
Bernie Innocentif0970c22019-06-19 10:14:40 -070038 require_root: true,
Chenbo Fengdc4e3252017-12-22 11:00:52 -080039 srcs: [
40 "BpfNetworkStatsTest.cpp",
41 ],
Erik Klineab999f12018-07-04 11:29:31 +090042 defaults: ["netd_defaults"],
Chenbo Fengdc4e3252017-12-22 11:00:52 -080043 static_libs: ["libgmock"],
44 shared_libs: [
Chenbo Fengdc4e3252017-12-22 11:00:52 -080045 "libbase",
Chenbo Fenga54aaf52018-11-07 17:51:51 -080046 "libbpf_android",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080047 "liblog",
Chenbo Fengd6104d12018-10-16 20:29:29 -070048 "libnetdbpf",
Chenbo Fengdc4e3252017-12-22 11:00:52 -080049 "libnetdutils",
50 "libutils",
51 ],
52}