• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Unionman Technology 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/ndk/ndk.gni")
16
17config("bt_warnings") {
18  cflags = [
19    "-Wall",
20    "-Werror",
21    "-Wno-switch",
22    "-Wno-unused-function",
23    "-Wno-implicit-int",
24    "-Wno-deprecated-non-prototype",
25    "-Wno-incompatible-pointer-types",
26    "-Wno-unused-but-set-variable",
27    "-Wno-address-of-packed-member",
28  ]
29}
30
31ohos_prebuilt_etc("rtl8822cs_config") {
32  source = "firmware/rtl8822cs_config"
33  install_images = [ chipset_base_dir ]
34  relative_install_dir = "firmware"
35  part_name = "unionman_products"
36  install_enable = true
37}
38
39ohos_prebuilt_etc("rtl8822cs_fw") {
40  source = "firmware/rtl8822cs_fw"
41  install_images = [ chipset_base_dir ]
42  relative_install_dir = "firmware"
43  part_name = "unionman_products"
44  install_enable = true
45}
46
47ohos_prebuilt_etc("rtkbt.conf") {
48  source = "firmware/rtkbt.conf"
49  install_images = [ chipset_base_dir ]
50  relative_install_dir = "bluetooth"
51  part_name = "unionman_products"
52  install_enable = true
53}
54
55ohos_shared_library("libbt_vendor") {
56  output_name = "libbt_vendor"
57  sources = [
58    "src/bt_list.c",
59    "src/bt_skbuff.c",
60    "src/bt_vendor_rtk.c",
61    "src/hardware.c",
62    "src/hardware_uart.c",
63    "src/hardware_usb.c",
64    "src/hci_h5.c",
65    "src/rtk_btservice.c",
66    "src/rtk_btsnoop_net.c",
67    "src/rtk_heartbeat.c",
68    "src/rtk_parse.c",
69    "src/rtk_poll.c",
70    "src/rtk_socket.c",
71    "src/upio.c",
72    "src/userial_vendor.c",
73  ]
74
75  include_dirs = [
76    "include",
77    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
78    "//foundation/communication/bluetooth/services/bluetooth/hardware/include",
79    "//drivers/peripheral/bluetooth/hdi/ohos/hardware/bt/v1_0/server/implement",
80  ]
81
82  cflags = []
83
84  configs = [ ":bt_warnings" ]
85
86  external_deps = [
87    "c_utils:utils",
88    "hilog:libhilog",
89  ]
90
91  install_enable = true
92  install_images = [ "system" ]
93
94  part_name = "unionman_products"
95  subsystem_name = "unionman_products"
96}
97
98group("bluetooth") {
99  public_deps = [
100    ":libbt_vendor",
101    ":rtkbt.conf",
102    ":rtl8822cs_config",
103    ":rtl8822cs_fw",
104  ]
105}
106