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  ]
37
38  ldflags = [ "-Wl" ]
39}
40
41ohos_shared_library("audio_bluetooth_hdi_proxy_server") {
42  include_dirs = [
43    "//drivers/peripheral/bluetooth/audio/interfaces/include",
44    "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/include",
45    "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include",
46    "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/server/include",
47    "//third_party/cJSON",
48    "$hdf_framework_path/include/utils",
49    "$hdf_framework_path/include",
50    "//third_party/bounds_checking_function/include",
51    "$hdf_framework_path/ability/sbuf/include",
52    "$hdf_framework_path/utils/include",
53    "$hdf_framework_path/ability/sbuf/include",
54    "$hdf_framework_path/include",
55    "$hdf_framework_path/core/sec/include",
56    "$hdf_framework_path/core/host/include",
57    "$hdf_framework_path/core/manager/include",
58    "$hdf_uhdf_path/include/devhost",
59    "$hdf_uhdf_path/devhost/include",
60    "$hdf_uhdf_path/devmgr/include",
61    "$hdf_uhdf_path/host/include",
62    "$hdf_uhdf_path/manager/include",
63  ]
64
65  sources = [
66    "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/audio_adapter_info_common.cpp",
67    "//drivers/peripheral/bluetooth/audio/hal/hdi_passthrough/src/audio_common.cpp",
68    "//third_party/cJSON/cJSON.c",
69    "src/audio_proxy_adapter.cpp",
70    "src/audio_proxy_common.cpp",
71    "src/audio_proxy_manager.cpp",
72    "src/audio_proxy_render.cpp",
73  ]
74
75  deps = []
76
77  if (is_standard_system) {
78    external_deps = [
79      "hdf_core:libhdf_host",
80      "hdf_core:libhdf_ipc_adapter",
81      "hdf_core:libhdi",
82      "hdf_core:libpub_utils",
83      "hilog:libhilog",
84    ]
85  } else {
86    external_deps = [ "hilog:libhilog" ]
87  }
88  external_deps += [ "c_utils:utils" ]
89
90  public_configs = [ ":hdi_service_proxy_config" ]
91  innerapi_tags = [ "passthrough" ]
92  install_images = [ chipset_base_dir ]
93  subsystem_name = "hdf"
94  part_name = "drivers_peripheral_bluetooth"
95}
96