1#
2#  Copyright 2021 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
16import("//bt/system/gd/packet/parser/packetgen.gni")
17import("//common-mk/flatbuffer.gni")
18
19config("gd_defaults") {
20  cflags_cc = [
21    "-DGOOGLE_PROTOBUF_NO_RTTI",
22    "-Wno-unused-result",
23    "-Wno-tautological-overlap-compare",
24  ]
25
26  defines = [
27    "TARGET_FLOSS",
28  ]
29
30  libs = [
31    "ssl",
32    "crypto",
33  ]
34
35  include_dirs = [ "//bt/system/gd" ]
36  configs = [
37    "//bt/system:target_defaults",
38    "//bt/system/log:log_defaults",
39  ]
40}
41
42config("rust_defaults") {
43  # Empty for now
44}
45
46group("gd_default_deps") {
47  deps = [
48    "//bt/system:libbt-platform-protos-lite",
49    "//bt/system/pdl:BluetoothGeneratedPackets_h",
50  ]
51}
52
53static_library("libbluetooth_gd") {
54  sources = [
55    "module.cc",
56    "stack_manager.cc",
57  ]
58
59  include_dirs = [ "." ]
60  configs += [ ":gd_defaults" ]
61  deps = [
62    "//bt/system/gd/rust/topshim:libbluetooth_topshim",
63    "//bt/system/gd/common:BluetoothCommonSources",
64    "//bt/system/gd/hal:BluetoothHalSources",
65    "//bt/system/gd/hal:BluetoothHalSources_hci_host",
66    "//bt/system/gd/hal:BluetoothHalSources_ranging_host",
67    "//bt/system/gd/hal:BluetoothHalSources_socket_host",
68    "//bt/system/gd/metrics:BluetoothMetricsSources",
69    "//bt/system/gd/neighbor:BluetoothNeighborSources",
70    "//bt/system/gd/shim:BluetoothShimSources",
71    "//bt/system/gd/storage:BluetoothStorageSources",
72    "//bt/system/gd/sysprops:BluetoothSyspropsSources",
73    "//bt/system/pdl:BluetoothGeneratedPackets_h",
74  ]
75}
76