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 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "frameworks_native_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["frameworks_native_license"], 22} 23 24cc_library_headers { 25 name: "libbufferhub_headers", 26 export_include_dirs: ["include"], 27 vendor_available: true, // TODO(b/112338314): Does shouldn't be available to vendor. 28 apex_available: [ 29 "//apex_available:platform", 30 "com.android.media", 31 "com.android.media.swcodec", 32 ], 33 min_sdk_version: "29", 34} 35 36sourceFiles = [ 37 "buffer_hub_base.cpp", 38 "buffer_hub_rpc.cpp", 39 "consumer_buffer.cpp", 40 "ion_buffer.cpp", 41 "producer_buffer.cpp", 42] 43 44sharedLibraries = [ 45 "libbase", 46 "libcutils", 47 "liblog", 48 "libui", 49 "libutils", 50 "libpdx_default_transport", 51] 52 53headerLibraries = [ 54 "libbufferhub_headers", 55 "libdvr_headers", 56 "libnativebase_headers", 57] 58 59cc_library { 60 srcs: sourceFiles, 61 cflags: [ 62 "-DLOG_TAG=\"libbufferhub\"", 63 "-DTRACE=0", 64 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", 65 "-Wall", 66 "-Werror", 67 ], 68 shared_libs: sharedLibraries, 69 header_libs: headerLibraries, 70 name: "libbufferhub", 71 export_header_lib_headers: [ 72 "libbufferhub_headers", 73 "libnativebase_headers", 74 ], 75} 76 77cc_test { 78 srcs: ["buffer_hub-test.cpp"], 79 static_libs: ["libbufferhub"], 80 shared_libs: sharedLibraries, 81 header_libs: headerLibraries, 82 name: "buffer_hub-test", 83} 84