blob: 6612a932a0d5f30da20b49ca8cde07b6373ef256 [file] [log] [blame]
Colin Cross45a1b9c2017-04-19 16:56:46 -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
Prabir Pradhan9244aea2020-02-05 20:31:40 -080015// Default flags to be used throughout all libraries in inputflinger.
Bob Badour3306e492021-02-25 15:35:37 -080016package {
17 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "frameworks_native_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["frameworks_native_license"],
23}
24
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080025cc_defaults {
26 name: "inputflinger_defaults",
27 cflags: [
28 "-Wall",
29 "-Wextra",
30 "-Werror",
31 "-Wno-unused-parameter",
32 "-Wthread-safety",
Siarhei Vishniakoub4d960d2019-10-03 15:38:44 -050033 "-Wshadow",
Siarhei Vishniakou3cab9b62020-08-05 11:45:47 -050034 "-Wshadow-field-in-constructor-modified",
35 "-Wshadow-uncaptured-local",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080036 ],
Siarhei Vishniakoud549b252020-08-11 11:25:26 -050037 sanitize: {
38 misc_undefined: ["bounds"],
39 },
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080040}
41
Prabir Pradhan9244aea2020-02-05 20:31:40 -080042/////////////////////////////////////////////////
43// libinputflinger
44/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070045
Prabir Pradhan9244aea2020-02-05 20:31:40 -080046filegroup {
47 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070048 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080049 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070050 "InputClassifierConverter.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070051 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070052 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080053}
Colin Cross45a1b9c2017-04-19 16:56:46 -070054
Prabir Pradhan9244aea2020-02-05 20:31:40 -080055cc_defaults {
56 name: "libinputflinger_defaults",
57 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070058 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080059 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080060 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070061 "libbinder",
Gang Wang342c9272020-01-13 13:15:04 -050062 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070063 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080064 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070065 "libinput",
Siarhei Vishniakou99b9d382021-04-01 08:03:41 +000066 "libkll",
Colin Cross45a1b9c2017-04-19 16:56:46 -070067 "liblog",
Siarhei Vishniakou99b9d382021-04-01 08:03:41 +000068 "libprotobuf-cpp-lite",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050069 "libstatslog",
Siarhei Vishniakoua04181f2021-03-26 05:56:49 +000070 "libstatspull",
71 "libstatssocket",
Colin Cross45a1b9c2017-04-19 16:56:46 -070072 "libutils",
73 "libui",
Siarhei Vishniakou2508b872020-12-03 16:33:53 -100074 "lib-platform-compat-native-api",
Siarhei Vishniakoua04181f2021-03-26 05:56:49 +000075 "server_configurable_flags",
Colin Cross45a1b9c2017-04-19 16:56:46 -070076 ],
chaviw09c8d2d2020-08-24 15:48:26 -070077 static_libs: [
78 "libattestation",
79 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080080}
Colin Cross45a1b9c2017-04-19 16:56:46 -070081
Prabir Pradhan9244aea2020-02-05 20:31:40 -080082cc_library_shared {
83 name: "libinputflinger",
84 defaults: [
85 "inputflinger_defaults",
86 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070087 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070088 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080089 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070090 //-fvisibility=hidden
91 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080092 shared_libs: [
93 // This should consist only of dependencies from inputflinger. Other dependencies should be
94 // in cc_defaults so that they are included in the tests.
95 "libinputflinger_base",
96 "libinputreporter",
97 "libinputreader",
98 ],
99 static_libs: [
100 "libinputdispatcher",
101 ],
102 export_static_lib_headers: [
103 "libinputdispatcher",
104 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800105 export_include_dirs: [
106 ".",
107 "include",
108 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800109}
110
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800111/////////////////////////////////////////////////
112// libinputflinger_base
113/////////////////////////////////////////////////
114
Prabir Pradhan29c95332018-11-14 20:14:11 -0800115cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -0800116 name: "libinputflinger_headers",
117 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800118}
119
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800120filegroup {
121 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800122 srcs: [
123 "InputListener.cpp",
124 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700125 "InputThread.cpp",
Nathaniel R. Lewiscacd69a2019-08-12 22:07:00 +0000126 "VibrationElement.cpp"
Prabir Pradhan29c95332018-11-14 20:14:11 -0800127 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800128}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800129
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800130cc_defaults {
131 name: "libinputflinger_base_defaults",
132 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800133 shared_libs: [
134 "libbase",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800135 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800136 "libinput",
137 "liblog",
chaviwfd9c1ed2020-07-01 10:57:59 -0700138 "libui",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800139 "libutils",
140 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800141 header_libs: [
142 "libinputflinger_headers",
143 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700144}
145
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800146cc_library_shared {
147 name: "libinputflinger_base",
148 defaults: [
149 "inputflinger_defaults",
150 "libinputflinger_base_defaults",
151 ],
152 export_header_lib_headers: [
153 "libinputflinger_headers",
154 ],
155}