• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/hdf_core/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-builtin-requires-header",
28    "-Wno-int-conversion",
29    "-Wno-unused-parameter",
30    "-Wno-thread-safety-attributes",
31    "-Wno-inconsistent-missing-override",
32    "-fno-rtti",
33    "-fno-exceptions",
34    "-ffunction-sections",
35    "-fdata-sections",
36    "-Oz",
37    "-flto",
38  ]
39
40  ldflags = [ "-Wl" ]
41}
42
43ohos_shared_library("audio_bluetooth_hdi_proxy_server") {
44  include_dirs = [
45    "//drivers/peripheral/bluetooth/audio/interfaces/include",
46    "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/include",
47    "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include",
48    "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/server/include",
49    "//third_party/cJSON",
50    "$hdf_framework_path/include/utils",
51    "$hdf_framework_path/include",
52    "//third_party/bounds_checking_function/include",
53    "$hdf_framework_path/ability/sbuf/include",
54    "$hdf_framework_path/utils/include",
55    "$hdf_framework_path/ability/sbuf/include",
56    "$hdf_framework_path/include",
57    "$hdf_framework_path/core/sec/include",
58    "$hdf_framework_path/core/host/include",
59    "$hdf_framework_path/core/manager/include",
60    "$hdf_uhdf_path/include/devhost",
61    "$hdf_uhdf_path/devhost/include",
62    "$hdf_uhdf_path/devmgr/include",
63    "$hdf_uhdf_path/host/include",
64    "$hdf_uhdf_path/manager/include",
65  ]
66
67  sources = [
68    "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/audio_adapter_info_common.cpp",
69    "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/audio_common.cpp",
70    "//third_party/cJSON/cJSON.c",
71    "src/audio_proxy_adapter.cpp",
72    "src/audio_proxy_common.cpp",
73    "src/audio_proxy_manager.cpp",
74    "src/audio_proxy_render.cpp",
75    "src/audio_proxy_capture.cpp",
76  ]
77
78  deps = []
79
80  if (is_standard_system) {
81    external_deps = [
82      "hdf_core:libhdf_host",
83      "hdf_core:libhdf_ipc_adapter",
84      "hdf_core:libhdi",
85      "hdf_core:libpub_utils",
86      "hilog:libhilog",
87    ]
88  } else {
89    external_deps = [ "hilog:libhilog" ]
90  }
91  external_deps += [ "c_utils:utils" ]
92
93  public_configs = [ ":hdi_service_proxy_config" ]
94
95  innerapi_tags = [ "passthrough" ]
96  install_images = [ chipset_base_dir ]
97  subsystem_name = "hdf"
98  part_name = "drivers_peripheral_bluetooth"
99}
100