1/* 2 * Copyright (C) 2019 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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "perfstatsd_defaults", 23 24 shared_libs: [ 25 "libbase", 26 "libbinder", 27 "libcutils", 28 "libhidlbase", 29 "liblog", 30 "libutils", 31 ], 32 33 cflags: [ 34 "-Wall", 35 "-Werror", 36 "-Wextra", 37 "-Wno-unused-parameter" 38 ], 39} 40 41cc_binary { 42 name: "perfstatsd", 43 44 defaults: ["perfstatsd_defaults"], 45 46 srcs: ["main.cpp"], 47 local_include_dirs: ["include"], 48 static_libs: ["libperfstatsd"], 49 50 init_rc: ["perfstatsd.rc"], 51 52 owner: "google", 53 vendor: true, 54} 55 56cc_library_static { 57 name: "libperfstatsd", 58 59 defaults: ["perfstatsd_defaults"], 60 61 srcs: [ 62 "perfstatsd.cpp", 63 "perfstatsd_service.cpp", 64 "perfstats_buffer.cpp", 65 "cpu_usage.cpp", 66 "io_usage.cpp", 67 ":perfstatsd_aidl_private", 68 ], 69 local_include_dirs: ["include"], 70 aidl: { 71 export_aidl_headers: true, 72 local_include_dirs: ["binder"], 73 }, 74 vendor: true, 75} 76 77filegroup { 78 name: "perfstatsd_aidl_private", 79 srcs: [ 80 "binder/android/pixel/perfstatsd/IPerfstatsdPrivate.aidl", 81 ], 82 path: "binder", 83} 84