blob: 727f07f8c2311003530f0000e4ff7e61e9008c3d [file] [log] [blame]
Dan Willemsen6365a872016-09-13 16:29:54 -07001// Copyright (C) 2016 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
Steven Morelandc75fc622017-08-04 11:04:39 -070015cc_defaults {
16 name: "libhidl-defaults",
17 cflags: [
18 "-Wall",
Steven Moreland37814cb2018-10-24 16:28:35 -070019 "-Wdocumentation", // since some users use this
Steven Morelandc75fc622017-08-04 11:04:39 -070020 "-Werror",
Bernhard Rosenkränzer0c28fd22018-06-04 16:01:47 +020021 "-Wextra-semi",
Steven Morelandc75fc622017-08-04 11:04:39 -070022 ],
23}
Steven Moreland8dd65742017-02-17 22:39:46 -080024
Yifan Hong00f4a392016-11-16 12:35:58 -080025cc_test {
26 name: "libhidl_test",
Steven Morelandc75fc622017-08-04 11:04:39 -070027 defaults: ["libhidl-defaults"],
Yifan Hong00f4a392016-11-16 12:35:58 -080028 gtest: false,
29 srcs: ["test_main.cpp"],
Steven Moreland17453832019-02-25 12:01:22 -080030 test_suites: ["device-tests"],
Yifan Hong00f4a392016-11-16 12:35:58 -080031
Dan Willemsen6365a872016-09-13 16:29:54 -070032 shared_libs: [
Steven Moreland138c3502018-11-27 14:27:04 -080033 "android.hidl.memory@1.0",
Dan Willemsen6365a872016-09-13 16:29:54 -070034 "libbase",
Yifan Hong00f4a392016-11-16 12:35:58 -080035 "libhidlbase",
36 "libhidltransport",
37 "libhwbinder",
Dan Willemsen6365a872016-09-13 16:29:54 -070038 "liblog",
39 "libutils",
Jeff Tinker0f3461d2017-01-03 10:40:55 -080040 "libcutils",
Dan Willemsen6365a872016-09-13 16:29:54 -070041 ],
Yifan Hong2be94182017-03-03 19:07:38 -080042 static_libs: ["libgtest", "libgmock"],
Yifan Hong00f4a392016-11-16 12:35:58 -080043
44 cflags: [
45 "-O0",
46 "-g",
Steven Morelandc75fc622017-08-04 11:04:39 -070047 ],
Dan Willemsen6365a872016-09-13 16:29:54 -070048}
Steven Morelanda46371d2019-06-05 18:29:06 -070049
Steven Moreland9f53eda2019-06-17 17:17:02 -070050cc_defaults {
51 name: "libhidlbase-combined-impl",
Steven Morelanda46371d2019-06-05 18:29:06 -070052
53 defaults: [
Steven Moreland9f53eda2019-06-17 17:17:02 -070054 "libhwbinder-impl-shared-libs",
Steven Morelanda46371d2019-06-05 18:29:06 -070055 "libhidlbase-impl-shared-libs",
56 "libhidltransport-impl-shared-libs",
57 ],
58
59 whole_static_libs: [
60 "libhidlbase-impl-internal",
61 "libhidltransport-impl-internal",
62 ],
63}
64
Steven Moreland9f53eda2019-06-17 17:17:02 -070065cc_library {
66 name: "libhidlbase",
67 defaults: ["libhidlbase-combined-impl"],
68 recovery_available: true,
69 vendor_available: true,
70 vndk: {
71 enabled: true,
72 support_system_process: true,
73 },
74 whole_static_libs: [
75 "libhwbinder-impl-internal",
76 ],
77}
78
79// Only libhwbinder_benchmark needs to have pgo enabled. When all places
80// support having PGO selectively enabled, all places can use libhwbinder.
81//
82// http://b/77320844
83cc_library {
84 name: "libhidlbase_pgo",
85 defaults: [
86 "libhidlbase-combined-impl",
87 "hwbinder_benchmark_pgo",
88 ],
89 whole_static_libs: [
90 "libhwbinder_pgo-impl-internal",
91 ],
92}
93
Steven Morelanda46371d2019-06-05 18:29:06 -070094// WARNING: deprecated
95// This library is no longer required, and dependencies should be taken
96// on libhidlbase instead.
97cc_library {
98 name: "libhidltransport",
99 recovery_available: true,
100 vendor_available: true,
101 vndk: {
102 enabled: true,
103 support_system_process: true,
104 },
105}