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