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_test { 55 name: "memevents_test", 56 srcs: [ 57 "memevents_test.cpp", 58 ], 59 60 static_libs: [ 61 "libmeminfo", 62 "libmemevents", 63 ], 64 65 shared_libs: [ 66 "libbase", 67 "libbpf_bcc", 68 "liblog", 69 ], 70 test_suites: ["device-tests"], 71 require_root: true, 72} 73