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