blob: f38dd98428f2c6a5bea95abb626e6465ad54c2e0 [file] [log] [blame]
Dan Willemsen59e086f2016-07-25 17:13:45 -07001// 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 Badour3306e492021-02-25 15:35:37 -080017package {
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 Vishniakou70622952020-07-30 11:17:23 -050026filegroup {
27 name: "inputconstants_aidl",
28 srcs: [
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080029 "android/os/IInputConstants.aidl",
30 "android/os/InputEventInjectionResult.aidl",
31 "android/os/InputEventInjectionSync.aidl",
Prabir Pradhan51e7db02022-02-07 06:02:57 -080032 "android/os/InputConfig.aidl",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050033 ],
34}
35
Dan Willemsen59e086f2016-07-25 17:13:45 -070036cc_library {
37 name: "libinput",
Siarhei Vishniakoubb192872021-12-09 17:14:49 -080038 cpp_std: "c++20",
Dan Willemsen59e086f2016-07-25 17:13:45 -070039 host_supported: true,
Frank Barchard9e947882017-03-06 11:17:52 -080040 cflags: [
41 "-Wall",
42 "-Wextra",
43 "-Werror",
Philip Quinn8f953ab2022-12-06 15:37:07 -080044 "-Wno-unused-parameter",
Frank Barchard9e947882017-03-06 11:17:52 -080045 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070046 srcs: [
47 "Input.cpp",
48 "InputDevice.cpp",
Chris Ye4958d062020-08-20 13:21:10 -070049 "InputEventLabels.cpp",
Siarhei Vishniakou92c8fd52023-01-29 14:57:43 -080050 "InputVerifier.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070051 "Keyboard.cpp",
52 "KeyCharacterMap.cpp",
53 "KeyLayoutMap.cpp",
Siarhei Vishniakou39147ce2022-11-15 12:13:04 -080054 "MotionPredictor.cpp",
Siarhei Vishniakou814ace32022-03-04 15:12:16 -080055 "PrintTools.cpp",
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -070056 "PropertyMap.cpp",
Philip Quinn8f953ab2022-12-06 15:37:07 -080057 "TfLiteMotionPredictor.cpp",
Siarhei Vishniakou26cf29d2019-02-15 16:48:38 -060058 "TouchVideoFrame.cpp",
Brett Chabot58208522020-09-09 13:55:24 -070059 "VelocityControl.cpp",
60 "VelocityTracker.cpp",
Zixuan Qudd0635d2023-02-06 04:52:38 +000061 "VirtualInputDevice.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060062 "VirtualKeyMap.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070063 ],
64
Philip Quinn8f953ab2022-12-06 15:37:07 -080065 header_libs: [
66 "flatbuffer_headers",
67 "jni_headers",
68 "tensorflow_headers",
69 ],
Orion Hodsone32877a2020-04-22 11:10:13 +010070 export_header_lib_headers: ["jni_headers"],
71
Prabir Pradhan1e63fc22023-02-23 19:03:03 +000072 generated_headers: [
73 "toolbox_input_labels",
74 ],
75
Dan Willemsen59e086f2016-07-25 17:13:45 -070076 shared_libs: [
Siarhei Vishniakouec2727e2017-07-06 10:22:03 -070077 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -070078 "libcutils",
Siarhei Vishniakou39147ce2022-11-15 12:13:04 -080079 "liblog",
80 "libPlatformProperties",
Siarhei Vishniakoua9fd82c2022-05-18 09:42:52 -070081 "libvintf",
Philip Quinnda6a4482023-02-07 10:09:57 -080082 ],
83
84 ldflags: [
85 "-Wl,--exclude-libs=libtflite_static.a",
Dan Willemsen59e086f2016-07-25 17:13:45 -070086 ],
87
chaviwfd9c1ed2020-07-01 10:57:59 -070088 static_libs: [
89 "libui-types",
Philip Quinnda6a4482023-02-07 10:09:57 -080090 "libtflite_static",
chaviwfd9c1ed2020-07-01 10:57:59 -070091 ],
92
93 export_static_lib_headers: [
94 "libui-types",
95 ],
96
Dan Willemsen59e086f2016-07-25 17:13:45 -070097 target: {
98 android: {
99 srcs: [
Dan Willemsen59e086f2016-07-25 17:13:45 -0700100 "InputTransport.cpp",
Siarhei Vishniakou7766c032021-03-02 20:32:20 +0000101 "android/os/IInputFlinger.aidl",
Prabir Pradhan51e7db02022-02-07 06:02:57 -0800102 ":inputconstants_aidl",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700103 ],
104
Bernardo Rufinoea97d182020-08-19 14:43:14 +0100105 export_shared_lib_headers: ["libbinder"],
106
Dan Willemsen59e086f2016-07-25 17:13:45 -0700107 shared_libs: [
108 "libutils",
109 "libbinder",
110 ],
Evgenii Stepanovde982972017-01-31 16:37:44 -0800111
Colin Cross433cfd92021-07-16 22:29:59 -0700112 static_libs: [
113 "libgui_window_info_static",
114 ],
115
116 export_static_lib_headers: [
117 "libgui_window_info_static",
118 ],
119
Evgenii Stepanovde982972017-01-31 16:37:44 -0800120 sanitize: {
121 misc_undefined: ["integer"],
122 },
Philip Quinn8f953ab2022-12-06 15:37:07 -0800123
124 required: [
125 "motion_predictor_model_prebuilt",
126 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700127 },
128 host: {
129 shared: {
130 enabled: false,
131 },
Brett Chabot58208522020-09-09 13:55:24 -0700132 include_dirs: [
Zixuan Qudd0635d2023-02-06 04:52:38 +0000133 "bionic/libc/kernel/android/uapi/",
134 "bionic/libc/kernel/uapi",
Brett Chabot58208522020-09-09 13:55:24 -0700135 "frameworks/native/libs/arect/include",
136 ],
137 },
Colin Cross4a4a85f2022-03-08 18:25:24 -0800138 host_linux: {
Brett Chabot58208522020-09-09 13:55:24 -0700139 srcs: [
140 "InputTransport.cpp",
Brett Chabot58208522020-09-09 13:55:24 -0700141 "android/os/IInputConstants.aidl",
142 "android/os/IInputFlinger.aidl",
Prabir Pradhan51e7db02022-02-07 06:02:57 -0800143 "android/os/InputConfig.aidl",
Brett Chabot58208522020-09-09 13:55:24 -0700144 ],
145 static_libs: [
146 "libhostgraphics",
Colin Cross433cfd92021-07-16 22:29:59 -0700147 "libgui_window_info_static",
Brett Chabot58208522020-09-09 13:55:24 -0700148 ],
149 shared_libs: [
150 "libbinder",
151 ],
Colin Cross433cfd92021-07-16 22:29:59 -0700152
153 export_static_lib_headers: [
154 "libgui_window_info_static",
155 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700156 },
157 },
Chris Ye0783e992020-06-02 21:34:49 -0700158
159 aidl: {
160 local_include_dirs: ["."],
Brett Chabot58208522020-09-09 13:55:24 -0700161 export_aidl_headers: true,
chaviw3277faf2021-05-19 16:45:23 -0500162 include_dirs: [
163 "frameworks/native/libs/gui",
164 ],
Chris Ye0783e992020-06-02 21:34:49 -0700165 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700166}
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700167
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -0700168cc_defaults {
169 name: "libinput_fuzz_defaults",
170 host_supported: true,
171 shared_libs: [
172 "libutils",
173 "libbase",
174 "liblog",
175 ],
176}
177
178cc_fuzz {
179 name: "libinput_fuzz_propertymap",
180 defaults: ["libinput_fuzz_defaults"],
181 srcs: [
182 "PropertyMap.cpp",
183 "PropertyMap_fuzz.cpp",
184 ],
185}
186
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700187subdirs = ["tests"]