blob: f67c9d006b421035a54be3be6eff6c644266eed4 [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",
24 ],
25}
26
Prabir Pradhan9244aea2020-02-05 20:31:40 -080027/////////////////////////////////////////////////
28// libinputflinger
29/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070030
Prabir Pradhan9244aea2020-02-05 20:31:40 -080031filegroup {
32 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070033 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080034 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070035 "InputClassifierConverter.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070036 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070037 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080038}
Colin Cross45a1b9c2017-04-19 16:56:46 -070039
Prabir Pradhan9244aea2020-02-05 20:31:40 -080040cc_defaults {
41 name: "libinputflinger_defaults",
42 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070043 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080044 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080045 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070046 "libbinder",
Gang Wang342c9272020-01-13 13:15:04 -050047 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070048 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080049 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070050 "libinput",
51 "liblog",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050052 "libstatslog",
Colin Cross45a1b9c2017-04-19 16:56:46 -070053 "libutils",
54 "libui",
Colin Cross45a1b9c2017-04-19 16:56:46 -070055 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080056}
Colin Cross45a1b9c2017-04-19 16:56:46 -070057
Prabir Pradhan9244aea2020-02-05 20:31:40 -080058cc_library_shared {
59 name: "libinputflinger",
60 defaults: [
61 "inputflinger_defaults",
62 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070063 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070064 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080065 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070066 //-fvisibility=hidden
67 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080068 shared_libs: [
69 // This should consist only of dependencies from inputflinger. Other dependencies should be
70 // in cc_defaults so that they are included in the tests.
71 "libinputflinger_base",
72 "libinputreporter",
73 "libinputreader",
74 ],
75 static_libs: [
76 "libinputdispatcher",
77 ],
78 export_static_lib_headers: [
79 "libinputdispatcher",
80 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080081 export_include_dirs: [
82 ".",
83 "include",
84 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080085}
86
Prabir Pradhan9244aea2020-02-05 20:31:40 -080087/////////////////////////////////////////////////
88// libinputflinger_base
89/////////////////////////////////////////////////
90
Prabir Pradhan29c95332018-11-14 20:14:11 -080091cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080092 name: "libinputflinger_headers",
93 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -080094}
95
Prabir Pradhan9244aea2020-02-05 20:31:40 -080096filegroup {
97 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -080098 srcs: [
99 "InputListener.cpp",
100 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700101 "InputThread.cpp",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800102 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800103}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800104
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800105cc_defaults {
106 name: "libinputflinger_base_defaults",
107 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800108 shared_libs: [
109 "libbase",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800110 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800111 "libinput",
112 "liblog",
113 "libutils",
114 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800115 header_libs: [
116 "libinputflinger_headers",
117 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700118}
119
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800120cc_library_shared {
121 name: "libinputflinger_base",
122 defaults: [
123 "inputflinger_defaults",
124 "libinputflinger_base_defaults",
125 ],
126 export_header_lib_headers: [
127 "libinputflinger_headers",
128 ],
129}