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")
15
16SUBSYSTEM_DIR = "//foundation/communication"
17PART_DIR = "$SUBSYSTEM_DIR/bluetooth_service/services/bluetooth"
18
19ohos_shared_library("bluetooth_hdi_adapter") {
20  # sanitize = {
21  #   cfi = true
22  # }
23  stack_protector_ret = true
24  include_dirs = [
25    "include",
26    "$PART_DIR/common",
27  ]
28
29  cflags = [ "-fPIC" ]
30
31  sources = [
32    "src/bluetooth_hci_callbacks.cpp",
33    "src/bluetooth_hdi.cpp",
34  ]
35
36  deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
37
38  if (is_standard_system) {
39    external_deps = [
40      "c_utils:utils",
41      "drivers_interface_bluetooth:libbluetooth_hci_proxy_1.0",
42      "hdf_core:libhdi",
43      "hilog:libhilog",
44      "ipc:ipc_core",
45    ]
46  } else {
47    external_deps = [
48      "c_utils:utils",
49      "drivers_interface_bluetooth:libbluetooth_hci_proxy_1.0",
50      "hdf_core:libhdi",
51      "hilog:libhilog",
52      "ipc:ipc_core",
53    ]
54  }
55
56  subsystem_name = "communication"
57  part_name = "bluetooth_service"
58}
59