Dan Willemsen | 6365a87 | 2016-09-13 16:29:54 -0700 | [diff] [blame] | 1 | // 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 Moreland | c75fc62 | 2017-08-04 11:04:39 -0700 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "libhidl-defaults", |
| 17 | cflags: [ |
| 18 | "-Wall", |
Steven Moreland | 37814cb | 2018-10-24 16:28:35 -0700 | [diff] [blame] | 19 | "-Wdocumentation", // since some users use this |
Steven Moreland | c75fc62 | 2017-08-04 11:04:39 -0700 | [diff] [blame] | 20 | "-Werror", |
Bernhard Rosenkränzer | 0c28fd2 | 2018-06-04 16:01:47 +0200 | [diff] [blame] | 21 | "-Wextra-semi", |
Steven Moreland | c75fc62 | 2017-08-04 11:04:39 -0700 | [diff] [blame] | 22 | ], |
| 23 | } |
Steven Moreland | 8dd6574 | 2017-02-17 22:39:46 -0800 | [diff] [blame] | 24 | |
Steven Moreland | 37e8d3a | 2019-04-26 12:33:21 -0700 | [diff] [blame] | 25 | phony { |
| 26 | name: "libhidl", |
| 27 | required: [ |
| 28 | "libhidlbase", |
Steven Moreland | 37e8d3a | 2019-04-26 12:33:21 -0700 | [diff] [blame] | 29 | ], |
| 30 | } |
| 31 | |
Steven Moreland | e695c3e | 2019-08-21 15:36:22 -0700 | [diff] [blame] | 32 | cc_library_headers { |
| 33 | name: "libhidl_gtest_helpers", |
| 34 | export_include_dirs: ["gtest_helpers"], |
| 35 | } |
| 36 | |
Yifan Hong | 00f4a39 | 2016-11-16 12:35:58 -0800 | [diff] [blame] | 37 | cc_test { |
| 38 | name: "libhidl_test", |
Steven Moreland | c75fc62 | 2017-08-04 11:04:39 -0700 | [diff] [blame] | 39 | defaults: ["libhidl-defaults"], |
Yifan Hong | 00f4a39 | 2016-11-16 12:35:58 -0800 | [diff] [blame] | 40 | gtest: false, |
| 41 | srcs: ["test_main.cpp"], |
Steven Moreland | 1745383 | 2019-02-25 12:01:22 -0800 | [diff] [blame] | 42 | test_suites: ["device-tests"], |
Yifan Hong | 00f4a39 | 2016-11-16 12:35:58 -0800 | [diff] [blame] | 43 | |
Dan Willemsen | 6365a87 | 2016-09-13 16:29:54 -0700 | [diff] [blame] | 44 | shared_libs: [ |
Steven Moreland | 138c350 | 2018-11-27 14:27:04 -0800 | [diff] [blame] | 45 | "android.hidl.memory@1.0", |
Dan Willemsen | 6365a87 | 2016-09-13 16:29:54 -0700 | [diff] [blame] | 46 | "libbase", |
Steven Moreland | 348563a | 2019-06-19 13:53:19 -0700 | [diff] [blame^] | 47 | "libhidlbase", |
| 48 | "liblog", |
Dan Willemsen | 6365a87 | 2016-09-13 16:29:54 -0700 | [diff] [blame] | 49 | "libutils", |
Jeff Tinker | 0f3461d | 2017-01-03 10:40:55 -0800 | [diff] [blame] | 50 | "libcutils", |
Dan Willemsen | 6365a87 | 2016-09-13 16:29:54 -0700 | [diff] [blame] | 51 | ], |
Steven Moreland | 348563a | 2019-06-19 13:53:19 -0700 | [diff] [blame^] | 52 | static_libs: ["libgtest", "libgmock"], |
Yifan Hong | 00f4a39 | 2016-11-16 12:35:58 -0800 | [diff] [blame] | 53 | |
| 54 | cflags: [ |
| 55 | "-O0", |
| 56 | "-g", |
Steven Moreland | c75fc62 | 2017-08-04 11:04:39 -0700 | [diff] [blame] | 57 | ], |
Dan Willemsen | 6365a87 | 2016-09-13 16:29:54 -0700 | [diff] [blame] | 58 | } |
Steven Moreland | a46371d | 2019-06-05 18:29:06 -0700 | [diff] [blame] | 59 | |
Steven Moreland | 9f53eda | 2019-06-17 17:17:02 -0700 | [diff] [blame] | 60 | cc_defaults { |
| 61 | name: "libhidlbase-combined-impl", |
Steven Moreland | a46371d | 2019-06-05 18:29:06 -0700 | [diff] [blame] | 62 | |
| 63 | defaults: [ |
Steven Moreland | 9f53eda | 2019-06-17 17:17:02 -0700 | [diff] [blame] | 64 | "libhwbinder-impl-shared-libs", |
Steven Moreland | a46371d | 2019-06-05 18:29:06 -0700 | [diff] [blame] | 65 | "libhidlbase-impl-shared-libs", |
| 66 | "libhidltransport-impl-shared-libs", |
| 67 | ], |
| 68 | |
| 69 | whole_static_libs: [ |
| 70 | "libhidlbase-impl-internal", |
| 71 | "libhidltransport-impl-internal", |
| 72 | ], |
| 73 | } |
| 74 | |
Steven Moreland | 9f53eda | 2019-06-17 17:17:02 -0700 | [diff] [blame] | 75 | cc_library { |
| 76 | name: "libhidlbase", |
| 77 | defaults: ["libhidlbase-combined-impl"], |
| 78 | recovery_available: true, |
| 79 | vendor_available: true, |
| 80 | vndk: { |
| 81 | enabled: true, |
| 82 | support_system_process: true, |
| 83 | }, |
| 84 | whole_static_libs: [ |
| 85 | "libhwbinder-impl-internal", |
| 86 | ], |
| 87 | } |
| 88 | |
| 89 | // Only libhwbinder_benchmark needs to have pgo enabled. When all places |
| 90 | // support having PGO selectively enabled, all places can use libhwbinder. |
| 91 | // |
| 92 | // http://b/77320844 |
| 93 | cc_library { |
| 94 | name: "libhidlbase_pgo", |
| 95 | defaults: [ |
| 96 | "libhidlbase-combined-impl", |
| 97 | "hwbinder_benchmark_pgo", |
| 98 | ], |
| 99 | whole_static_libs: [ |
| 100 | "libhwbinder_pgo-impl-internal", |
| 101 | ], |
Steven Moreland | c6df565 | 2019-09-05 15:08:41 -0700 | [diff] [blame] | 102 | |
| 103 | visibility: ["//system/libhwbinder:__subpackages__"], |
Steven Moreland | 9f53eda | 2019-06-17 17:17:02 -0700 | [diff] [blame] | 104 | } |
| 105 | |
Steven Moreland | a46371d | 2019-06-05 18:29:06 -0700 | [diff] [blame] | 106 | // WARNING: deprecated |
| 107 | // This library is no longer required, and dependencies should be taken |
| 108 | // on libhidlbase instead. |
| 109 | cc_library { |
| 110 | name: "libhidltransport", |
| 111 | recovery_available: true, |
| 112 | vendor_available: true, |
| 113 | vndk: { |
| 114 | enabled: true, |
| 115 | support_system_process: true, |
| 116 | }, |
| 117 | } |