1# 2# Copyright 2021 Google 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at: 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17import("//common-mk/cxxbridge.gni") 18 19config("rust_topshim_config") { 20 include_dirs = [ 21 "//bt/gd/rust/topshim" 22 ] 23} 24 25cxxbridge_header("btif_bridge_header") { 26 sources = [ "src/btif.rs" ] 27 all_dependent_configs = [ ":rust_topshim_config" ] 28 deps = [":cxxlibheader"] 29} 30 31cxxbridge_cc("btif_bridge_code") { 32 sources = [ "src/btif.rs" ] 33 deps = [":btif_bridge_header"] 34 configs = [ "//bt/gd:gd_defaults" ] 35} 36 37source_set("btif_cxx_bridge_code") { 38 sources = [ 39 "btif/btif_shim.cc" 40 ] 41 42 deps = [":btif_bridge_header"] 43 configs += ["//bt/gd:gd_defaults"] 44} 45 46cxxbridge_libheader("cxxlibheader") { 47 deps = [] 48} 49 50static_library("libbluetooth_topshim") { 51 deps = [ 52 ":btif_bridge_code", 53 ":btif_cxx_bridge_code", 54 ":cxxlibheader", 55 ] 56} 57