1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19cc_library { 20 name: "libmemevents", 21 cflags: [ 22 "-Wall", 23 "-Werror", 24 "-Wno-initializer-overrides", 25 ], 26 27 shared_libs: [ 28 "libbase", 29 "libbpf_bcc", 30 "liblog", 31 ], 32 header_libs: ["bpf_headers"], 33 export_include_dirs: ["include"], 34 export_shared_lib_headers: ["libbase"], 35 export_header_lib_headers: ["bpf_headers"], 36 37 local_include_dirs: [ 38 "include", 39 ], 40 41 required: [ 42 "bpfMemEvents.o", 43 ], 44 45 product_variables: { 46 debuggable: { 47 required: ["bpfMemEventsTest.o"], 48 }, 49 }, 50 51 srcs: ["memevents.cpp"], 52} 53 54cc_library_headers { 55 name: "libmemevents_headers", 56 export_include_dirs: ["include"], 57} 58 59cc_test { 60 name: "memevents_test", 61 srcs: [ 62 "memevents_test.cpp", 63 ], 64 65 static_libs: [ 66 "libmeminfo", 67 "libmemevents", 68 ], 69 70 shared_libs: [ 71 "libbase", 72 "libbpf_bcc", 73 "liblog", 74 ], 75 test_suites: ["device-tests"], 76 require_root: true, 77} 78