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