1#  Copyright 2021 Google, Inc.
2#
3#  Licensed under the Apache License, Version 2.0 (the "License");
4#  you may not use this file except in compliance with the License.
5#  You may obtain a copy of the License at:
6#
7#  http://www.apache.org/licenses/LICENSE-2.0
8#
9#  Unless required by applicable law or agreed to in writing, software
10#  distributed under the License is distributed on an "AS IS" BASIS,
11#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12#  See the License for the specific language governing permissions and
13#  limitations under the License.
14
15source_set("BluetoothOsSources_chromeos") {
16  sources = [
17    "chromeos/metrics.cc",
18    "chromeos/parameter_provider.cc",
19    "chromeos/system_properties.cc",
20    "chromeos/wakelock_native.cc",
21    "system_properties_common.cc",
22  ]
23
24  configs += [
25    "//bt/system/gd:gd_defaults",
26    "//bt/system/log:log_defaults",
27  ]
28  deps = [
29    "//bt/system:libbt-platform-protos-lite",
30    "//bt/system/gd/rust/shim:init_flags_bridge_header",
31  ]
32}
33
34source_set("BluetoothOsSources_linux") {
35  sources = [
36    "linux/metrics.cc",
37    "linux/parameter_provider.cc",
38    "linux/system_properties.cc",
39    "linux/wakelock_native.cc",
40    "system_properties_common.cc",
41  ]
42
43  configs += [
44    "//bt/system/gd:gd_defaults",
45    "//bt/system/log:log_defaults",
46  ]
47  deps = [
48    "//bt/system:libbt-platform-protos-lite",
49    "//bt/system/gd/rust/shim:init_flags_bridge_header",
50  ]
51}
52
53source_set("BluetoothOsSources_linux_generic") {
54  sources = [
55    "handler.cc",
56    "logging/log_redaction.cc",
57    "linux_generic/alarm.cc",
58    "linux_generic/files.cc",
59    "linux_generic/reactive_semaphore.cc",
60    "linux_generic/reactor.cc",
61    "linux_generic/repeating_alarm.cc",
62    "linux_generic/thread.cc",
63    "linux_generic/wakelock_manager.cc",
64  ]
65
66  configs += [
67    "//bt/system/gd:gd_defaults",
68    "//bt/system/log:log_defaults",
69  ]
70  deps = [ "//bt/system/gd:gd_default_deps" ]
71
72  if (target_os == "chromeos") {
73    deps += [ ":BluetoothOsSources_chromeos" ]
74  } else {
75    deps += [ ":BluetoothOsSources_linux" ]
76  }
77}
78