blob: d8c3e6fbc7e54cb17950d75b20ccc834d2f50f81 [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
Siarhei Vishniakou70622952020-07-30 11:17:23 -050017filegroup {
18 name: "inputconstants_aidl",
19 srcs: [
Bernardo Rufinoea97d182020-08-19 14:43:14 +010020 "android/os/BlockUntrustedTouchesMode.aidl",
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080021 "android/os/IInputConstants.aidl",
22 "android/os/InputEventInjectionResult.aidl",
23 "android/os/InputEventInjectionSync.aidl",
24 "android/os/TouchOcclusionMode.aidl",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050025 ],
26}
27
Dan Willemsen59e086f2016-07-25 17:13:45 -070028cc_library {
29 name: "libinput",
30 host_supported: true,
Frank Barchard9e947882017-03-06 11:17:52 -080031 cflags: [
32 "-Wall",
33 "-Wextra",
34 "-Werror",
35 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070036 srcs: [
37 "Input.cpp",
38 "InputDevice.cpp",
Chris Ye4958d062020-08-20 13:21:10 -070039 "InputEventLabels.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070040 "Keyboard.cpp",
41 "KeyCharacterMap.cpp",
42 "KeyLayoutMap.cpp",
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -070043 "PropertyMap.cpp",
Siarhei Vishniakou26cf29d2019-02-15 16:48:38 -060044 "TouchVideoFrame.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060045 "VirtualKeyMap.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070046 ],
47
48 clang: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -070049
Orion Hodsone32877a2020-04-22 11:10:13 +010050 header_libs: ["jni_headers"],
51 export_header_lib_headers: ["jni_headers"],
52
Dan Willemsen59e086f2016-07-25 17:13:45 -070053 shared_libs: [
Siarhei Vishniakouec2727e2017-07-06 10:22:03 -070054 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -070055 "liblog",
56 "libcutils",
57 ],
58
chaviwfd9c1ed2020-07-01 10:57:59 -070059 static_libs: [
60 "libui-types",
61 ],
62
63 export_static_lib_headers: [
64 "libui-types",
65 ],
66
Dan Willemsen59e086f2016-07-25 17:13:45 -070067 target: {
68 android: {
69 srcs: [
Dan Willemsen59e086f2016-07-25 17:13:45 -070070 "InputTransport.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060071 "InputWindow.cpp",
Atif Niyaz83846822019-07-18 15:17:40 -070072 "LatencyStatistics.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070073 "VelocityControl.cpp",
74 "VelocityTracker.cpp",
Vishnu Naire798b472020-07-23 13:52:21 -070075 "android/FocusRequest.aidl",
Chris Ye6c4243b2020-07-22 12:07:12 -070076 "android/InputApplicationInfo.aidl",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050077 "android/os/IInputConstants.aidl",
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080078 "android/os/InputEventInjectionResult.aidl",
79 "android/os/InputEventInjectionSync.aidl",
Bernardo Rufinoea97d182020-08-19 14:43:14 +010080 "android/os/TouchOcclusionMode.aidl",
81 "android/os/BlockUntrustedTouchesMode.aidl",
Chris Ye0783e992020-06-02 21:34:49 -070082 "android/os/IInputFlinger.aidl",
83 "android/os/ISetInputWindowsListener.aidl",
Dan Willemsen59e086f2016-07-25 17:13:45 -070084 ],
85
Bernardo Rufinoea97d182020-08-19 14:43:14 +010086 export_shared_lib_headers: ["libbinder"],
87
Dan Willemsen59e086f2016-07-25 17:13:45 -070088 shared_libs: [
89 "libutils",
90 "libbinder",
Atif Niyaz3d3fa522019-07-25 11:12:39 -070091 "libui",
Dan Willemsen59e086f2016-07-25 17:13:45 -070092 ],
Evgenii Stepanovde982972017-01-31 16:37:44 -080093
94 sanitize: {
95 misc_undefined: ["integer"],
96 },
Dan Willemsen59e086f2016-07-25 17:13:45 -070097 },
98 host: {
99 shared: {
100 enabled: false,
101 },
102 },
103 },
Chris Ye0783e992020-06-02 21:34:49 -0700104
105 aidl: {
106 local_include_dirs: ["."],
107 export_aidl_headers: true
108 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700109}
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700110
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -0700111cc_defaults {
112 name: "libinput_fuzz_defaults",
113 host_supported: true,
114 shared_libs: [
115 "libutils",
116 "libbase",
117 "liblog",
118 ],
119}
120
121cc_fuzz {
122 name: "libinput_fuzz_propertymap",
123 defaults: ["libinput_fuzz_defaults"],
124 srcs: [
125 "PropertyMap.cpp",
126 "PropertyMap_fuzz.cpp",
127 ],
128}
129
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700130subdirs = ["tests"]