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