blob: 721792f1f0dacdd8a00f48c10396a4f099d235eb [file] [log] [blame]
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -07001//
2// Copyright (C) 2018 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 Feng79a4da22018-11-08 11:32:31 -080018 name: "libbpf_android_headers",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070019 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 Feng79a4da22018-11-08 11:32:31 -080030 name: "libbpf_android",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070031 vendor_available: false,
32 host_supported: false,
33 target: {
34 android: {
35 srcs: [
36 "BpfUtils.cpp",
Joel Fernandesd76a2002018-10-16 13:19:58 -070037 "Loader.cpp",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070038 ],
39 sanitize: {
40 misc_undefined: ["integer"],
41 },
42 },
43 },
44
45 shared_libs: [
46 "libbase",
47 "libutils",
48 "liblog",
49 "libnetdutils",
Joel Fernandesd76a2002018-10-16 13:19:58 -070050 "libbpf",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070051 ],
52 header_libs: [
Chenbo Feng79a4da22018-11-08 11:32:31 -080053 "libbpf_android_headers"
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070054 ],
Chenbo Feng79a4da22018-11-08 11:32:31 -080055 export_header_lib_headers: ["libbpf_android_headers"],
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070056 local_include_dirs: ["include"],
57
58 defaults: ["bpf_defaults"],
59 cflags: [
60 "-Werror",
61 "-Wall",
62 "-Wextra",
63 ],
64}
65
66cc_test {
Chenbo Feng79a4da22018-11-08 11:32:31 -080067 name: "libbpf_android_test",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070068 srcs: [
69 "BpfMapTest.cpp",
70 ],
71 defaults: ["bpf_defaults"],
72 cflags: [
73 "-Wall",
74 "-Werror",
75 "-Wno-error=unused-variable",
76 ],
77 static_libs: ["libgmock"],
78 shared_libs: [
Chenbo Feng79a4da22018-11-08 11:32:31 -080079 "libbpf_android",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070080 "libbase",
81 "liblog",
82 "libnetdutils",
83 "libutils",
84 ],
85}