• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2022 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("//build/ohos_var.gni")
16
17SUBSYSTEM_DIR = "//foundation/communication"
18
19config("btframework_config") {
20  cflags_cc = [
21    "-fPIC",
22    "-Wno-unused-parameter",
23    "-Wunused-private-field",
24  ]
25  include_dirs = [
26    "//utils/system/safwk/native/include",
27    "//foundation/communication/bluetooth/services/bluetooth/common/",
28    "include",
29    "//foundation/communication/bluetooth/interfaces/inner_api/include",
30    "//foundation/communication/bluetooth/frameworks/inner/common",
31    "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header",
32  ]
33}
34
35config("btframework_public_config") {
36  include_dirs = [
37    "//foundation/communication/bluetooth/interfaces/inner_api/include",
38    "//foundation/communication/bluetooth/services/bluetooth/common/",
39  ]
40}
41
42ohos_shared_library("btframework") {
43  # uncomment to enable cfi for libbtframework.z.so
44  # sanitize = {
45  #   cfi = true
46  #   blocklist = "./frameworks_inner_blocklist.txt"
47  # }
48  stack_protector_ret = true
49  configs = [ ":btframework_config" ]
50  public_configs = [ ":btframework_public_config" ]
51  sources = [
52    "c_adapter/ohos_bt_adapter_utils.cpp",
53    "c_adapter/ohos_bt_gap.cpp",
54    "c_adapter/ohos_bt_gatt.cpp",
55    "c_adapter/ohos_bt_gatt_client.cpp",
56    "c_adapter/ohos_bt_gatt_server.cpp",
57    "c_adapter/ohos_bt_spp.cpp",
58    "src/bluetooth_a2dp_snk.cpp",
59    "src/bluetooth_a2dp_src.cpp",
60    "src/bluetooth_avrcp_ct.cpp",
61    "src/bluetooth_avrcp_tg.cpp",
62    "src/bluetooth_ble_advertiser.cpp",
63    "src/bluetooth_ble_central_manager.cpp",
64    "src/bluetooth_device_class.cpp",
65    "src/bluetooth_gatt_characteristic.cpp",
66    "src/bluetooth_gatt_client.cpp",
67    "src/bluetooth_gatt_descriptor.cpp",
68    "src/bluetooth_gatt_manager.cpp",
69    "src/bluetooth_gatt_server.cpp",
70    "src/bluetooth_gatt_service.cpp",
71    "src/bluetooth_hfp_ag.cpp",
72    "src/bluetooth_hfp_hf.cpp",
73    "src/bluetooth_hid_host.cpp",
74    "src/bluetooth_host.cpp",
75    "src/bluetooth_map_mce.cpp",
76    "src/bluetooth_map_mse.cpp",
77    "src/bluetooth_opp.cpp",
78    "src/bluetooth_pan.cpp",
79    "src/bluetooth_pbap_pce.cpp",
80    "src/bluetooth_pbap_pse.cpp",
81    "src/bluetooth_proxy_manager.cpp",
82    "src/bluetooth_remote_device.cpp",
83    "src/bluetooth_socket.cpp",
84    "src/bluetooth_socket_inputstream.cpp",
85    "src/bluetooth_socket_outputstream.cpp",
86    "src/bluetooth_utils.cpp",
87  ]
88
89  deps = [ "$SUBSYSTEM_DIR/bluetooth/services/bluetooth/ipc:btipc_static" ]
90
91  external_deps = [
92    "c_utils:utils",
93    "hisysevent_native:libhisysevent",
94    "hiviewdfx_hilog_native:libhilog",
95    "ipc:ipc_core",
96    "samgr:samgr_proxy",
97  ]
98
99  subsystem_name = "communication"
100  part_name = "bluetooth"
101}
102