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// libinput is partially built for the host (used by build time keymap validation tool) 16 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "frameworks_native_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["frameworks_native_license"], 24} 25 26filegroup { 27 name: "inputconstants_aidl", 28 srcs: [ 29 "android/os/BlockUntrustedTouchesMode.aidl", 30 "android/os/IInputConstants.aidl", 31 "android/os/InputEventInjectionResult.aidl", 32 "android/os/InputEventInjectionSync.aidl", 33 "android/os/TouchOcclusionMode.aidl", 34 ], 35} 36 37cc_library { 38 name: "libinput", 39 host_supported: true, 40 cflags: [ 41 "-Wall", 42 "-Wextra", 43 "-Werror", 44 ], 45 srcs: [ 46 "Input.cpp", 47 "InputDevice.cpp", 48 "InputEventLabels.cpp", 49 "Keyboard.cpp", 50 "KeyCharacterMap.cpp", 51 "KeyLayoutMap.cpp", 52 "PropertyMap.cpp", 53 "TouchVideoFrame.cpp", 54 "VelocityControl.cpp", 55 "VelocityTracker.cpp", 56 "VirtualKeyMap.cpp", 57 ], 58 59 clang: true, 60 61 header_libs: ["jni_headers"], 62 export_header_lib_headers: ["jni_headers"], 63 64 shared_libs: [ 65 "libbase", 66 "liblog", 67 "libcutils", 68 ], 69 70 static_libs: [ 71 "libui-types", 72 ], 73 74 export_static_lib_headers: [ 75 "libui-types", 76 ], 77 78 target: { 79 android: { 80 srcs: [ 81 "InputTransport.cpp", 82 "InputWindow.cpp", 83 "android/FocusRequest.aidl", 84 "android/InputApplicationInfo.aidl", 85 "android/os/BlockUntrustedTouchesMode.aidl", 86 "android/os/IInputConstants.aidl", 87 "android/os/IInputFlinger.aidl", 88 "android/os/InputEventInjectionResult.aidl", 89 "android/os/InputEventInjectionSync.aidl", 90 "android/os/ISetInputWindowsListener.aidl", 91 "android/os/TouchOcclusionMode.aidl", 92 ], 93 94 export_shared_lib_headers: ["libbinder"], 95 96 shared_libs: [ 97 "libutils", 98 "libbinder", 99 "libui", 100 ], 101 102 sanitize: { 103 misc_undefined: ["integer"], 104 }, 105 }, 106 host: { 107 shared: { 108 enabled: false, 109 }, 110 include_dirs: [ 111 "frameworks/native/libs/arect/include", 112 ], 113 }, 114 linux_glibc: { 115 srcs: [ 116 "InputTransport.cpp", 117 "InputWindow.cpp", 118 "android/FocusRequest.aidl", 119 "android/InputApplicationInfo.aidl", 120 "android/os/IInputConstants.aidl", 121 "android/os/IInputFlinger.aidl", 122 "android/os/ISetInputWindowsListener.aidl", 123 "android/os/TouchOcclusionMode.aidl", 124 ], 125 static_libs: [ 126 "libhostgraphics", 127 ], 128 shared_libs: [ 129 "libbinder", 130 ], 131 }, 132 }, 133 134 aidl: { 135 local_include_dirs: ["."], 136 export_aidl_headers: true, 137 }, 138} 139 140cc_defaults { 141 name: "libinput_fuzz_defaults", 142 host_supported: true, 143 shared_libs: [ 144 "libutils", 145 "libbase", 146 "liblog", 147 ], 148} 149 150cc_fuzz { 151 name: "libinput_fuzz_propertymap", 152 defaults: ["libinput_fuzz_defaults"], 153 srcs: [ 154 "PropertyMap.cpp", 155 "PropertyMap_fuzz.cpp", 156 ], 157} 158 159subdirs = ["tests"] 160