1// Copyright (C) 2019 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_team: "trendy_team_input_framework", 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_library_headers { 26 name: "libinputreader_headers", 27 host_supported: true, 28 export_include_dirs: [ 29 "controller", 30 "include", 31 "mapper", 32 "mapper/accumulator", 33 "mapper/gestures", 34 ], 35} 36 37filegroup { 38 name: "libinputreader_sources", 39 srcs: [ 40 "EventHub.cpp", 41 "InputDevice.cpp", 42 "InputReader.cpp", 43 "Macros.cpp", 44 "TouchVideoDevice.cpp", 45 "controller/PeripheralController.cpp", 46 "mapper/CapturedTouchpadEventConverter.cpp", 47 "mapper/CursorInputMapper.cpp", 48 "mapper/ExternalStylusInputMapper.cpp", 49 "mapper/InputMapper.cpp", 50 "mapper/JoystickInputMapper.cpp", 51 "mapper/KeyboardInputMapper.cpp", 52 "mapper/MultiTouchInputMapper.cpp", 53 "mapper/RotaryEncoderInputMapper.cpp", 54 "mapper/SensorInputMapper.cpp", 55 "mapper/SingleTouchInputMapper.cpp", 56 "mapper/SlopController.cpp", 57 "mapper/SwitchInputMapper.cpp", 58 "mapper/TouchCursorInputMapperCommon.cpp", 59 "mapper/TouchInputMapper.cpp", 60 "mapper/TouchpadInputMapper.cpp", 61 "mapper/VibratorInputMapper.cpp", 62 "mapper/accumulator/CursorButtonAccumulator.cpp", 63 "mapper/accumulator/CursorScrollAccumulator.cpp", 64 "mapper/accumulator/HidUsageAccumulator.cpp", 65 "mapper/accumulator/MultiTouchMotionAccumulator.cpp", 66 "mapper/accumulator/SingleTouchMotionAccumulator.cpp", 67 "mapper/accumulator/TouchButtonAccumulator.cpp", 68 "mapper/gestures/GestureConverter.cpp", 69 "mapper/gestures/GesturesLogging.cpp", 70 "mapper/gestures/HardwareProperties.cpp", 71 "mapper/gestures/HardwareStateConverter.cpp", 72 "mapper/gestures/PropertyProvider.cpp", 73 "mapper/gestures/TimerProvider.cpp", 74 ], 75} 76 77cc_defaults { 78 name: "libinputreader_defaults", 79 srcs: [":libinputreader_sources"], 80 shared_libs: [ 81 "libbase", 82 "libcap", 83 "libcrypto", 84 "libcutils", 85 "libjsoncpp", 86 "libinput", 87 "liblog", 88 "libPlatformProperties", 89 "libstatslog", 90 "libstatspull", 91 "libutils", 92 ], 93 static_libs: [ 94 "libchrome-gestures", 95 "libui-types", 96 ], 97 header_libs: [ 98 "libbatteryservice_headers", 99 "libchrome-gestures_headers", 100 "libinputreader_headers", 101 ], 102 target: { 103 host: { 104 static_libs: [ 105 "libbinder", 106 ], 107 }, 108 }, 109} 110 111cc_library_static { 112 name: "libinputreader_static", 113 defaults: [ 114 "inputflinger_defaults", 115 "libinputreader_defaults", 116 ], 117 shared_libs: [ 118 "libinputflinger_base", 119 ], 120 export_header_lib_headers: [ 121 "libbatteryservice_headers", 122 "libchrome-gestures_headers", 123 "libinputreader_headers", 124 ], 125 whole_static_libs: [ 126 "libchrome-gestures", 127 ], 128} 129 130cc_library_shared { 131 name: "libinputreader", 132 host_supported: true, 133 defaults: [ 134 "inputflinger_defaults", 135 "libinputreader_defaults", 136 ], 137 srcs: [ 138 "InputReaderFactory.cpp", 139 ], 140 shared_libs: [ 141 // This should consist only of dependencies from inputflinger. Other dependencies should be 142 // in cc_defaults so that they are included in the tests. 143 "libinputflinger_base", 144 "libjsoncpp", 145 ], 146 export_header_lib_headers: [ 147 "libinputreader_headers", 148 ], 149 target: { 150 host: { 151 include_dirs: [ 152 "bionic/libc/kernel/android/uapi/", 153 "bionic/libc/kernel/uapi", 154 ], 155 }, 156 }, 157 static_libs: [ 158 "libchrome-gestures", 159 ], 160} 161