blob: c4fb0cb10fc43dae3406685cc33312b4cf99a9a7 [file] [log] [blame]
Arman Uguray9ca3fb82015-05-26 14:50:36 -07001#
Jakub Pawlowski5b790fe2017-09-18 09:00:20 -07002# Copyright 2015 Google, Inc.
Arman Uguray9ca3fb82015-05-26 14:50:36 -07003#
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 = [
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070019 "src/alarm.cc",
Jakub Pawlowski0d55d662016-05-25 10:37:17 -070020 "src/allocation_tracker.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070021 "src/allocator.cc",
22 "src/array.cc",
23 "src/buffer.cc",
24 "src/compat.cc",
25 "src/config.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070026 "src/fixed_queue.cc",
27 "src/future.cc",
Jakub Pawlowski6a059512016-05-25 17:49:32 -070028 "src/hash_map_utils.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070029 "src/list.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070030 "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",
Miao Chou10969122015-06-09 17:39:46 -070037
38 # TODO(mcchou): Remove these sources after platform specific
39 # dependencies are abstracted.
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070040 "src/socket_utils/socket_local_client.cc",
41 "src/socket_utils/socket_local_server.cc",
42 "src/thread.cc",
Pavlin Radoslavovb2a292b2016-10-14 19:34:48 -070043 "src/wakelock.cc",
Scott James Remnant4c292312015-05-12 13:58:49 -070044 ]
45
46 include_dirs = [
Miao Chou98a96412015-07-08 14:50:32 -070047 "//",
Jakub Pawlowski292ab252018-10-23 15:57:20 +020048 "//linux_include",
Jakub Pawlowski9e814612018-05-25 09:31:26 -070049 "//internal_include",
Miao Chou98a96412015-07-08 14:50:32 -070050 "//utils/include",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080051 "//stack/include",
Scott James Remnant4c292312015-05-12 13:58:49 -070052 ]
Jakub Pawlowski71f5b3e2016-12-20 12:55:51 -080053
54 deps = [
Jakub Pawlowski83db4992018-11-20 19:27:11 +010055 "//common",
Jakub Pawlowski71f5b3e2016-12-20 12:55:51 -080056 "//third_party/libchrome:base",
57 ]
Scott James Remnant4c292312015-05-12 13:58:49 -070058}
59
60executable("net_test_osi") {
Arman Uguraybb6836b2015-05-21 13:52:25 -070061 testonly = true
Scott James Remnant4c292312015-05-12 13:58:49 -070062 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070063 "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",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070070 "test/future_test.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070071 "test/hash_map_utils_test.cc",
72 "test/list_test.cc",
73 "test/properties_test.cc",
74 "test/rand_test.cc",
75 "test/reactor_test.cc",
76 "test/ringbuffer_test.cc",
77 "test/thread_test.cc",
Scott James Remnant4c292312015-05-12 13:58:49 -070078 ]
79
80 include_dirs = [
Scott James Remnant4c292312015-05-12 13:58:49 -070081 "//",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080082 "//osi/test",
Scott James Remnant4c292312015-05-12 13:58:49 -070083 ]
84
85 deps = [
86 "//osi",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080087 "//third_party/googletest:gtest_main",
Jack Hef3175622016-12-08 19:29:00 -080088 "//third_party/googletest:gmock_main",
Jakub Pawlowski71f5b3e2016-12-20 12:55:51 -080089 "//third_party/libchrome:base",
Scott James Remnant4c292312015-05-12 13:58:49 -070090 ]
91
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080092 libs = [
93 "-lpthread",
94 "-lrt",
95 ]
Scott James Remnant4c292312015-05-12 13:58:49 -070096}