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
15// Default flags to be used throughout all libraries in inputflinger.
16cc_defaults {
17    name: "inputflinger_defaults",
18    cflags: [
19        "-Wall",
20        "-Wextra",
21        "-Werror",
22        "-Wno-unused-parameter",
23        "-Wthread-safety",
24    ],
25}
26
27/////////////////////////////////////////////////
28// libinputflinger
29/////////////////////////////////////////////////
30
31filegroup {
32    name: "libinputflinger_sources",
33    srcs: [
34        "InputClassifier.cpp",
35        "InputClassifierConverter.cpp",
36        "InputManager.cpp",
37    ],
38}
39
40cc_defaults {
41    name: "libinputflinger_defaults",
42    srcs: [":libinputflinger_sources"],
43    shared_libs: [
44        "android.hardware.input.classifier@1.0",
45        "libbase",
46        "libbinder",
47        "libcrypto",
48        "libcutils",
49        "libhidlbase",
50        "libinput",
51        "liblog",
52        "libstatslog",
53        "libutils",
54        "libui",
55    ],
56}
57
58cc_library_shared {
59    name: "libinputflinger",
60    defaults: [
61        "inputflinger_defaults",
62        "libinputflinger_defaults",
63    ],
64    cflags: [
65        // TODO(b/23084678): Move inputflinger to its own process and mark it hidden
66        //-fvisibility=hidden
67    ],
68    shared_libs: [
69        // This should consist only of dependencies from inputflinger. Other dependencies should be
70        // in cc_defaults so that they are included in the tests.
71        "libinputflinger_base",
72        "libinputreporter",
73        "libinputreader",
74    ],
75    static_libs: [
76        "libinputdispatcher",
77    ],
78    export_static_lib_headers: [
79        "libinputdispatcher",
80    ],
81    export_include_dirs: [
82        ".",
83        "include",
84    ],
85}
86
87/////////////////////////////////////////////////
88// libinputflinger_base
89/////////////////////////////////////////////////
90
91cc_library_headers {
92    name: "libinputflinger_headers",
93    export_include_dirs: ["include"],
94}
95
96filegroup {
97    name: "libinputflinger_base_sources",
98    srcs: [
99        "InputListener.cpp",
100        "InputReaderBase.cpp",
101        "InputThread.cpp",
102    ],
103}
104
105cc_defaults {
106    name: "libinputflinger_base_defaults",
107    srcs: [":libinputflinger_base_sources"],
108    shared_libs: [
109        "libbase",
110        "libcutils",
111        "libinput",
112        "liblog",
113        "libutils",
114    ],
115    header_libs: [
116        "libinputflinger_headers",
117    ],
118}
119
120cc_library_shared {
121    name: "libinputflinger_base",
122    defaults: [
123        "inputflinger_defaults",
124        "libinputflinger_base_defaults",
125    ],
126    export_header_lib_headers: [
127        "libinputflinger_headers",
128    ],
129}
130