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 ] 31} 32 33source_set("BluetoothOsSources_linux") { 34 sources = [ 35 "linux/metrics.cc", 36 "linux/parameter_provider.cc", 37 "linux/system_properties.cc", 38 "linux/wakelock_native.cc", 39 "system_properties_common.cc", 40 ] 41 42 configs += [ 43 "//bt/system/gd:gd_defaults", 44 "//bt/system/log:log_defaults", 45 ] 46 deps = [ 47 "//bt/system:libbt-platform-protos-lite", 48 ] 49} 50 51source_set("BluetoothOsSources_linux_generic") { 52 sources = [ 53 "handler.cc", 54 "linux_generic/alarm.cc", 55 "linux_generic/files.cc", 56 "linux_generic/mgmt.cc", 57 "linux_generic/reactive_semaphore.cc", 58 "linux_generic/reactor.cc", 59 "linux_generic/repeating_alarm.cc", 60 "linux_generic/thread.cc", 61 "linux_generic/wakelock_manager.cc", 62 ] 63 64 configs += [ 65 "//bt/system/gd:gd_defaults", 66 "//bt/system/log:log_defaults", 67 ] 68 deps = [ 69 "//bt/flags:bluetooth_flags_c_lib", 70 "//bt/system/gd:gd_default_deps", 71 ] 72 73 if (target_os == "chromeos") { 74 deps += [ ":BluetoothOsSources_chromeos" ] 75 } else { 76 deps += [ ":BluetoothOsSources_linux" ] 77 } 78} 79