blob: a53fcd763da580f5d9cb13b2d0165c241bb7c4c0 [file] [log] [blame]
Prabir Pradhanda7c00c2019-08-29 14:12:42 -07001// Copyright (C) 2019 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
Bob Badour3306e492021-02-25 15:35:37 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_native_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_native_license"],
22}
23
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070024cc_library_headers {
25 name: "libinputreader_headers",
Siarhei Vishniakou31977182022-09-30 08:51:23 -070026 host_supported: true,
Prabir Pradhan2770d242019-09-02 18:07:11 -070027 export_include_dirs: [
Chris Yee2b1e5c2021-03-10 22:45:12 -080028 "controller",
Prabir Pradhan2770d242019-09-02 18:07:11 -070029 "include",
30 "mapper",
31 "mapper/accumulator",
32 ],
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070033}
34
Prabir Pradhan9244aea2020-02-05 20:31:40 -080035filegroup {
36 name: "libinputreader_sources",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070037 srcs: [
38 "EventHub.cpp",
Prabir Pradhanbaa5c822019-08-30 15:27:05 -070039 "InputDevice.cpp",
Siarhei Vishniakou31977182022-09-30 08:51:23 -070040 "InputReader.cpp",
41 "TouchVideoDevice.cpp",
Chris Ye1dd2e5c2021-04-04 23:12:41 -070042 "controller/PeripheralController.cpp",
Prabir Pradhan2770d242019-09-02 18:07:11 -070043 "mapper/CursorInputMapper.cpp",
44 "mapper/ExternalStylusInputMapper.cpp",
45 "mapper/InputMapper.cpp",
46 "mapper/JoystickInputMapper.cpp",
47 "mapper/KeyboardInputMapper.cpp",
48 "mapper/MultiTouchInputMapper.cpp",
49 "mapper/RotaryEncoderInputMapper.cpp",
Chris Yef59a2f42020-10-16 12:55:26 -070050 "mapper/SensorInputMapper.cpp",
Prabir Pradhan2770d242019-09-02 18:07:11 -070051 "mapper/SingleTouchInputMapper.cpp",
52 "mapper/SwitchInputMapper.cpp",
53 "mapper/TouchInputMapper.cpp",
54 "mapper/VibratorInputMapper.cpp",
Siarhei Vishniakou31977182022-09-30 08:51:23 -070055 "mapper/accumulator/CursorButtonAccumulator.cpp",
56 "mapper/accumulator/CursorScrollAccumulator.cpp",
Prabir Pradhan84395e62022-10-26 19:52:00 +000057 "mapper/accumulator/HidUsageAccumulator.cpp",
Siarhei Vishniakou31977182022-09-30 08:51:23 -070058 "mapper/accumulator/SingleTouchMotionAccumulator.cpp",
59 "mapper/accumulator/TouchButtonAccumulator.cpp",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070060 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080061}
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070062
Prabir Pradhan9244aea2020-02-05 20:31:40 -080063cc_defaults {
64 name: "libinputreader_defaults",
65 srcs: [":libinputreader_sources"],
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070066 shared_libs: [
67 "libbase",
Siarhei Vishniakou7a522bf2019-09-24 12:46:29 +010068 "libcap",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070069 "libcrypto",
70 "libcutils",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070071 "liblog",
Chris Yed3fef462021-03-07 17:10:08 -080072 "libstatslog",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070073 "libutils",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070074 ],
Kim Low03ea0352020-11-06 12:45:07 -080075 static_libs: [
76 "libc++fs",
Siarhei Vishniakou862ae212022-09-28 15:17:28 -070077 "libui-types",
Kim Low03ea0352020-11-06 12:45:07 -080078 ],
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070079 header_libs: [
Kim Low03ea0352020-11-06 12:45:07 -080080 "libbatteryservice_headers",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070081 "libinputreader_headers",
82 ],
Siarhei Vishniakou31977182022-09-30 08:51:23 -070083 target: {
84 android: {
85 shared_libs: [
86 "libPlatformProperties",
87 "libinput",
88 ],
89 },
90 host: {
91 static_libs: [
92 "libinput",
Colin Cross5b799302022-10-18 21:52:41 -070093 "libbinder",
Siarhei Vishniakou31977182022-09-30 08:51:23 -070094 ],
95 },
96 },
Prabir Pradhan9244aea2020-02-05 20:31:40 -080097}
Prabir Pradhanda7c00c2019-08-29 14:12:42 -070098
Prabir Pradhan9244aea2020-02-05 20:31:40 -080099cc_library_shared {
100 name: "libinputreader",
Siarhei Vishniakou31977182022-09-30 08:51:23 -0700101 host_supported: true,
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800102 defaults: [
103 "inputflinger_defaults",
Prabir Pradhan8b89c2f2021-07-29 16:30:14 +0000104 "libinputreader_defaults",
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800105 ],
106 srcs: [
107 "InputReaderFactory.cpp",
108 ],
109 shared_libs: [
110 // This should consist only of dependencies from inputflinger. Other dependencies should be
111 // in cc_defaults so that they are included in the tests.
112 "libinputflinger_base",
113 ],
Prabir Pradhanda7c00c2019-08-29 14:12:42 -0700114 export_header_lib_headers: [
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800115 "libinputreader_headers",
Prabir Pradhanda7c00c2019-08-29 14:12:42 -0700116 ],
Siarhei Vishniakou31977182022-09-30 08:51:23 -0700117 target: {
118 host: {
119 include_dirs: [
120 "bionic/libc/kernel/android/uapi/",
121 "bionic/libc/kernel/uapi",
122 ],
123 },
124 },
Chris Ye8594e192020-07-14 10:34:06 -0700125 static_libs: [
Prabir Pradhan8b89c2f2021-07-29 16:30:14 +0000126 "libc++fs",
Chris Ye8594e192020-07-14 10:34:06 -0700127 ],
Prabir Pradhanda7c00c2019-08-29 14:12:42 -0700128}