1# 2# Copyright 2015 Google, Inc. 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("osi") { 18 sources = [ 19 "src/alarm.cc", 20 "src/allocation_tracker.cc", 21 "src/allocator.cc", 22 "src/array.cc", 23 "src/buffer.cc", 24 "src/compat.cc", 25 "src/config.cc", 26 "src/fixed_queue.cc", 27 "src/future.cc", 28 "src/hash_map_utils.cc", 29 "src/list.cc", 30 "src/mutex.cc", 31 "src/osi.cc", 32 "src/properties.cc", 33 "src/reactor.cc", 34 "src/ringbuffer.cc", 35 "src/semaphore.cc", 36 "src/socket.cc", 37 38 # TODO(mcchou): Remove these sources after platform specific 39 # dependencies are abstracted. 40 "src/socket_utils/socket_local_client.cc", 41 "src/socket_utils/socket_local_server.cc", 42 "src/thread.cc", 43 "src/wakelock.cc", 44 ] 45 46 include_dirs = [ 47 "//bt/", 48 "//bt/linux_include", 49 "//bt/internal_include", 50 "//bt/utils/include", 51 "//bt/stack/include", 52 ] 53 54 deps = [ 55 "//bt/common", 56 "//bt/gd/rust/shim:init_flags_bridge_header", 57 ] 58 59 configs += [ 60 "//bt:target_defaults", 61 ] 62} 63 64if (use.test) { 65 executable("net_test_osi") { 66 sources = [ 67 "test/AlarmTestHarness.cc", 68 "test/AllocationTestHarness.cc", 69 "test/alarm_test.cc", 70 "test/allocation_tracker_test.cc", 71 "test/allocator_test.cc", 72 "test/array_test.cc", 73 "test/config_test.cc", 74 "test/future_test.cc", 75 "test/hash_map_utils_test.cc", 76 "test/list_test.cc", 77 "test/properties_test.cc", 78 "test/rand_test.cc", 79 "test/reactor_test.cc", 80 "test/ringbuffer_test.cc", 81 "test/thread_test.cc", 82 ] 83 84 include_dirs = [ 85 "//bt/", 86 "//bt/osi/test", 87 ] 88 89 deps = [ 90 "//bt/osi", 91 ] 92 93 configs += [ 94 "//bt:external_gtest_main", 95 "//bt:external_gmock_main", 96 "//bt:target_defaults", 97 ] 98 99 libs = [ 100 "pthread", 101 "rt", 102 ] 103 } 104} 105