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
17static_library("btcore") {
18  sources = [
19    "src/device_class.cc",
20    "src/hal_util.cc",
21    "src/module.cc",
22    "src/osi_module.cc",
23    "src/property.cc",
24  ]
25
26  include_dirs = [
27    "include",
28    "//bt/system",
29  ]
30
31  configs += [
32    "//bt/system:target_defaults",
33    "//bt/system/log:log_defaults",
34  ]
35
36  deps = [
37    "//bt/system/gd/rust/shim:init_flags_bridge_header",
38    "//bt/system/gd/rust/shim:libbluetooth_rust_interop",
39  ]
40}
41
42if (use.test) {
43  executable("net_test_btcore") {
44    sources = [
45      "test/device_class_test.cc",
46      "test/property_test.cc",
47    ]
48
49    include_dirs = [
50      "include",
51      "//bt/system",
52    ]
53
54    deps = [
55      "//bt/system/btcore",
56      "//bt/system/osi",
57      "//bt/system/types",
58    ]
59
60    configs += [
61      "//bt/system:external_gtest_main",
62      "//bt/system:target_defaults",
63      "//bt/system/log:log_defaults",
64    ]
65
66    libs = [
67      "pthread",
68      "rt",
69      "dl",
70    ]
71  }
72}
73