1# 2# Copyright 2018 The Android Open Source Project 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("common") { 18 sources = [ 19 "address_obfuscator.cc", 20 "message_loop_thread.cc", 21 "metric_id_allocator.cc", 22 "metrics_linux.cc", 23 "os_utils.cc", 24 "repeating_timer.cc", 25 "stop_watch_legacy.cc", 26 "time_util.cc", 27 ] 28 29 include_dirs = [ 30 "//bt/system/", 31 "//bt/system/stack/include", 32 "//bt/system/linux_include", 33 ] 34 35 deps = [ 36 "//bt/system:libbt-platform-protos-lite", 37 "//bt/system/gd/rust/shim:init_flags_bridge_header", 38 ] 39 40 configs += [ 41 "//bt/system:target_defaults", 42 "//bt/system/log:log_defaults", 43 ] 44} 45 46if (use.test) { 47 executable("bluetooth_test_common") { 48 sources = [ 49 "leaky_bonded_queue_unittest.cc", 50 "state_machine_unittest.cc", 51 "time_util_unittest.cc", 52 ] 53 54 include_dirs = [ 55 "//bt/system/", 56 "//bt/system/common", 57 ] 58 59 deps = [ "//bt/system/common" ] 60 61 configs += [ 62 "//bt/system:external_gtest_main", 63 "//bt/system:external_gmock_main", 64 "//bt/system:target_defaults", 65 "//bt/system/log:log_defaults", 66 ] 67 68 libs = [ 69 "pthread", 70 "rt", 71 ] 72 } 73} 74