blob: b640e9c761667b7c1b272a82da21def7a39a80d1 [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.
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080016cc_defaults {
17 name: "inputflinger_defaults",
18 cflags: [
19 "-Wall",
20 "-Wextra",
21 "-Werror",
22 "-Wno-unused-parameter",
23 "-Wthread-safety",
Siarhei Vishniakoub4d960d2019-10-03 15:38:44 -050024 "-Wshadow",
Siarhei Vishniakou3cab9b62020-08-05 11:45:47 -050025 "-Wshadow-field-in-constructor-modified",
26 "-Wshadow-uncaptured-local",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080027 ],
Siarhei Vishniakoud549b252020-08-11 11:25:26 -050028 sanitize: {
29 misc_undefined: ["bounds"],
30 },
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080031}
32
Prabir Pradhan9244aea2020-02-05 20:31:40 -080033/////////////////////////////////////////////////
34// libinputflinger
35/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070036
Prabir Pradhan9244aea2020-02-05 20:31:40 -080037filegroup {
38 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070039 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080040 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070041 "InputClassifierConverter.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070042 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070043 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080044}
Colin Cross45a1b9c2017-04-19 16:56:46 -070045
Prabir Pradhan9244aea2020-02-05 20:31:40 -080046cc_defaults {
47 name: "libinputflinger_defaults",
48 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070049 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080050 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080051 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070052 "libbinder",
Gang Wang342c9272020-01-13 13:15:04 -050053 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070054 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080055 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070056 "libinput",
57 "liblog",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050058 "libstatslog",
Colin Cross45a1b9c2017-04-19 16:56:46 -070059 "libutils",
60 "libui",
Siarhei Vishniakou2508b872020-12-03 16:33:53 -100061 "lib-platform-compat-native-api",
Colin Cross45a1b9c2017-04-19 16:56:46 -070062 ],
chaviw09c8d2d2020-08-24 15:48:26 -070063 static_libs: [
64 "libattestation",
65 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080066}
Colin Cross45a1b9c2017-04-19 16:56:46 -070067
Prabir Pradhan9244aea2020-02-05 20:31:40 -080068cc_library_shared {
69 name: "libinputflinger",
70 defaults: [
71 "inputflinger_defaults",
72 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070073 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070074 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080075 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070076 //-fvisibility=hidden
77 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080078 shared_libs: [
79 // This should consist only of dependencies from inputflinger. Other dependencies should be
80 // in cc_defaults so that they are included in the tests.
81 "libinputflinger_base",
82 "libinputreporter",
83 "libinputreader",
84 ],
85 static_libs: [
86 "libinputdispatcher",
87 ],
88 export_static_lib_headers: [
89 "libinputdispatcher",
90 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080091 export_include_dirs: [
92 ".",
93 "include",
94 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080095}
96
Prabir Pradhan9244aea2020-02-05 20:31:40 -080097/////////////////////////////////////////////////
98// libinputflinger_base
99/////////////////////////////////////////////////
100
Prabir Pradhan29c95332018-11-14 20:14:11 -0800101cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -0800102 name: "libinputflinger_headers",
103 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800104}
105
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800106filegroup {
107 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800108 srcs: [
109 "InputListener.cpp",
110 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700111 "InputThread.cpp",
Nathaniel R. Lewiscacd69a2019-08-12 22:07:00 +0000112 "VibrationElement.cpp"
Prabir Pradhan29c95332018-11-14 20:14:11 -0800113 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800114}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800115
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800116cc_defaults {
117 name: "libinputflinger_base_defaults",
118 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800119 shared_libs: [
120 "libbase",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800121 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800122 "libinput",
123 "liblog",
chaviwfd9c1ed2020-07-01 10:57:59 -0700124 "libui",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800125 "libutils",
126 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800127 header_libs: [
128 "libinputflinger_headers",
129 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700130}
131
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800132cc_library_shared {
133 name: "libinputflinger_base",
134 defaults: [
135 "inputflinger_defaults",
136 "libinputflinger_base_defaults",
137 ],
138 export_header_lib_headers: [
139 "libinputflinger_headers",
140 ],
141}