blob: 8610737240bd1c78de40a4eae119e00b38f381d1 [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.
Bob Badour3c538232021-02-12 21:26:48 -080016package {
17 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "frameworks_native_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["frameworks_native_license"],
23}
24
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080025cc_defaults {
26 name: "inputflinger_defaults",
27 cflags: [
28 "-Wall",
29 "-Wextra",
30 "-Werror",
31 "-Wno-unused-parameter",
32 "-Wthread-safety",
33 ],
34}
35
Prabir Pradhan9244aea2020-02-05 20:31:40 -080036/////////////////////////////////////////////////
37// libinputflinger
38/////////////////////////////////////////////////
Colin Cross45a1b9c2017-04-19 16:56:46 -070039
Prabir Pradhan9244aea2020-02-05 20:31:40 -080040filegroup {
41 name: "libinputflinger_sources",
Colin Cross45a1b9c2017-04-19 16:56:46 -070042 srcs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080043 "InputClassifier.cpp",
Siarhei Vishniakoua47a4d42019-05-06 17:14:11 -070044 "InputClassifierConverter.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070045 "InputManager.cpp",
Colin Cross45a1b9c2017-04-19 16:56:46 -070046 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080047}
Colin Cross45a1b9c2017-04-19 16:56:46 -070048
Prabir Pradhan9244aea2020-02-05 20:31:40 -080049cc_defaults {
50 name: "libinputflinger_defaults",
51 srcs: [":libinputflinger_sources"],
Colin Cross45a1b9c2017-04-19 16:56:46 -070052 shared_libs: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080053 "android.hardware.input.classifier@1.0",
Siarhei Vishniakou61291d42019-02-11 18:13:20 -080054 "libbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070055 "libbinder",
Gang Wang342c9272020-01-13 13:15:04 -050056 "libcrypto",
Colin Cross45a1b9c2017-04-19 16:56:46 -070057 "libcutils",
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080058 "libhidlbase",
Colin Cross45a1b9c2017-04-19 16:56:46 -070059 "libinput",
60 "liblog",
Siarhei Vishniakoude4bf152019-08-16 11:12:52 -050061 "libstatslog",
Colin Cross45a1b9c2017-04-19 16:56:46 -070062 "libutils",
63 "libui",
Colin Cross45a1b9c2017-04-19 16:56:46 -070064 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080065}
Colin Cross45a1b9c2017-04-19 16:56:46 -070066
Prabir Pradhan9244aea2020-02-05 20:31:40 -080067cc_library_shared {
68 name: "libinputflinger",
69 defaults: [
70 "inputflinger_defaults",
71 "libinputflinger_defaults",
Garfield Tane84e6f92019-08-29 17:28:41 -070072 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -070073 cflags: [
Siarhei Vishniakou473174e2017-12-27 16:44:42 -080074 // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
Colin Cross45a1b9c2017-04-19 16:56:46 -070075 //-fvisibility=hidden
76 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -080077 shared_libs: [
78 // This should consist only of dependencies from inputflinger. Other dependencies should be
79 // in cc_defaults so that they are included in the tests.
80 "libinputflinger_base",
81 "libinputreporter",
82 "libinputreader",
83 ],
84 static_libs: [
85 "libinputdispatcher",
86 ],
87 export_static_lib_headers: [
88 "libinputdispatcher",
89 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080090 export_include_dirs: [
91 ".",
92 "include",
93 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -080094}
95
Prabir Pradhan9244aea2020-02-05 20:31:40 -080096/////////////////////////////////////////////////
97// libinputflinger_base
98/////////////////////////////////////////////////
99
Prabir Pradhan29c95332018-11-14 20:14:11 -0800100cc_library_headers {
Siarhei Vishniakou61291d42019-02-11 18:13:20 -0800101 name: "libinputflinger_headers",
102 export_include_dirs: ["include"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800103}
104
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800105filegroup {
106 name: "libinputflinger_base_sources",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800107 srcs: [
108 "InputListener.cpp",
109 "InputReaderBase.cpp",
Prabir Pradhan5a57cff2019-10-31 18:40:33 -0700110 "InputThread.cpp",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800111 ],
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800112}
Prabir Pradhan29c95332018-11-14 20:14:11 -0800113
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800114cc_defaults {
115 name: "libinputflinger_base_defaults",
116 srcs: [":libinputflinger_base_sources"],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800117 shared_libs: [
118 "libbase",
Garfield Tan1c7bc862020-01-28 13:24:04 -0800119 "libcutils",
Prabir Pradhan29c95332018-11-14 20:14:11 -0800120 "libinput",
121 "liblog",
122 "libutils",
123 ],
Prabir Pradhan29c95332018-11-14 20:14:11 -0800124 header_libs: [
125 "libinputflinger_headers",
126 ],
Colin Cross45a1b9c2017-04-19 16:56:46 -0700127}
128
Prabir Pradhan9244aea2020-02-05 20:31:40 -0800129cc_library_shared {
130 name: "libinputflinger_base",
131 defaults: [
132 "inputflinger_defaults",
133 "libinputflinger_base_defaults",
134 ],
135 export_header_lib_headers: [
136 "libinputflinger_headers",
137 ],
138}