blob: 439d9bf312452512379969ac77b840a91da4102e [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",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080055 "server_configurable_flags",
Colin Cross45a1b9c2017-04-19 16:56:46 -070056 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080057}
Colin Cross45a1b9c2017-04-19 16:56:46 -070058
Prabir Pradhan9244aea2020-02-05 20:31:40 -080059cc_library_shared {
60 name: "libinputflinger",
61 defaults: [
62 "inputflinger_defaults",
63 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070064 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070065 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080066 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070067 //-fvisibility=hidden
68 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080069 shared_libs: [
70 // This should consist only of dependencies from inputflinger. Other dependencies should be
71 // in cc_defaults so that they are included in the tests.
72 "libinputflinger_base",
73 "libinputreporter",
74 "libinputreader",
75 ],
76 static_libs: [
77 "libinputdispatcher",
78 ],
79 export_static_lib_headers: [
80 "libinputdispatcher",
81 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080082 export_include_dirs: [
83 ".",
84 "include",
85 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080086}
87
Prabir Pradhan9244aea2020-02-05 20:31:40 -080088/////////////////////////////////////////////////
89// libinputflinger_base
90/////////////////////////////////////////////////
91
Prabir Pradhan29c95332018-11-14 20:14:11 -080092cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080093 name: "libinputflinger_headers",
94 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -080095}
96
Prabir Pradhan9244aea2020-02-05 20:31:40 -080097filegroup {
98 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -080099 srcs: [
100 "InputListener.cpp",
101 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700102 "InputThread.cpp",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800103 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800104}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800105
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800106cc_defaults {
107 name: "libinputflinger_base_defaults",
108 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800109 shared_libs: [
110 "libbase",
111 "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}