• 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    "stack_config.cc",
49  ]
50
51  public_configs = [ ":libbluetooth_config" ]
52
53  include_dirs = [
54    "//bt/system/",
55    "//bt/system/bta/include",
56    "//bt/system/bta/sys",
57    "//bt/system/bta/dm",
58    "//bt/system/stack/include",
59    "//bt/system/stack/l2cap",
60    "//bt/system/stack/a2dp",
61    "//bt/system/stack/btm",
62    "//bt/system/stack/avdt",
63    "//bt/system/hci",
64    "//bt/system/udrv/include",
65    "//bt/system/btif/include",
66    "//bt/system/btif/co",
67    "//bt/system/vnd/include",
68    "//bt/system/brcm/include",
69    "//bt/system/embdrv/sbc/encoder/include",
70    "//bt/system/embdrv/sbc/decoder/include",
71    "//bt/system/test/suite",
72  ]
73
74  deps = [
75    "//bt/system/audio_hal_interface",
76    "//bt/system/bta",
77    "//bt/system/btcore",
78    "//bt/system/btif",
79    "//bt/system/device",
80    "//bt/system/embdrv/g722",
81    "//bt/system/embdrv/sbc",
82    "//bt/system/gd:libbluetooth_gd",
83    "//bt/system/log:libbluetooth_log",
84    "//bt/system/hci",
85    "//bt/system/main/shim:BluetoothStackManagerSources",
86    "//bt/system/main/shim:LibBluetoothShimSources",
87    "//bt/system/osi",
88    "//bt/system/packet",
89    "//bt/system/rust:core_rs",
90    "//bt/system/stack",
91    "//bt/system/udrv",
92  ]
93
94  configs += [
95    "//bt/system:target_defaults",
96    "//bt/system/log:log_defaults",
97    "//bt/system:external_tinyxml2",
98    "//bt/system:external_flatbuffers",
99  ]
100
101  cflags_c = [
102    "-Lobj/osi",
103    "-losi",
104  ]
105
106  libs = [
107    "dl",
108    "fmt",
109    "pthread",
110    "resolv",
111    "rt",
112    "z",
113  ]
114
115  lib_dirs = [ "${root_out_dir}/rust" ]
116}
117