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 15cc_defaults { 16 name: "libhidl-defaults", 17 cflags: [ 18 "-Wall", 19 "-Wdocumentation", // since some users use this 20 "-Werror", 21 "-Wextra-semi", 22 ], 23} 24 25cc_test { 26 name: "libhidl_test", 27 defaults: ["libhidl-defaults"], 28 gtest: false, 29 srcs: ["test_main.cpp"], 30 test_suites: ["device-tests"], 31 32 shared_libs: [ 33 "android.hidl.memory@1.0", 34 "libbase", 35 "libhidlbase", 36 "libhidltransport", 37 "libhwbinder", 38 "liblog", 39 "libutils", 40 "libcutils", 41 ], 42 static_libs: ["libgtest", "libgmock"], 43 44 cflags: [ 45 "-O0", 46 "-g", 47 ], 48} 49 50cc_defaults { 51 name: "libhidlbase-combined-impl", 52 53 defaults: [ 54 "libhwbinder-impl-shared-libs", 55 "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 65cc_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 94// 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} 106