| 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 | 3c53823 | 2021-02-12 21:26:48 -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 | |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 26 | cc_library { |
| 27 | name: "libinput", |
| 28 | host_supported: true, |
| Frank Barchard | 9e94788 | 2017-03-06 11:17:52 -0800 | [diff] [blame] | 29 | cflags: [ |
| 30 | "-Wall", |
| 31 | "-Wextra", |
| 32 | "-Werror", |
| 33 | ], |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 34 | srcs: [ |
| 35 | "Input.cpp", |
| 36 | "InputDevice.cpp", |
| 37 | "Keyboard.cpp", |
| 38 | "KeyCharacterMap.cpp", |
| 39 | "KeyLayoutMap.cpp", |
| Siarhei Vishniakou | 32f36ae | 2020-09-02 20:17:10 -0700 | [diff] [blame] | 40 | "PropertyMap.cpp", |
| Siarhei Vishniakou | 26cf29d | 2019-02-15 16:48:38 -0600 | [diff] [blame] | 41 | "TouchVideoFrame.cpp", |
| Siarhei Vishniakou | 5ac663d | 2019-02-15 17:15:56 -0600 | [diff] [blame] | 42 | "VirtualKeyMap.cpp", |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 43 | ], |
| 44 | |
| 45 | clang: true, |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 46 | |
| Orion Hodson | a58ef35 | 2020-04-22 11:10:13 +0100 | [diff] [blame] | 47 | header_libs: ["jni_headers"], |
| 48 | export_header_lib_headers: ["jni_headers"], |
| 49 | |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 50 | shared_libs: [ |
| Siarhei Vishniakou | ec2727e | 2017-07-06 10:22:03 -0700 | [diff] [blame] | 51 | "libbase", |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 52 | "liblog", |
| 53 | "libcutils", |
| 54 | ], |
| 55 | |
| 56 | target: { |
| 57 | android: { |
| 58 | srcs: [ |
| Siarhei Vishniakou | 5ac663d | 2019-02-15 17:15:56 -0600 | [diff] [blame] | 59 | "IInputFlinger.cpp", |
| 60 | "InputApplication.cpp", |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 61 | "InputTransport.cpp", |
| Siarhei Vishniakou | 5ac663d | 2019-02-15 17:15:56 -0600 | [diff] [blame] | 62 | "InputWindow.cpp", |
| chaviw | 291d88a | 2019-02-14 10:33:58 -0800 | [diff] [blame] | 63 | "ISetInputWindowsListener.cpp", |
| Atif Niyaz | 8384682 | 2019-07-18 15:17:40 -0700 | [diff] [blame] | 64 | "LatencyStatistics.cpp", |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 65 | "VelocityControl.cpp", |
| 66 | "VelocityTracker.cpp", |
| 67 | ], |
| 68 | |
| 69 | shared_libs: [ |
| 70 | "libutils", |
| 71 | "libbinder", |
| Atif Niyaz | 3d3fa52 | 2019-07-25 11:12:39 -0700 | [diff] [blame] | 72 | "libui", |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 73 | ], |
| Evgenii Stepanov | de98297 | 2017-01-31 16:37:44 -0800 | [diff] [blame] | 74 | |
| 75 | sanitize: { |
| 76 | misc_undefined: ["integer"], |
| 77 | }, |
| Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 78 | }, |
| 79 | host: { |
| 80 | shared: { |
| 81 | enabled: false, |
| 82 | }, |
| 83 | }, |
| 84 | }, |
| 85 | } |
| Dan Willemsen | c7dd2b9 | 2016-08-25 17:05:22 -0700 | [diff] [blame] | 86 | |
| Siarhei Vishniakou | 32f36ae | 2020-09-02 20:17:10 -0700 | [diff] [blame] | 87 | cc_defaults { |
| 88 | name: "libinput_fuzz_defaults", |
| 89 | host_supported: true, |
| 90 | shared_libs: [ |
| 91 | "libutils", |
| 92 | "libbase", |
| 93 | "liblog", |
| 94 | ], |
| 95 | } |
| 96 | |
| 97 | cc_fuzz { |
| 98 | name: "libinput_fuzz_propertymap", |
| 99 | defaults: ["libinput_fuzz_defaults"], |
| 100 | srcs: [ |
| 101 | "PropertyMap.cpp", |
| 102 | "PropertyMap_fuzz.cpp", |
| 103 | ], |
| 104 | } |
| 105 | |
| Dan Willemsen | c7dd2b9 | 2016-08-25 17:05:22 -0700 | [diff] [blame] | 106 | subdirs = ["tests"] |