• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#  Copyright (C) 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/data_dispatcher.cc",
27    "src/fixed_queue.cc",
28    "src/future.cc",
29    "src/hash_map_utils.cc",
30    "src/list.cc",
31    "src/metrics_linux.cc",
32    "src/mutex.cc",
33    "src/osi.cc",
34    "src/properties.cc",
35    "src/reactor.cc",
36    "src/ringbuffer.cc",
37    "src/semaphore.cc",
38    "src/socket.cc",
39
40    # TODO(mcchou): Remove these sources after platform specific
41    # dependencies are abstracted.
42    "src/socket_utils/socket_local_client.cc",
43    "src/socket_utils/socket_local_server.cc",
44    "src/thread.cc",
45    "src/time.cc",
46    "src/wakelock.cc",
47  ]
48
49  include_dirs = [
50    "//",
51    "//utils/include",
52    "//stack/include",
53  ]
54
55  deps = [
56    "//third_party/libchrome:base",
57  ]
58}
59
60executable("net_test_osi") {
61  testonly = true
62  sources = [
63    "test/AlarmTestHarness.cc",
64    "test/AllocationTestHarness.cc",
65    "test/alarm_test.cc",
66    "test/allocation_tracker_test.cc",
67    "test/allocator_test.cc",
68    "test/array_test.cc",
69    "test/config_test.cc",
70    "test/data_dispatcher_test.cc",
71    "test/future_test.cc",
72    "test/hash_map_utils_test.cc",
73    "test/leaky_bonded_queue_test.cc",
74    "test/list_test.cc",
75    "test/properties_test.cc",
76    "test/rand_test.cc",
77    "test/reactor_test.cc",
78    "test/ringbuffer_test.cc",
79    "test/thread_test.cc",
80    "test/time_test.cc",
81  ]
82
83  include_dirs = [
84    "//",
85    "//osi/test",
86  ]
87
88  deps = [
89    "//osi",
90    "//third_party/googletest:gtest_main",
91    "//third_party/googletest:gmock_main",
92    "//third_party/libchrome:base",
93  ]
94
95  libs = [
96    "-lpthread",
97    "-lrt",
98  ]
99}
100