blob: 5930f0a88482745fcc0f6833638f7d00a2897bcb [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 Vishniakou61291d42019-02-11 18:13:20 -080025 ],
26}
27
Prabir Pradhan9244aea2020-02-05 20:31:40 -080028/////////////////////////////////////////////////
29// libinputflinger
30/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070031
Prabir Pradhan9244aea2020-02-05 20:31:40 -080032filegroup {
33 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070034 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080035 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070036 "InputClassifierConverter.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070037 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070038 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080039}
Colin Cross45a1b9c2017-04-19 16:56:46 -070040
Prabir Pradhan9244aea2020-02-05 20:31:40 -080041cc_defaults {
42 name: "libinputflinger_defaults",
43 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070044 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080045 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080046 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070047 "libbinder",
Gang Wang342c9272020-01-13 13:15:04 -050048 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070049 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080050 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070051 "libinput",
52 "liblog",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050053 "libstatslog",
Colin Cross45a1b9c2017-04-19 16:56:46 -070054 "libutils",
55 "libui",
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",
Garfield Tanff1f1bb2020-01-28 13:24:04 -0800111 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800112 "libinput",
113 "liblog",
chaviwfd9c1ed2020-07-01 10:57:59 -0700114 "libui",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800115 "libutils",
116 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800117 header_libs: [
118 "libinputflinger_headers",
119 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700120}
121
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800122cc_library_shared {
123 name: "libinputflinger_base",
124 defaults: [
125 "inputflinger_defaults",
126 "libinputflinger_base_defaults",
127 ],
128 export_header_lib_headers: [
129 "libinputflinger_headers",
130 ],
131}