Arman Uguray | 9ca3fb8 | 2015-05-26 14:50:36 -0700 | [diff] [blame] | 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 | |
Arman Uguray | 2c494e1 | 2015-05-29 14:43:20 -0700 | [diff] [blame] | 17 | static_library("osi") { |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 18 | 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 Chou | 98a9641 | 2015-07-08 14:50:32 -0700 | [diff] [blame] | 32 | "src/hash_map_utils.c", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 33 | "src/list.c", |
Jakub Pawlowski | e6d1202 | 2016-05-12 11:16:46 -0700 | [diff] [blame^] | 34 | "src/metrics_linux.cc", |
Pavlin Radoslavov | 1eb1ea0 | 2015-09-24 22:07:53 -0700 | [diff] [blame] | 35 | "src/mutex.c", |
Marie Janssen | 093f013 | 2016-03-10 11:27:53 -0800 | [diff] [blame] | 36 | "src/osi.c", |
Jakub Pawlowski | 3eb4a48 | 2016-02-24 10:39:46 -0800 | [diff] [blame] | 37 | "src/properties.c", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 38 | "src/reactor.c", |
Arman Uguray | f2d6434 | 2015-07-08 15:47:39 -0700 | [diff] [blame] | 39 | "src/ringbuffer.c", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 40 | "src/semaphore.c", |
| 41 | "src/socket.c", |
Miao Chou | 1096912 | 2015-06-09 17:39:46 -0700 | [diff] [blame] | 42 | |
| 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 Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 47 | "src/thread.c", |
Pavlin Radoslavov | c196f21 | 2015-09-23 20:39:53 -0700 | [diff] [blame] | 48 | "src/time.c", |
Jakub Pawlowski | d7a05a0 | 2016-02-22 18:04:24 -0800 | [diff] [blame] | 49 | "src/wakelock.c", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 50 | ] |
| 51 | |
| 52 | include_dirs = [ |
Miao Chou | 98a9641 | 2015-07-08 14:50:32 -0700 | [diff] [blame] | 53 | "//", |
| 54 | "//utils/include", |
Jakub Pawlowski | d7a05a0 | 2016-02-22 18:04:24 -0800 | [diff] [blame] | 55 | "//stack/include", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 56 | ] |
| 57 | } |
| 58 | |
| 59 | executable("net_test_osi") { |
Arman Uguray | bb6836b | 2015-05-21 13:52:25 -0700 | [diff] [blame] | 60 | testonly = true |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 61 | sources = [ |
Jakub Pawlowski | e6d1202 | 2016-05-12 11:16:46 -0700 | [diff] [blame^] | 62 | "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 Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 81 | ] |
| 82 | |
| 83 | include_dirs = [ |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 84 | "//", |
Jakub Pawlowski | d7a05a0 | 2016-02-22 18:04:24 -0800 | [diff] [blame] | 85 | "//osi/test", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 86 | ] |
| 87 | |
| 88 | deps = [ |
| 89 | "//osi", |
Jakub Pawlowski | d7a05a0 | 2016-02-22 18:04:24 -0800 | [diff] [blame] | 90 | "//third_party/googletest:gtest_main", |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 91 | ] |
| 92 | |
Jakub Pawlowski | d7a05a0 | 2016-02-22 18:04:24 -0800 | [diff] [blame] | 93 | libs = [ |
| 94 | "-lpthread", |
| 95 | "-lrt", |
| 96 | ] |
Scott James Remnant | 4c29231 | 2015-05-12 13:58:49 -0700 | [diff] [blame] | 97 | } |