blob: abb2fa8d3edb72f4955a402e4d4b915865f25bb0 [file] [log] [blame]
Arman Uguray9ca3fb82015-05-26 14:50:36 -07001#
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
Arman Uguray2c494e12015-05-29 14:43:20 -070017static_library("osi") {
Scott James Remnant4c292312015-05-12 13:58:49 -070018 sources = [
19 "src/alarm.c",
20 "src/allocation_tracker.c",
21 "src/allocator.c",
22 "src/array.c",
23 "src/buffer.c",
24 "src/compat.c",
25 "src/config.c",
26 "src/data_dispatcher.c",
27 "src/eager_reader.c",
28 "src/fixed_queue.c",
29 "src/future.c",
30 "src/hash_functions.c",
31 "src/hash_map.c",
Miao Chou98a96412015-07-08 14:50:32 -070032 "src/hash_map_utils.c",
Scott James Remnant4c292312015-05-12 13:58:49 -070033 "src/list.c",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070034 "src/metrics_linux.cc",
Pavlin Radoslavov1eb1ea02015-09-24 22:07:53 -070035 "src/mutex.c",
Marie Janssen093f0132016-03-10 11:27:53 -080036 "src/osi.c",
Jakub Pawlowski3eb4a482016-02-24 10:39:46 -080037 "src/properties.c",
Scott James Remnant4c292312015-05-12 13:58:49 -070038 "src/reactor.c",
Arman Ugurayf2d64342015-07-08 15:47:39 -070039 "src/ringbuffer.c",
Scott James Remnant4c292312015-05-12 13:58:49 -070040 "src/semaphore.c",
41 "src/socket.c",
Miao Chou10969122015-06-09 17:39:46 -070042
43 # TODO(mcchou): Remove these sources after platform specific
44 # dependencies are abstracted.
45 "src/socket_utils/socket_local_client.c",
46 "src/socket_utils/socket_local_server.c",
Scott James Remnant4c292312015-05-12 13:58:49 -070047 "src/thread.c",
Pavlin Radoslavovc196f212015-09-23 20:39:53 -070048 "src/time.c",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080049 "src/wakelock.c",
Scott James Remnant4c292312015-05-12 13:58:49 -070050 ]
51
52 include_dirs = [
Miao Chou98a96412015-07-08 14:50:32 -070053 "//",
54 "//utils/include",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080055 "//stack/include",
Scott James Remnant4c292312015-05-12 13:58:49 -070056 ]
57}
58
59executable("net_test_osi") {
Arman Uguraybb6836b2015-05-21 13:52:25 -070060 testonly = true
Scott James Remnant4c292312015-05-12 13:58:49 -070061 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070062 "test/AlarmTestHarness.cc",
63 "test/AllocationTestHarness.cc",
64 "test/alarm_test.cc",
65 "test/allocation_tracker_test.cc",
66 "test/allocator_test.cc",
67 "test/array_test.cc",
68 "test/config_test.cc",
69 "test/data_dispatcher_test.cc",
70 "test/eager_reader_test.cc",
71 "test/future_test.cc",
72 "test/hash_map_test.cc",
73 "test/hash_map_utils_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",
Scott James Remnant4c292312015-05-12 13:58:49 -070081 ]
82
83 include_dirs = [
Scott James Remnant4c292312015-05-12 13:58:49 -070084 "//",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080085 "//osi/test",
Scott James Remnant4c292312015-05-12 13:58:49 -070086 ]
87
88 deps = [
89 "//osi",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080090 "//third_party/googletest:gtest_main",
Scott James Remnant4c292312015-05-12 13:58:49 -070091 ]
92
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080093 libs = [
94 "-lpthread",
95 "-lrt",
96 ]
Scott James Remnant4c292312015-05-12 13:58:49 -070097}