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_library_headers { 16 name: "libbufferhub_headers", 17 export_include_dirs: ["include"], 18 vendor_available: true, // TODO(b/112338314): Does shouldn't be available to vendor. 19} 20 21sourceFiles = [ 22 "buffer_hub_base.cpp", 23 "buffer_hub_rpc.cpp", 24 "consumer_buffer.cpp", 25 "ion_buffer.cpp", 26 "producer_buffer.cpp", 27] 28 29sharedLibraries = [ 30 "libbase", 31 "libcutils", 32 "liblog", 33 "libui", 34 "libutils", 35 "libpdx_default_transport", 36] 37 38headerLibraries = [ 39 "libbufferhub_headers", 40 "libdvr_headers", 41 "libnativebase_headers", 42] 43 44cc_library { 45 srcs: sourceFiles, 46 cflags: [ 47 "-DLOG_TAG=\"libbufferhub\"", 48 "-DTRACE=0", 49 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", 50 "-Wall", 51 "-Werror", 52 ], 53 shared_libs: sharedLibraries, 54 header_libs: headerLibraries, 55 name: "libbufferhub", 56 export_header_lib_headers: [ 57 "libbufferhub_headers", 58 "libnativebase_headers", 59 ], 60} 61 62cc_test { 63 srcs: ["buffer_hub-test.cpp"], 64 static_libs: ["libbufferhub"], 65 shared_libs: sharedLibraries, 66 header_libs: headerLibraries, 67 name: "buffer_hub-test", 68} 69