BUILD.gn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. static_library("osi") {
  17. sources = [
  18. "src/alarm.cc",
  19. "src/allocation_tracker.cc",
  20. "src/allocator.cc",
  21. "src/array.cc",
  22. "src/buffer.cc",
  23. "src/compat.cc",
  24. "src/config.cc",
  25. "src/fixed_queue.cc",
  26. "src/future.cc",
  27. "src/hash_map_utils.cc",
  28. "src/list.cc",
  29. "src/mutex.cc",
  30. "src/osi.cc",
  31. "src/properties.cc",
  32. "src/reactor.cc",
  33. "src/ringbuffer.cc",
  34. "src/semaphore.cc",
  35. "src/socket.cc",
  36. # TODO(mcchou): Remove these sources after platform specific
  37. # dependencies are abstracted.
  38. "src/socket_utils/socket_local_client.cc",
  39. "src/socket_utils/socket_local_server.cc",
  40. "src/thread.cc",
  41. "src/wakelock.cc",
  42. ]
  43. include_dirs = [
  44. "//",
  45. "//linux_include",
  46. "//internal_include",
  47. "//utils/include",
  48. "//stack/include",
  49. ]
  50. deps = [
  51. "//common",
  52. "//third_party/libchrome:base",
  53. ]
  54. }
  55. executable("net_test_osi") {
  56. testonly = true
  57. sources = [
  58. "test/AlarmTestHarness.cc",
  59. "test/AllocationTestHarness.cc",
  60. "test/alarm_test.cc",
  61. "test/allocation_tracker_test.cc",
  62. "test/allocator_test.cc",
  63. "test/array_test.cc",
  64. "test/config_test.cc",
  65. "test/future_test.cc",
  66. "test/hash_map_utils_test.cc",
  67. "test/list_test.cc",
  68. "test/properties_test.cc",
  69. "test/rand_test.cc",
  70. "test/reactor_test.cc",
  71. "test/ringbuffer_test.cc",
  72. "test/thread_test.cc",
  73. ]
  74. include_dirs = [
  75. "//",
  76. "//osi/test",
  77. ]
  78. deps = [
  79. "//osi",
  80. "//third_party/googletest:gtest_main",
  81. "//third_party/googletest:gmock_main",
  82. "//third_party/libchrome:base",
  83. ]
  84. libs = [
  85. "-lpthread",
  86. "-lrt",
  87. ]
  88. }