blob: 28cce4759c00fd693cc70a42cddc7c87174d1c85 [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 ],
28}
29
Prabir Pradhan9244aea2020-02-05 20:31:40 -080030/////////////////////////////////////////////////
31// libinputflinger
32/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070033
Prabir Pradhan9244aea2020-02-05 20:31:40 -080034filegroup {
35 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070036 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080037 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070038 "InputClassifierConverter.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070039 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070040 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080041}
Colin Cross45a1b9c2017-04-19 16:56:46 -070042
Prabir Pradhan9244aea2020-02-05 20:31:40 -080043cc_defaults {
44 name: "libinputflinger_defaults",
45 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070046 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080047 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080048 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070049 "libbinder",
Gang Wang342c9272020-01-13 13:15:04 -050050 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070051 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080052 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070053 "libinput",
54 "liblog",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050055 "libstatslog",
Colin Cross45a1b9c2017-04-19 16:56:46 -070056 "libutils",
57 "libui",
Colin Cross45a1b9c2017-04-19 16:56:46 -070058 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080059}
Colin Cross45a1b9c2017-04-19 16:56:46 -070060
Prabir Pradhan9244aea2020-02-05 20:31:40 -080061cc_library_shared {
62 name: "libinputflinger",
63 defaults: [
64 "inputflinger_defaults",
65 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070066 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070067 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080068 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070069 //-fvisibility=hidden
70 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080071 shared_libs: [
72 // This should consist only of dependencies from inputflinger. Other dependencies should be
73 // in cc_defaults so that they are included in the tests.
74 "libinputflinger_base",
75 "libinputreporter",
76 "libinputreader",
77 ],
78 static_libs: [
79 "libinputdispatcher",
80 ],
81 export_static_lib_headers: [
82 "libinputdispatcher",
83 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080084 export_include_dirs: [
85 ".",
86 "include",
87 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080088}
89
Prabir Pradhan9244aea2020-02-05 20:31:40 -080090/////////////////////////////////////////////////
91// libinputflinger_base
92/////////////////////////////////////////////////
93
Prabir Pradhan29c95332018-11-14 20:14:11 -080094cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080095 name: "libinputflinger_headers",
96 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -080097}
98
Prabir Pradhan9244aea2020-02-05 20:31:40 -080099filegroup {
100 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800101 srcs: [
102 "InputListener.cpp",
103 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700104 "InputThread.cpp",
Nathaniel R. Lewiscacd69a2019-08-12 22:07:00 +0000105 "VibrationElement.cpp"
Prabir Pradhan29c95332018-11-14 20:14:11 -0800106 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800107}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800108
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800109cc_defaults {
110 name: "libinputflinger_base_defaults",
111 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800112 shared_libs: [
113 "libbase",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800114 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800115 "libinput",
116 "liblog",
chaviwfd9c1ed2020-07-01 10:57:59 -0700117 "libui",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800118 "libutils",
119 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800120 header_libs: [
121 "libinputflinger_headers",
122 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700123}
124
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800125cc_library_shared {
126 name: "libinputflinger_base",
127 defaults: [
128 "inputflinger_defaults",
129 "libinputflinger_base_defaults",
130 ],
131 export_header_lib_headers: [
132 "libinputflinger_headers",
133 ],
134}