blob: 1a142c90fc0d46aacdfb1d41141b61a0910474fc [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",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050033 ],
34}
35
Dan Willemsen59e086f2016-07-25 17:13:45 -070036cc_library {
37 name: "libinput",
38 host_supported: true,
Frank Barchard9e947882017-03-06 11:17:52 -080039 cflags: [
40 "-Wall",
41 "-Wextra",
42 "-Werror",
43 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070044 srcs: [
45 "Input.cpp",
46 "InputDevice.cpp",
Chris Ye4958d062020-08-20 13:21:10 -070047 "InputEventLabels.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070048 "Keyboard.cpp",
49 "KeyCharacterMap.cpp",
50 "KeyLayoutMap.cpp",
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -070051 "PropertyMap.cpp",
Siarhei Vishniakou26cf29d2019-02-15 16:48:38 -060052 "TouchVideoFrame.cpp",
Brett Chabot58208522020-09-09 13:55:24 -070053 "VelocityControl.cpp",
54 "VelocityTracker.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060055 "VirtualKeyMap.cpp",
Dan Willemsen59e086f2016-07-25 17:13:45 -070056 ],
57
58 clang: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -070059
Orion Hodsone32877a2020-04-22 11:10:13 +010060 header_libs: ["jni_headers"],
61 export_header_lib_headers: ["jni_headers"],
62
Dan Willemsen59e086f2016-07-25 17:13:45 -070063 shared_libs: [
Siarhei Vishniakouec2727e2017-07-06 10:22:03 -070064 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -070065 "liblog",
66 "libcutils",
67 ],
68
chaviwfd9c1ed2020-07-01 10:57:59 -070069 static_libs: [
70 "libui-types",
chaviw3277faf2021-05-19 16:45:23 -050071 "libgui_window_info_static",
chaviwfd9c1ed2020-07-01 10:57:59 -070072 ],
73
74 export_static_lib_headers: [
75 "libui-types",
chaviw3277faf2021-05-19 16:45:23 -050076 "libgui_window_info_static",
chaviwfd9c1ed2020-07-01 10:57:59 -070077 ],
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 Vishniakou7766c032021-03-02 20:32:20 +000083 "android/os/BlockUntrustedTouchesMode.aidl",
Siarhei Vishniakou70622952020-07-30 11:17:23 -050084 "android/os/IInputConstants.aidl",
Siarhei Vishniakou7766c032021-03-02 20:32:20 +000085 "android/os/IInputFlinger.aidl",
Siarhei Vishniakouae6229e2019-12-30 16:23:19 -080086 "android/os/InputEventInjectionResult.aidl",
87 "android/os/InputEventInjectionSync.aidl",
Chris Ye0783e992020-06-02 21:34:49 -070088 "android/os/ISetInputWindowsListener.aidl",
Dan Willemsen59e086f2016-07-25 17:13:45 -070089 ],
90
Bernardo Rufinoea97d182020-08-19 14:43:14 +010091 export_shared_lib_headers: ["libbinder"],
92
Dan Willemsen59e086f2016-07-25 17:13:45 -070093 shared_libs: [
94 "libutils",
95 "libbinder",
Atif Niyaz3d3fa522019-07-25 11:12:39 -070096 "libui",
Dan Willemsen59e086f2016-07-25 17:13:45 -070097 ],
Evgenii Stepanovde982972017-01-31 16:37:44 -080098
99 sanitize: {
100 misc_undefined: ["integer"],
101 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700102 },
103 host: {
104 shared: {
105 enabled: false,
106 },
Brett Chabot58208522020-09-09 13:55:24 -0700107 include_dirs: [
108 "frameworks/native/libs/arect/include",
109 ],
110 },
111 linux_glibc: {
112 srcs: [
113 "InputTransport.cpp",
Brett Chabot58208522020-09-09 13:55:24 -0700114 "android/os/IInputConstants.aidl",
115 "android/os/IInputFlinger.aidl",
116 "android/os/ISetInputWindowsListener.aidl",
Brett Chabot58208522020-09-09 13:55:24 -0700117 ],
118 static_libs: [
119 "libhostgraphics",
120 ],
121 shared_libs: [
122 "libbinder",
123 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700124 },
125 },
Chris Ye0783e992020-06-02 21:34:49 -0700126
127 aidl: {
128 local_include_dirs: ["."],
Brett Chabot58208522020-09-09 13:55:24 -0700129 export_aidl_headers: true,
chaviw3277faf2021-05-19 16:45:23 -0500130 include_dirs: [
131 "frameworks/native/libs/gui",
132 ],
Chris Ye0783e992020-06-02 21:34:49 -0700133 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700134}
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700135
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -0700136cc_defaults {
137 name: "libinput_fuzz_defaults",
138 host_supported: true,
139 shared_libs: [
140 "libutils",
141 "libbase",
142 "liblog",
143 ],
144}
145
146cc_fuzz {
147 name: "libinput_fuzz_propertymap",
148 defaults: ["libinput_fuzz_defaults"],
149 srcs: [
150 "PropertyMap.cpp",
151 "PropertyMap_fuzz.cpp",
152 ],
153}
154
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700155subdirs = ["tests"]