• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#  Copyright 2015 Google, Inc.
3#
4#  Licensed under the Apache License, Version 2.0 (the "License");
5#  you may not use this file except in compliance with the License.
6#  You may obtain a copy of the License at:
7#
8#  http://www.apache.org/licenses/LICENSE-2.0
9#
10#  Unless required by applicable law or agreed to in writing, software
11#  distributed under the License is distributed on an "AS IS" BASIS,
12#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#  See the License for the specific language governing permissions and
14#  limitations under the License.
15#
16
17config("libbluetooth_config") {
18  include_dirs = [ "../include" ]
19}
20
21# Complete static library for linking with Rust
22static_library("bluetooth-static") {
23  complete_static_lib = true
24
25  sources = [
26  ]
27
28  configs += [
29    "//bt/system:target_defaults"
30  ]
31
32  deps = [
33    ":bluetooth",
34  ]
35}
36
37# Configure libbluetooth as either dynamic or static library
38if (defined(use.bt_dynlib) && use.bt_dynlib) {
39  lib_type = "shared_library"
40} else {
41  lib_type = "static_library"
42}
43
44target(lib_type, "bluetooth") {
45
46  # Platform specific
47  sources = [
48    "bte_conf.cc",
49    "bte_init_cpp_logging.cc",
50    "bte_logmsg.cc",
51    "bte_main.cc",
52    "stack_config.cc",
53  ]
54
55  public_configs = [ ":libbluetooth_config" ]
56
57  include_dirs = [
58    "//bt/system/",
59    "//bt/system/bta/include",
60    "//bt/system/bta/sys",
61    "//bt/system/bta/dm",
62    "//bt/system/internal_include",
63    "//bt/system/stack/include",
64    "//bt/system/stack/l2cap",
65    "//bt/system/stack/a2dp",
66    "//bt/system/stack/btm",
67    "//bt/system/stack/avdt",
68    "//bt/system/hci",
69    "//bt/system/udrv/include",
70    "//bt/system/btif/include",
71    "//bt/system/btif/co",
72    "//bt/system/hci/includ",
73    "//bt/system/vnd/include",
74    "//bt/system/brcm/include",
75    "//bt/system/embdrv/sbc/encoder/include",
76    "//bt/system/embdrv/sbc/decoder/include",
77    "//bt/system/test/suite",
78  ]
79
80  deps = [
81    "//bt/system/audio_hal_interface",
82    "//bt/system/bta",
83    "//bt/system/btcore",
84    "//bt/system/btif",
85    "//bt/system/device",
86    "//bt/system/embdrv/g722",
87    "//bt/system/embdrv/sbc",
88    "//bt/system/gd:libbluetooth_gd",
89    "//bt/system/hci",
90    "//bt/system/main/shim:LibBluetoothShimSources",
91    "//bt/system/osi",
92    "//bt/system/packet",
93    "//bt/system/rust:core_rs",
94    "//bt/system/stack",
95    "//bt/system/udrv",
96  ]
97
98  configs += [
99    "//bt/system:target_defaults",
100    "//bt/system:external_tinyxml2",
101    "//bt/system:external_flatbuffers",
102  ]
103
104  cflags_c = [
105    "-Lobj/osi",
106    "-losi",
107  ]
108
109  libs = [
110    "dl",
111    "pthread",
112    "resolv",
113    "rt",
114    "z",
115  ]
116
117  lib_dirs = [ "${root_out_dir}/rust" ]
118}
119