• 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("//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_standard/common/",
28    "include",
29    "//foundation/communication/bluetooth/interfaces/innerkits/native_cpp/include",
30    "//foundation/communication/bluetooth/interfaces/innerkits/native_cpp/framework/common",
31    "//foundation/communication/bluetooth/interfaces/innerkits/native_c/include",
32  ]
33}
34
35config("btframework_public_config") {
36  include_dirs = [
37    "//foundation/communication/bluetooth/interfaces/innerkits/native_cpp/include",
38    "//foundation/communication/bluetooth/services/bluetooth_standard/common/",
39  ]
40}
41
42ohos_shared_library("btframework") {
43  configs = [ ":btframework_config" ]
44  public_configs = [ ":btframework_public_config" ]
45  sources = [
46    "../c_adapter/ohos_bt_adapter_utils.cpp",
47    "../c_adapter/ohos_bt_gap.cpp",
48    "../c_adapter/ohos_bt_gatt.cpp",
49    "../c_adapter/ohos_bt_gatt_client.cpp",
50    "../c_adapter/ohos_bt_gatt_server.cpp",
51    "../c_adapter/ohos_bt_spp.cpp",
52    "src/bluetooth_a2dp_snk.cpp",
53    "src/bluetooth_a2dp_src.cpp",
54    "src/bluetooth_avrcp_ct.cpp",
55    "src/bluetooth_avrcp_tg.cpp",
56    "src/bluetooth_ble_advertiser.cpp",
57    "src/bluetooth_ble_central_manager.cpp",
58    "src/bluetooth_device_class.cpp",
59    "src/bluetooth_gatt_characteristic.cpp",
60    "src/bluetooth_gatt_client.cpp",
61    "src/bluetooth_gatt_descriptor.cpp",
62    "src/bluetooth_gatt_manager.cpp",
63    "src/bluetooth_gatt_server.cpp",
64    "src/bluetooth_gatt_service.cpp",
65    "src/bluetooth_hfp_ag.cpp",
66    "src/bluetooth_hfp_hf.cpp",
67    "src/bluetooth_host.cpp",
68    "src/bluetooth_map_mce.cpp",
69    "src/bluetooth_map_mse.cpp",
70    "src/bluetooth_pbap_pce.cpp",
71    "src/bluetooth_pbap_pse.cpp",
72    "src/bluetooth_remote_device.cpp",
73    "src/bluetooth_socket.cpp",
74    "src/bluetooth_socket_inputstream.cpp",
75    "src/bluetooth_socket_outputstream.cpp",
76    "src/bluetooth_utils.cpp",
77  ]
78
79  deps = [
80    "$SUBSYSTEM_DIR/bluetooth/services/bluetooth_standard/ipc:btipc_static",
81    "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core",
82    "//utils/native/base:utils",
83  ]
84
85  external_deps = [
86    "hiviewdfx_hilog_native:libhilog",
87    "samgr_standard:samgr_proxy",
88  ]
89
90  subsystem_name = "communication"
91  part_name = "bluetooth_standard"
92}
93