• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/allocator.cc",
21    "src/compat.cc",
22    "src/config.cc",
23    "src/fixed_queue.cc",
24    "src/future.cc",
25    "src/hash_map_utils.cc",
26    "src/list.cc",
27    "src/mutex.cc",
28    "src/properties.cc",
29    "src/reactor.cc",
30    "src/socket.cc",
31
32    # TODO(mcchou): Remove these sources after platform specific
33    # dependencies are abstracted.
34    "src/socket_utils/socket_local_client.cc",
35    "src/socket_utils/socket_local_server.cc",
36    "src/stack_power_telemetry.cc",
37    "src/thread.cc",
38    "src/wakelock.cc",
39
40    # internal dependencies to not be used outside
41    "src/internal/semaphore.cc",
42  ]
43
44  include_dirs = [
45    "//bt/system/",
46    "//bt/system/osi/include_internal",
47    "//bt/system/stack/include",
48  ]
49
50  cflags = [
51    "-DLIB_OSI_INTERNAL",
52  ]
53
54  deps = [
55    "//bt/flags:bluetooth_flags_c_lib",
56    "//bt/sysprop:libcom.android.sysprop.bluetooth",
57    "//bt/system/common",
58  ]
59
60  configs += [
61    "//bt/system:target_defaults",
62    "//bt/system/log:log_defaults",
63  ]
64}
65
66if (use.test) {
67  executable("net_test_osi") {
68    sources = [
69      "test/alarm_test.cc",
70      "test/allocator_test.cc",
71      "test/config_test.cc",
72      "test/future_test.cc",
73      "test/hash_map_utils_test.cc",
74      "test/list_test.cc",
75      "test/properties_test.cc",
76      "test/reactor_test.cc",
77      "test/thread_test.cc",
78
79      "test/internal/semaphore_test.cc",
80    ]
81
82    include_dirs = [
83      "//bt/system/",
84      "//bt/system/osi/include_internal",
85      "//bt/system/osi/test",
86    ]
87
88    cflags = [
89      "-DLIB_OSI_INTERNAL",
90    ]
91
92    deps = [
93      "//bt/sysprop:libcom.android.sysprop.bluetooth",
94      "//bt/system/osi",
95    ]
96
97    configs += [
98      "//bt/system:external_gtest_main",
99      "//bt/system:external_gmock_main",
100      "//bt/system:target_defaults",
101    ]
102
103    libs = [
104      "pthread",
105      "rt",
106    ]
107  }
108}
109