blob: 5030d60da26d9dbf1d23428f728ba0b2c77f531e [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",
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",
Siarhei Vishniakou814ace32022-03-04 15:12:16 -080052 "PrintTools.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
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",
Siarhei Vishniakoua9fd82c2022-05-18 09:42:52 -070067 "libvintf",
Dan Willemsen59e086f2016-07-25 17:13:45 -070068 ],
69
chaviwfd9c1ed2020-07-01 10:57:59 -070070 static_libs: [
71 "libui-types",
72 ],
73
74 export_static_lib_headers: [
75 "libui-types",
76 ],
77
Dan Willemsen59e086f2016-07-25 17:13:45 -070078 target: {
79 android: {
80 srcs: [
Dan Willemsen59e086f2016-07-25 17:13:45 -070081 "InputTransport.cpp",
Siarhei Vishniakou7766c032021-03-02 20:32:20 +000082 "android/os/IInputFlinger.aidl",
Prabir Pradhan51e7db02022-02-07 06:02:57 -080083 ":inputconstants_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
Colin Cross433cfd92021-07-16 22:29:59 -070094 static_libs: [
95 "libgui_window_info_static",
96 ],
97
98 export_static_lib_headers: [
99 "libgui_window_info_static",
100 ],
101
Evgenii Stepanovde982972017-01-31 16:37:44 -0800102 sanitize: {
103 misc_undefined: ["integer"],
104 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700105 },
106 host: {
107 shared: {
108 enabled: false,
109 },
Brett Chabot58208522020-09-09 13:55:24 -0700110 include_dirs: [
111 "frameworks/native/libs/arect/include",
112 ],
113 },
Colin Cross4a4a85f2022-03-08 18:25:24 -0800114 host_linux: {
Brett Chabot58208522020-09-09 13:55:24 -0700115 srcs: [
116 "InputTransport.cpp",
Brett Chabot58208522020-09-09 13:55:24 -0700117 "android/os/IInputConstants.aidl",
118 "android/os/IInputFlinger.aidl",
Prabir Pradhan51e7db02022-02-07 06:02:57 -0800119 "android/os/InputConfig.aidl",
Brett Chabot58208522020-09-09 13:55:24 -0700120 ],
121 static_libs: [
122 "libhostgraphics",
Colin Cross433cfd92021-07-16 22:29:59 -0700123 "libgui_window_info_static",
Brett Chabot58208522020-09-09 13:55:24 -0700124 ],
125 shared_libs: [
126 "libbinder",
127 ],
Colin Cross433cfd92021-07-16 22:29:59 -0700128
129 export_static_lib_headers: [
130 "libgui_window_info_static",
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,
chaviw3277faf2021-05-19 16:45:23 -0500138 include_dirs: [
139 "frameworks/native/libs/gui",
140 ],
Chris Ye0783e992020-06-02 21:34:49 -0700141 },
Dan Willemsen59e086f2016-07-25 17:13:45 -0700142}
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700143
Siarhei Vishniakou32f36ae2020-09-02 20:17:10 -0700144cc_defaults {
145 name: "libinput_fuzz_defaults",
146 host_supported: true,
147 shared_libs: [
148 "libutils",
149 "libbase",
150 "liblog",
151 ],
152}
153
154cc_fuzz {
155 name: "libinput_fuzz_propertymap",
156 defaults: ["libinput_fuzz_defaults"],
157 srcs: [
158 "PropertyMap.cpp",
159 "PropertyMap_fuzz.cpp",
160 ],
161}
162
Dan Willemsenc7dd2b92016-08-25 17:05:22 -0700163subdirs = ["tests"]