blob: 6f79f4b179b9d43df09222b627f256193d253a68 [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: [
Bernardo Rufinoea97d182020-08-19 14:43:14 +010029 "android/os/BlockUntrustedTouchesMode.aidl",
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080030 "android/os/IInputConstants.aidl",
31 "android/os/InputEventInjectionResult.aidl",
32 "android/os/InputEventInjectionSync.aidl",
33 "android/os/TouchOcclusionMode.aidl",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050034 ],
35}
36
Dan Willemsen59e086f2016-07-25 17:13:45 -070037cc_library {
38 name: "libinput",
39 host_supported: true,
Frank Barchard9e947882017-03-06 11:17:52 -080040 cflags: [
41 "-Wall",
42 "-Wextra",
43 "-Werror",
44 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070045 srcs: [
46 "Input.cpp",
47 "InputDevice.cpp",
Chris Ye4958d062020-08-20 13:21:10 -070048 "InputEventLabels.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070049 "Keyboard.cpp",
50 "KeyCharacterMap.cpp",
51 "KeyLayoutMap.cpp",
Brett Chabot58208522020-09-09 13:55:24 -070052 "LatencyStatistics.cpp",
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -070053 "PropertyMap.cpp",
Siarhei Vishniakou26cf29d2019-02-15 16:48:38 -060054 "TouchVideoFrame.cpp",
Brett Chabot58208522020-09-09 13:55:24 -070055 "VelocityControl.cpp",
56 "VelocityTracker.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060057 "VirtualKeyMap.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070058 ],
59
60 clang: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -070061
Orion Hodsone32877a2020-04-22 11:10:13 +010062 header_libs: ["jni_headers"],
63 export_header_lib_headers: ["jni_headers"],
64
Dan Willemsen59e086f2016-07-25 17:13:45 -070065 shared_libs: [
Siarhei Vishniakouec2727e2017-07-06 10:22:03 -070066 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -070067 "liblog",
68 "libcutils",
69 ],
70
chaviwfd9c1ed2020-07-01 10:57:59 -070071 static_libs: [
72 "libui-types",
73 ],
74
75 export_static_lib_headers: [
76 "libui-types",
77 ],
78
Dan Willemsen59e086f2016-07-25 17:13:45 -070079 target: {
80 android: {
81 srcs: [
Dan Willemsen59e086f2016-07-25 17:13:45 -070082 "InputTransport.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060083 "InputWindow.cpp",
Vishnu Naire798b472020-07-23 13:52:21 -070084 "android/FocusRequest.aidl",
Chris Ye6c4243b2020-07-22 12:07:12 -070085 "android/InputApplicationInfo.aidl",
Siarhei Vishniakou7766c032021-03-02 20:32:20 +000086 "android/os/BlockUntrustedTouchesMode.aidl",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050087 "android/os/IInputConstants.aidl",
Siarhei Vishniakou7766c032021-03-02 20:32:20 +000088 "android/os/IInputFlinger.aidl",
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080089 "android/os/InputEventInjectionResult.aidl",
90 "android/os/InputEventInjectionSync.aidl",
Chris Ye0783e992020-06-02 21:34:49 -070091 "android/os/ISetInputWindowsListener.aidl",
Siarhei Vishniakou7766c032021-03-02 20:32:20 +000092 "android/os/TouchOcclusionMode.aidl",
Dan Willemsen59e086f2016-07-25 17:13:45 -070093 ],
94
Bernardo Rufinoea97d182020-08-19 14:43:14 +010095 export_shared_lib_headers: ["libbinder"],
96
Dan Willemsen59e086f2016-07-25 17:13:45 -070097 shared_libs: [
98 "libutils",
99 "libbinder",
Atif Niyaz3d3fa522019-07-25 11:12:39 -0700100 "libui",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700101 ],
Evgenii Stepanovde982972017-01-31 16:37:44 -0800102
103 sanitize: {
104 misc_undefined: ["integer"],
105 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700106 },
107 host: {
108 shared: {
109 enabled: false,
110 },
Brett Chabot58208522020-09-09 13:55:24 -0700111 include_dirs: [
112 "frameworks/native/libs/arect/include",
113 ],
114 },
115 linux_glibc: {
116 srcs: [
117 "InputTransport.cpp",
118 "InputWindow.cpp",
119 "android/FocusRequest.aidl",
120 "android/InputApplicationInfo.aidl",
121 "android/os/IInputConstants.aidl",
122 "android/os/IInputFlinger.aidl",
123 "android/os/ISetInputWindowsListener.aidl",
124 "android/os/TouchOcclusionMode.aidl",
125 ],
126 static_libs: [
127 "libhostgraphics",
128 ],
129 shared_libs: [
130 "libbinder",
131 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700132 },
133 },
Chris Ye0783e992020-06-02 21:34:49 -0700134
135 aidl: {
136 local_include_dirs: ["."],
Brett Chabot58208522020-09-09 13:55:24 -0700137 export_aidl_headers: true,
Chris Ye0783e992020-06-02 21:34:49 -0700138 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700139}
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700140
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -0700141cc_defaults {
142 name: "libinput_fuzz_defaults",
143 host_supported: true,
144 shared_libs: [
145 "libutils",
146 "libbase",
147 "liblog",
148 ],
149}
150
151cc_fuzz {
152 name: "libinput_fuzz_propertymap",
153 defaults: ["libinput_fuzz_defaults"],
154 srcs: [
155 "PropertyMap.cpp",
156 "PropertyMap_fuzz.cpp",
157 ],
158}
159
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700160subdirs = ["tests"]