Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 1 | // 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 Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 15 | // Default flags to be used throughout all libraries in inputflinger. |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 16 | package { |
| 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 | |
Michael Wright | 8e9a856 | 2022-02-09 13:44:29 +0000 | [diff] [blame^] | 25 | inputflinger_tidy_checks = [ |
| 26 | "android-*", |
| 27 | ] |
| 28 | |
Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 29 | cc_defaults { |
| 30 | name: "inputflinger_defaults", |
Siarhei Vishniakou | f47c339e | 2021-12-30 11:22:26 -0800 | [diff] [blame] | 31 | cpp_std: "c++20", |
Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 32 | cflags: [ |
| 33 | "-Wall", |
| 34 | "-Wextra", |
| 35 | "-Werror", |
| 36 | "-Wno-unused-parameter", |
| 37 | "-Wthread-safety", |
Siarhei Vishniakou | b4d960d | 2019-10-03 15:38:44 -0500 | [diff] [blame] | 38 | "-Wshadow", |
Siarhei Vishniakou | 3cab9b6 | 2020-08-05 11:45:47 -0500 | [diff] [blame] | 39 | "-Wshadow-field-in-constructor-modified", |
| 40 | "-Wshadow-uncaptured-local", |
Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 41 | ], |
Siarhei Vishniakou | d549b25 | 2020-08-11 11:25:26 -0500 | [diff] [blame] | 42 | sanitize: { |
| 43 | misc_undefined: ["bounds"], |
| 44 | }, |
Michael Wright | 8e9a856 | 2022-02-09 13:44:29 +0000 | [diff] [blame^] | 45 | tidy: true, |
| 46 | tidy_checks: [ |
| 47 | "-*", // Disable all checks not explicitly enabled for now |
| 48 | ] + inputflinger_tidy_checks, |
| 49 | tidy_checks_as_errors: inputflinger_tidy_checks, |
Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 50 | } |
| 51 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 52 | ///////////////////////////////////////////////// |
| 53 | // libinputflinger |
| 54 | ///////////////////////////////////////////////// |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 55 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 56 | filegroup { |
| 57 | name: "libinputflinger_sources", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 58 | srcs: [ |
Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 59 | "InputClassifier.cpp", |
Siarhei Vishniakou | a47a4d4 | 2019-05-06 17:14:11 -0700 | [diff] [blame] | 60 | "InputClassifierConverter.cpp", |
Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 61 | "UnwantedInteractionBlocker.cpp", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 62 | "InputManager.cpp", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 63 | ], |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 64 | } |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 65 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 66 | cc_defaults { |
| 67 | name: "libinputflinger_defaults", |
| 68 | srcs: [":libinputflinger_sources"], |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 69 | shared_libs: [ |
Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 70 | "android.hardware.input.classifier@1.0", |
Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 71 | "libbase", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 72 | "libbinder", |
Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 73 | "libchrome", |
Gang Wang | 342c927 | 2020-01-13 13:15:04 -0500 | [diff] [blame] | 74 | "libcrypto", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 75 | "libcutils", |
Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 76 | "libhidlbase", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 77 | "libinput", |
Siarhei Vishniakou | 99b9d38 | 2021-04-01 08:03:41 +0000 | [diff] [blame] | 78 | "libkll", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 79 | "liblog", |
Siarhei Vishniakou | 99b9d38 | 2021-04-01 08:03:41 +0000 | [diff] [blame] | 80 | "libprotobuf-cpp-lite", |
Siarhei Vishniakou | de4bf15 | 2019-08-16 11:12:52 -0500 | [diff] [blame] | 81 | "libstatslog", |
Siarhei Vishniakou | a04181f | 2021-03-26 05:56:49 +0000 | [diff] [blame] | 82 | "libstatspull", |
| 83 | "libstatssocket", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 84 | "libutils", |
| 85 | "libui", |
Siarhei Vishniakou | a04181f | 2021-03-26 05:56:49 +0000 | [diff] [blame] | 86 | "server_configurable_flags", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 87 | ], |
chaviw | 09c8d2d | 2020-08-24 15:48:26 -0700 | [diff] [blame] | 88 | static_libs: [ |
| 89 | "libattestation", |
Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 90 | "libpalmrejection", |
chaviw | 09c8d2d | 2020-08-24 15:48:26 -0700 | [diff] [blame] | 91 | ], |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 92 | } |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 93 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 94 | cc_library_shared { |
| 95 | name: "libinputflinger", |
| 96 | defaults: [ |
| 97 | "inputflinger_defaults", |
| 98 | "libinputflinger_defaults", |
Garfield Tan | e84e6f9 | 2019-08-29 17:28:41 -0700 | [diff] [blame] | 99 | ], |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 100 | cflags: [ |
Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 101 | // TODO(b/23084678): Move inputflinger to its own process and mark it hidden |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 102 | //-fvisibility=hidden |
| 103 | ], |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 104 | shared_libs: [ |
| 105 | // This should consist only of dependencies from inputflinger. Other dependencies should be |
| 106 | // in cc_defaults so that they are included in the tests. |
| 107 | "libinputflinger_base", |
| 108 | "libinputreporter", |
| 109 | "libinputreader", |
chaviw | 15fab6f | 2021-06-07 14:15:52 -0500 | [diff] [blame] | 110 | "libgui", |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 111 | ], |
| 112 | static_libs: [ |
| 113 | "libinputdispatcher", |
| 114 | ], |
| 115 | export_static_lib_headers: [ |
| 116 | "libinputdispatcher", |
| 117 | ], |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 118 | export_include_dirs: [ |
| 119 | ".", |
| 120 | "include", |
| 121 | ], |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 122 | } |
| 123 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 124 | ///////////////////////////////////////////////// |
| 125 | // libinputflinger_base |
| 126 | ///////////////////////////////////////////////// |
| 127 | |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 128 | cc_library_headers { |
Siarhei Vishniakou | 61291d4 | 2019-02-11 18:13:20 -0800 | [diff] [blame] | 129 | name: "libinputflinger_headers", |
| 130 | export_include_dirs: ["include"], |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 131 | } |
| 132 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 133 | filegroup { |
| 134 | name: "libinputflinger_base_sources", |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 135 | srcs: [ |
| 136 | "InputListener.cpp", |
| 137 | "InputReaderBase.cpp", |
Prabir Pradhan | 5a57cff | 2019-10-31 18:40:33 -0700 | [diff] [blame] | 138 | "InputThread.cpp", |
Prabir Pradhan | 8b89c2f | 2021-07-29 16:30:14 +0000 | [diff] [blame] | 139 | "VibrationElement.cpp", |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 140 | ], |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 141 | } |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 142 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 143 | cc_defaults { |
| 144 | name: "libinputflinger_base_defaults", |
| 145 | srcs: [":libinputflinger_base_sources"], |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 146 | shared_libs: [ |
| 147 | "libbase", |
Garfield Tan | ff1f1bb | 2020-01-28 13:24:04 -0800 | [diff] [blame] | 148 | "libcutils", |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 149 | "libinput", |
| 150 | "liblog", |
chaviw | fd9c1ed | 2020-07-01 10:57:59 -0700 | [diff] [blame] | 151 | "libui", |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 152 | "libutils", |
| 153 | ], |
Prabir Pradhan | 29c9533 | 2018-11-14 20:14:11 -0800 | [diff] [blame] | 154 | header_libs: [ |
| 155 | "libinputflinger_headers", |
| 156 | ], |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 157 | } |
| 158 | |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 159 | cc_library_shared { |
| 160 | name: "libinputflinger_base", |
| 161 | defaults: [ |
| 162 | "inputflinger_defaults", |
| 163 | "libinputflinger_base_defaults", |
| 164 | ], |
| 165 | export_header_lib_headers: [ |
| 166 | "libinputflinger_headers", |
| 167 | ], |
| 168 | } |