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