Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 1 | // |
| 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 | |
| 17 | cc_library_headers { |
Chenbo Feng | 79a4da2 | 2018-11-08 11:32:31 -0800 | [diff] [blame^] | 18 | name: "libbpf_android_headers", |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 19 | vendor_available: false, |
| 20 | host_supported: false, |
| 21 | export_include_dirs: ["include"], |
| 22 | target: { |
| 23 | linux_bionic: { |
| 24 | enabled: true, |
| 25 | }, |
| 26 | }, |
| 27 | } |
| 28 | |
| 29 | cc_library { |
Chenbo Feng | 79a4da2 | 2018-11-08 11:32:31 -0800 | [diff] [blame^] | 30 | name: "libbpf_android", |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 31 | vendor_available: false, |
| 32 | host_supported: false, |
| 33 | target: { |
| 34 | android: { |
| 35 | srcs: [ |
| 36 | "BpfUtils.cpp", |
| 37 | ], |
| 38 | sanitize: { |
| 39 | misc_undefined: ["integer"], |
| 40 | }, |
| 41 | }, |
| 42 | }, |
| 43 | |
| 44 | shared_libs: [ |
| 45 | "libbase", |
| 46 | "libutils", |
| 47 | "liblog", |
| 48 | "libnetdutils", |
| 49 | ], |
| 50 | header_libs: [ |
Chenbo Feng | 79a4da2 | 2018-11-08 11:32:31 -0800 | [diff] [blame^] | 51 | "libbpf_android_headers" |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 52 | ], |
Chenbo Feng | 79a4da2 | 2018-11-08 11:32:31 -0800 | [diff] [blame^] | 53 | export_header_lib_headers: ["libbpf_android_headers"], |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 54 | local_include_dirs: ["include"], |
| 55 | |
| 56 | defaults: ["bpf_defaults"], |
| 57 | cflags: [ |
| 58 | "-Werror", |
| 59 | "-Wall", |
| 60 | "-Wextra", |
| 61 | ], |
| 62 | } |
| 63 | |
| 64 | cc_test { |
Chenbo Feng | 79a4da2 | 2018-11-08 11:32:31 -0800 | [diff] [blame^] | 65 | name: "libbpf_android_test", |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 66 | srcs: [ |
| 67 | "BpfMapTest.cpp", |
| 68 | ], |
| 69 | defaults: ["bpf_defaults"], |
| 70 | cflags: [ |
| 71 | "-Wall", |
| 72 | "-Werror", |
| 73 | "-Wno-error=unused-variable", |
| 74 | ], |
| 75 | static_libs: ["libgmock"], |
| 76 | shared_libs: [ |
Chenbo Feng | 79a4da2 | 2018-11-08 11:32:31 -0800 | [diff] [blame^] | 77 | "libbpf_android", |
Chenbo Feng | 4c9e9ec | 2018-10-16 20:31:52 -0700 | [diff] [blame] | 78 | "libbase", |
| 79 | "liblog", |
| 80 | "libnetdutils", |
| 81 | "libutils", |
| 82 | ], |
| 83 | } |