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: [ |
Siarhei Vishniakou | ae6229e | 2019-12-30 16:23:19 -0800 | [diff] [blame] | 29 | "android/os/IInputConstants.aidl", |
| 30 | "android/os/InputEventInjectionResult.aidl", |
| 31 | "android/os/InputEventInjectionSync.aidl", |
Prabir Pradhan | 51e7db0 | 2022-02-07 06:02:57 -0800 | [diff] [blame] | 32 | "android/os/InputConfig.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", |
Siarhei Vishniakou | bb19287 | 2021-12-09 17:14:49 -0800 | [diff] [blame] | 38 | cpp_std: "c++20", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 39 | host_supported: true, |
Frank Barchard | 9e94788 | 2017-03-06 11:17:52 -0800 | [diff] [blame] | 40 | cflags: [ |
| 41 | "-Wall", |
| 42 | "-Wextra", |
| 43 | "-Werror", |
Philip Quinn | 8f953ab | 2022-12-06 15:37:07 -0800 | [diff] [blame] | 44 | "-Wno-unused-parameter", |
Frank Barchard | 9e94788 | 2017-03-06 11:17:52 -0800 | [diff] [blame] | 45 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 46 | srcs: [ |
| 47 | "Input.cpp", |
| 48 | "InputDevice.cpp", |
Chris Ye | 4958d06 | 2020-08-20 13:21:10 -0700 | [diff] [blame] | 49 | "InputEventLabels.cpp", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 50 | "Keyboard.cpp", |
| 51 | "KeyCharacterMap.cpp", |
| 52 | "KeyLayoutMap.cpp", |
Siarhei Vishniakou | 39147ce | 2022-11-15 12:13:04 -0800 | [diff] [blame] | 53 | "MotionPredictor.cpp", |
Siarhei Vishniakou | 814ace3 | 2022-03-04 15:12:16 -0800 | [diff] [blame] | 54 | "PrintTools.cpp", |
Siarhei Vishniakou | 32f36ae | 2020-09-02 20:17:10 -0700 | [diff] [blame] | 55 | "PropertyMap.cpp", |
Philip Quinn | 8f953ab | 2022-12-06 15:37:07 -0800 | [diff] [blame] | 56 | "TfLiteMotionPredictor.cpp", |
Siarhei Vishniakou | 26cf29d | 2019-02-15 16:48:38 -0600 | [diff] [blame] | 57 | "TouchVideoFrame.cpp", |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 58 | "VelocityControl.cpp", |
| 59 | "VelocityTracker.cpp", |
Zixuan Qu | dd0635d | 2023-02-06 04:52:38 +0000 | [diff] [blame] | 60 | "VirtualInputDevice.cpp", |
Siarhei Vishniakou | 5ac663d | 2019-02-15 17:15:56 -0600 | [diff] [blame] | 61 | "VirtualKeyMap.cpp", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 62 | ], |
| 63 | |
Philip Quinn | 8f953ab | 2022-12-06 15:37:07 -0800 | [diff] [blame] | 64 | header_libs: [ |
| 65 | "flatbuffer_headers", |
| 66 | "jni_headers", |
| 67 | "tensorflow_headers", |
| 68 | ], |
Orion Hodson | e32877a | 2020-04-22 11:10:13 +0100 | [diff] [blame] | 69 | export_header_lib_headers: ["jni_headers"], |
| 70 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 71 | shared_libs: [ |
Siarhei Vishniakou | ec2727e | 2017-07-06 10:22:03 -0700 | [diff] [blame] | 72 | "libbase", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 73 | "libcutils", |
Siarhei Vishniakou | 39147ce | 2022-11-15 12:13:04 -0800 | [diff] [blame] | 74 | "liblog", |
| 75 | "libPlatformProperties", |
Siarhei Vishniakou | a9fd82c | 2022-05-18 09:42:52 -0700 | [diff] [blame] | 76 | "libvintf", |
Philip Quinn | da6a448 | 2023-02-07 10:09:57 -0800 | [diff] [blame] | 77 | ], |
| 78 | |
| 79 | ldflags: [ |
| 80 | "-Wl,--exclude-libs=libtflite_static.a", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 81 | ], |
| 82 | |
chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 83 | static_libs: [ |
| 84 | "libui-types", |
Philip Quinn | da6a448 | 2023-02-07 10:09:57 -0800 | [diff] [blame] | 85 | "libtflite_static", |
chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 86 | ], |
| 87 | |
| 88 | export_static_lib_headers: [ |
| 89 | "libui-types", |
| 90 | ], |
| 91 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 92 | target: { |
| 93 | android: { |
| 94 | srcs: [ |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 95 | "InputTransport.cpp", |
Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 96 | "android/os/IInputFlinger.aidl", |
Prabir Pradhan | 51e7db0 | 2022-02-07 06:02:57 -0800 | [diff] [blame] | 97 | ":inputconstants_aidl", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 98 | ], |
| 99 | |
Bernardo Rufino | ea97d18 | 2020-08-19 14:43:14 +0100 | [diff] [blame] | 100 | export_shared_lib_headers: ["libbinder"], |
| 101 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 102 | shared_libs: [ |
| 103 | "libutils", |
| 104 | "libbinder", |
| 105 | ], |
Evgenii Stepanov | de98297 | 2017-01-31 16:37:44 -0800 | [diff] [blame] | 106 | |
Colin Cross | 433cfd9 | 2021-07-16 22:29:59 -0700 | [diff] [blame] | 107 | static_libs: [ |
| 108 | "libgui_window_info_static", |
| 109 | ], |
| 110 | |
| 111 | export_static_lib_headers: [ |
| 112 | "libgui_window_info_static", |
| 113 | ], |
| 114 | |
Evgenii Stepanov | de98297 | 2017-01-31 16:37:44 -0800 | [diff] [blame] | 115 | sanitize: { |
| 116 | misc_undefined: ["integer"], |
| 117 | }, |
Philip Quinn | 8f953ab | 2022-12-06 15:37:07 -0800 | [diff] [blame] | 118 | |
| 119 | required: [ |
| 120 | "motion_predictor_model_prebuilt", |
| 121 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 122 | }, |
| 123 | host: { |
| 124 | shared: { |
| 125 | enabled: false, |
| 126 | }, |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 127 | include_dirs: [ |
Zixuan Qu | dd0635d | 2023-02-06 04:52:38 +0000 | [diff] [blame] | 128 | "bionic/libc/kernel/android/uapi/", |
| 129 | "bionic/libc/kernel/uapi", |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 130 | "frameworks/native/libs/arect/include", |
| 131 | ], |
| 132 | }, |
Colin Cross | 4a4a85f | 2022-03-08 18:25:24 -0800 | [diff] [blame] | 133 | host_linux: { |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 134 | srcs: [ |
| 135 | "InputTransport.cpp", |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 136 | "android/os/IInputConstants.aidl", |
| 137 | "android/os/IInputFlinger.aidl", |
Prabir Pradhan | 51e7db0 | 2022-02-07 06:02:57 -0800 | [diff] [blame] | 138 | "android/os/InputConfig.aidl", |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 139 | ], |
| 140 | static_libs: [ |
| 141 | "libhostgraphics", |
Colin Cross | 433cfd9 | 2021-07-16 22:29:59 -0700 | [diff] [blame] | 142 | "libgui_window_info_static", |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 143 | ], |
| 144 | shared_libs: [ |
| 145 | "libbinder", |
| 146 | ], |
Colin Cross | 433cfd9 | 2021-07-16 22:29:59 -0700 | [diff] [blame] | 147 | |
| 148 | export_static_lib_headers: [ |
| 149 | "libgui_window_info_static", |
| 150 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 151 | }, |
| 152 | }, |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 153 | |
| 154 | aidl: { |
| 155 | local_include_dirs: ["."], |
Brett Chabot | 5820852 | 2020-09-09 13:55:24 -0700 | [diff] [blame] | 156 | export_aidl_headers: true, |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 157 | include_dirs: [ |
| 158 | "frameworks/native/libs/gui", |
| 159 | ], |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 160 | }, |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 161 | } |
Dan Willemsen | c7dd2b9 | 2016-08-25 17:05:22 -0700 | [diff] [blame] | 162 | |
Siarhei Vishniakou | 32f36ae | 2020-09-02 20:17:10 -0700 | [diff] [blame] | 163 | cc_defaults { |
| 164 | name: "libinput_fuzz_defaults", |
| 165 | host_supported: true, |
| 166 | shared_libs: [ |
| 167 | "libutils", |
| 168 | "libbase", |
| 169 | "liblog", |
| 170 | ], |
| 171 | } |
| 172 | |
| 173 | cc_fuzz { |
| 174 | name: "libinput_fuzz_propertymap", |
| 175 | defaults: ["libinput_fuzz_defaults"], |
| 176 | srcs: [ |
| 177 | "PropertyMap.cpp", |
| 178 | "PropertyMap_fuzz.cpp", |
| 179 | ], |
| 180 | } |
| 181 | |
Dan Willemsen | c7dd2b9 | 2016-08-25 17:05:22 -0700 | [diff] [blame] | 182 | subdirs = ["tests"] |