1// Copyright (C) 2013 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 15// Default flags to be used throughout all libraries in inputflinger. 16package { 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "frameworks_native_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["frameworks_native_license"], 23} 24 25cc_defaults { 26 name: "inputflinger_defaults", 27 cflags: [ 28 "-Wall", 29 "-Wextra", 30 "-Werror", 31 "-Wno-unused-parameter", 32 "-Wthread-safety", 33 "-Wshadow", 34 "-Wshadow-field-in-constructor-modified", 35 "-Wshadow-uncaptured-local", 36 ], 37 sanitize: { 38 misc_undefined: ["bounds"], 39 }, 40} 41 42///////////////////////////////////////////////// 43// libinputflinger 44///////////////////////////////////////////////// 45 46filegroup { 47 name: "libinputflinger_sources", 48 srcs: [ 49 "InputClassifier.cpp", 50 "InputClassifierConverter.cpp", 51 "InputManager.cpp", 52 ], 53} 54 55cc_defaults { 56 name: "libinputflinger_defaults", 57 srcs: [":libinputflinger_sources"], 58 shared_libs: [ 59 "android.hardware.input.classifier@1.0", 60 "libbase", 61 "libbinder", 62 "libcrypto", 63 "libcutils", 64 "libhidlbase", 65 "libinput", 66 "libkll", 67 "liblog", 68 "libprotobuf-cpp-lite", 69 "libstatslog", 70 "libstatspull", 71 "libstatssocket", 72 "libutils", 73 "libui", 74 "lib-platform-compat-native-api", 75 "server_configurable_flags", 76 "InputFlingerProperties", 77 ], 78 static_libs: [ 79 "libattestation", 80 ], 81} 82 83cc_library_shared { 84 name: "libinputflinger", 85 defaults: [ 86 "inputflinger_defaults", 87 "libinputflinger_defaults", 88 ], 89 cflags: [ 90 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden 91 //-fvisibility=hidden 92 ], 93 shared_libs: [ 94 // This should consist only of dependencies from inputflinger. Other dependencies should be 95 // in cc_defaults so that they are included in the tests. 96 "libinputflinger_base", 97 "libinputreporter", 98 "libinputreader", 99 "libgui", 100 ], 101 static_libs: [ 102 "libinputdispatcher", 103 ], 104 export_static_lib_headers: [ 105 "libinputdispatcher", 106 ], 107 export_include_dirs: [ 108 ".", 109 "include", 110 ], 111} 112 113///////////////////////////////////////////////// 114// libinputflinger_base 115///////////////////////////////////////////////// 116 117cc_library_headers { 118 name: "libinputflinger_headers", 119 export_include_dirs: ["include"], 120} 121 122filegroup { 123 name: "libinputflinger_base_sources", 124 srcs: [ 125 "InputListener.cpp", 126 "InputReaderBase.cpp", 127 "InputThread.cpp", 128 "VibrationElement.cpp" 129 ], 130} 131 132cc_defaults { 133 name: "libinputflinger_base_defaults", 134 srcs: [":libinputflinger_base_sources"], 135 shared_libs: [ 136 "libbase", 137 "libcutils", 138 "libinput", 139 "liblog", 140 "libui", 141 "libutils", 142 ], 143 header_libs: [ 144 "libinputflinger_headers", 145 ], 146} 147 148cc_library_shared { 149 name: "libinputflinger_base", 150 defaults: [ 151 "inputflinger_defaults", 152 "libinputflinger_base_defaults", 153 ], 154 export_header_lib_headers: [ 155 "libinputflinger_headers", 156 ], 157} 158