| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 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 |  | 
| Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 17 | package { | 
|  | 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 |  | 
| Siarhei Vishniakou | 7062295 | 2020-07-30 11:17:23 -0500 | [diff] [blame] | 26 | filegroup { | 
|  | 27 | name: "inputconstants_aidl", | 
|  | 28 | srcs: [ | 
| Bernardo Rufino | ea97d18 | 2020-08-19 14:43:14 +0100 | [diff] [blame] | 29 | "android/os/BlockUntrustedTouchesMode.aidl", | 
| Siarhei Vishniakou | ae6229e | 2019-12-30 16:23:19 -0800 | [diff] [blame] | 30 | "android/os/IInputConstants.aidl", | 
|  | 31 | "android/os/InputEventInjectionResult.aidl", | 
|  | 32 | "android/os/InputEventInjectionSync.aidl", | 
| Siarhei Vishniakou | 7062295 | 2020-07-30 11:17:23 -0500 | [diff] [blame] | 33 | ], | 
|  | 34 | } | 
|  | 35 |  | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 36 | cc_library { | 
|  | 37 | name: "libinput", | 
|  | 38 | host_supported: true, | 
| Frank Barchard | 9e94788 | 2017-03-06 11:17:52 -0800 | [diff] [blame] | 39 | cflags: [ | 
|  | 40 | "-Wall", | 
|  | 41 | "-Wextra", | 
|  | 42 | "-Werror", | 
|  | 43 | ], | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 44 | srcs: [ | 
|  | 45 | "Input.cpp", | 
|  | 46 | "InputDevice.cpp", | 
| Chris Ye | 4958d06 | 2020-08-20 13:21:10 -0700 | [diff] [blame] | 47 | "InputEventLabels.cpp", | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 48 | "Keyboard.cpp", | 
|  | 49 | "KeyCharacterMap.cpp", | 
|  | 50 | "KeyLayoutMap.cpp", | 
| Siarhei Vishniakou | 32f36ae | 2020-09-02 20:17:10 -0700 | [diff] [blame] | 51 | "PropertyMap.cpp", | 
| Siarhei Vishniakou | 26cf29d | 2019-02-15 16:48:38 -0600 | [diff] [blame] | 52 | "TouchVideoFrame.cpp", | 
| Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 53 | "VelocityControl.cpp", | 
|  | 54 | "VelocityTracker.cpp", | 
| Siarhei Vishniakou | 5ac663d | 2019-02-15 17:15:56 -0600 | [diff] [blame] | 55 | "VirtualKeyMap.cpp", | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 56 | ], | 
|  | 57 |  | 
|  | 58 | clang: true, | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 59 |  | 
| Orion Hodson | e32877a | 2020-04-22 11:10:13 +0100 | [diff] [blame] | 60 | header_libs: ["jni_headers"], | 
|  | 61 | export_header_lib_headers: ["jni_headers"], | 
|  | 62 |  | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 63 | shared_libs: [ | 
| Siarhei Vishniakou | ec2727e | 2017-07-06 10:22:03 -0700 | [diff] [blame] | 64 | "libbase", | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 65 | "liblog", | 
|  | 66 | "libcutils", | 
|  | 67 | ], | 
|  | 68 |  | 
| chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 69 | static_libs: [ | 
|  | 70 | "libui-types", | 
| chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame^] | 71 | "libgui_window_info_static", | 
| chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 72 | ], | 
|  | 73 |  | 
|  | 74 | export_static_lib_headers: [ | 
|  | 75 | "libui-types", | 
| chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame^] | 76 | "libgui_window_info_static", | 
| chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 77 | ], | 
|  | 78 |  | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 79 | target: { | 
|  | 80 | android: { | 
|  | 81 | srcs: [ | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 82 | "InputTransport.cpp", | 
| Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 83 | "android/os/BlockUntrustedTouchesMode.aidl", | 
| Siarhei Vishniakou | 7062295 | 2020-07-30 11:17:23 -0500 | [diff] [blame] | 84 | "android/os/IInputConstants.aidl", | 
| Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 85 | "android/os/IInputFlinger.aidl", | 
| Siarhei Vishniakou | ae6229e | 2019-12-30 16:23:19 -0800 | [diff] [blame] | 86 | "android/os/InputEventInjectionResult.aidl", | 
|  | 87 | "android/os/InputEventInjectionSync.aidl", | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 88 | "android/os/ISetInputWindowsListener.aidl", | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 89 | ], | 
|  | 90 |  | 
| Bernardo Rufino | ea97d18 | 2020-08-19 14:43:14 +0100 | [diff] [blame] | 91 | export_shared_lib_headers: ["libbinder"], | 
|  | 92 |  | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 93 | shared_libs: [ | 
|  | 94 | "libutils", | 
|  | 95 | "libbinder", | 
| Atif Niyaz | 3d3fa52 | 2019-07-25 11:12:39 -0700 | [diff] [blame] | 96 | "libui", | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 97 | ], | 
| Evgenii Stepanov | de98297 | 2017-01-31 16:37:44 -0800 | [diff] [blame] | 98 |  | 
|  | 99 | sanitize: { | 
|  | 100 | misc_undefined: ["integer"], | 
|  | 101 | }, | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 102 | }, | 
|  | 103 | host: { | 
|  | 104 | shared: { | 
|  | 105 | enabled: false, | 
|  | 106 | }, | 
| Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 107 | include_dirs: [ | 
|  | 108 | "frameworks/native/libs/arect/include", | 
|  | 109 | ], | 
|  | 110 | }, | 
|  | 111 | linux_glibc: { | 
|  | 112 | srcs: [ | 
|  | 113 | "InputTransport.cpp", | 
| Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 114 | "android/os/IInputConstants.aidl", | 
|  | 115 | "android/os/IInputFlinger.aidl", | 
|  | 116 | "android/os/ISetInputWindowsListener.aidl", | 
| Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 117 | ], | 
|  | 118 | static_libs: [ | 
|  | 119 | "libhostgraphics", | 
|  | 120 | ], | 
|  | 121 | shared_libs: [ | 
|  | 122 | "libbinder", | 
|  | 123 | ], | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 124 | }, | 
|  | 125 | }, | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 126 |  | 
|  | 127 | aidl: { | 
|  | 128 | local_include_dirs: ["."], | 
| Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 129 | export_aidl_headers: true, | 
| chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame^] | 130 | include_dirs: [ | 
|  | 131 | "frameworks/native/libs/gui", | 
|  | 132 | ], | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 133 | }, | 
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 134 | } | 
| Dan Willemsen | c7dd2b9 | 2016-08-25 17:05:22 -0700 | [diff] [blame] | 135 |  | 
| Siarhei Vishniakou | 32f36ae | 2020-09-02 20:17:10 -0700 | [diff] [blame] | 136 | cc_defaults { | 
|  | 137 | name: "libinput_fuzz_defaults", | 
|  | 138 | host_supported: true, | 
|  | 139 | shared_libs: [ | 
|  | 140 | "libutils", | 
|  | 141 | "libbase", | 
|  | 142 | "liblog", | 
|  | 143 | ], | 
|  | 144 | } | 
|  | 145 |  | 
|  | 146 | cc_fuzz { | 
|  | 147 | name: "libinput_fuzz_propertymap", | 
|  | 148 | defaults: ["libinput_fuzz_defaults"], | 
|  | 149 | srcs: [ | 
|  | 150 | "PropertyMap.cpp", | 
|  | 151 | "PropertyMap_fuzz.cpp", | 
|  | 152 | ], | 
|  | 153 | } | 
|  | 154 |  | 
| Dan Willemsen | c7dd2b9 | 2016-08-25 17:05:22 -0700 | [diff] [blame] | 155 | subdirs = ["tests"] |