1# Copyright (c) 2021 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//drivers/adapter/uhdf2/uhdf.gni") 16 17config("hdi_service_proxy_config") { 18 visibility = [ ":*" ] 19 20 cflags = [ 21 "-Wall", 22 "-Wextra", 23 "-Werror", 24 "-DGST_DISABLE_DEPRECATED", 25 "-DHAVE_CONFIG_H", 26 "-fno-strict-aliasing", 27 "-Wno-sign-compare", 28 "-Wno-builtin-requires-header", 29 "-Wno-implicit-function-declaration", 30 "-Wno-format", 31 "-Wno-int-conversion", 32 "-Wno-unused-function", 33 "-Wno-unused-parameter", 34 "-Wno-thread-safety-attributes", 35 "-Wno-inconsistent-missing-override", 36 "-fno-rtti", 37 "-fno-exceptions", 38 "-ffunction-sections", 39 "-fdata-sections", 40 ] 41 42 ldflags = [ "-Wl" ] 43} 44 45ohos_shared_library("audio_bluetooth_hdi_proxy_server") { 46 include_dirs = [ 47 "//drivers/peripheral/bluetooth/audio/interfaces/include", 48 "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/include", 49 "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include", 50 "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/server/include", 51 "//third_party/cJSON", 52 "$hdf_framework_path/include/core", 53 "$hdf_framework_path/include/utils", 54 "$hdf_framework_path/include/osal", 55 "$hdf_framework_path/include", 56 "//third_party/bounds_checking_function/include", 57 "$hdf_framework_path/ability/sbuf/include", 58 "$hdf_framework_path/utils/include", 59 "$hdf_framework_path/ability/sbuf/include", 60 "$hdf_uhdf_path/osal/include", 61 "$hdf_framework_path/include", 62 "$hdf_framework_path/core/sec/include", 63 "$hdf_framework_path/core/shared/include", 64 "$hdf_framework_path/core/host/include", 65 "$hdf_framework_path/core/manager/include", 66 "$hdf_uhdf_path/include/devhost", 67 "$hdf_uhdf_path/devhost/include", 68 "$hdf_uhdf_path/devmgr/include", 69 "$hdf_uhdf_path/host/include", 70 "$hdf_uhdf_path/manager/include", 71 "$hdf_uhdf_path/include/host", 72 ] 73 74 sources = [ 75 "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/audio_adapter_info_common.cpp", 76 "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/audio_common.cpp", 77 "//third_party/cJSON/cJSON.c", 78 "src/audio_proxy_adapter.cpp", 79 "src/audio_proxy_common.cpp", 80 "src/audio_proxy_manager.cpp", 81 "src/audio_proxy_render.cpp", 82 ] 83 84 deps = [ 85 "$hdf_uhdf_path/hdi:libhdi", 86 "$hdf_uhdf_path/host:libhdf_host", 87 "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", 88 "$hdf_uhdf_path/utils:libhdf_utils", 89 "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough:hdi_audio_bluetooth", 90 "//utils/native/base:utils", 91 ] 92 93 if (is_standard_system) { 94 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 95 } else { 96 external_deps = [ "hilog:libhilog" ] 97 } 98 99 public_configs = [ ":hdi_service_proxy_config" ] 100 101 install_images = [ chipset_base_dir ] 102 subsystem_name = "hdf" 103 part_name = "bluetooth_device_driver" 104} 105