Android.bp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. cc_defaults {
  2. name: "fluoride_osi_defaults",
  3. defaults: ["fluoride_defaults"],
  4. include_dirs: [
  5. "system/bt",
  6. "system/bt/internal_include",
  7. "system/bt/utils/include",
  8. "system/bt/stack/include",
  9. ]
  10. }
  11. // Static libraries required by other modules
  12. // ========================================================
  13. cc_test_library {
  14. name: "libosi-AllocationTestHarness",
  15. defaults: ["fluoride_osi_defaults"],
  16. srcs: [
  17. "test/AllocationTestHarness.cc",
  18. ],
  19. host_supported: true,
  20. shared: {
  21. enabled: false
  22. },
  23. }
  24. cc_test_library {
  25. name: "libosi-AlarmTestHarness",
  26. defaults: ["fluoride_osi_defaults"],
  27. srcs: [
  28. "test/AlarmTestHarness.cc",
  29. ],
  30. host_supported: true,
  31. shared: {
  32. enabled: false
  33. },
  34. }
  35. // libosi static library for target
  36. // ========================================================
  37. cc_library_static {
  38. name: "libosi",
  39. defaults: ["fluoride_osi_defaults"],
  40. // TODO(mcchou): Remove socket_utils sources after platform specific
  41. // dependencies are abstracted.
  42. srcs: [
  43. "src/alarm.cc",
  44. "src/allocation_tracker.cc",
  45. "src/allocator.cc",
  46. "src/array.cc",
  47. "src/buffer.cc",
  48. "src/compat.cc",
  49. "src/config.cc",
  50. "src/fixed_queue.cc",
  51. "src/future.cc",
  52. "src/hash_map_utils.cc",
  53. "src/list.cc",
  54. "src/mutex.cc",
  55. "src/osi.cc",
  56. "src/properties.cc",
  57. "src/reactor.cc",
  58. "src/ringbuffer.cc",
  59. "src/semaphore.cc",
  60. "src/socket.cc",
  61. "src/socket_utils/socket_local_client.cc",
  62. "src/socket_utils/socket_local_server.cc",
  63. "src/thread.cc",
  64. "src/wakelock.cc",
  65. ],
  66. shared_libs: [
  67. "liblog",
  68. ],
  69. static_libs: ["libbt-protos-lite"],
  70. host_supported: true,
  71. // TODO(armansito): Setting _GNU_SOURCE isn't very platform-independent but
  72. // should be compatible for a Linux host OS. We should figure out what to do for
  73. // a non-Linux host OS.
  74. target: {
  75. linux_glibc: {
  76. cflags: [
  77. "-D_GNU_SOURCE",
  78. "-DOS_GENERIC",
  79. ],
  80. },
  81. },
  82. }
  83. // libosi unit tests for target and host
  84. // ========================================================
  85. cc_test {
  86. name: "net_test_osi",
  87. test_suites: ["device-tests"],
  88. defaults: ["fluoride_osi_defaults"],
  89. host_supported: true,
  90. srcs: [
  91. "test/AlarmTestHarness.cc",
  92. "test/AllocationTestHarness.cc",
  93. "test/alarm_test.cc",
  94. "test/allocation_tracker_test.cc",
  95. "test/allocator_test.cc",
  96. "test/array_test.cc",
  97. "test/config_test.cc",
  98. "test/fixed_queue_test.cc",
  99. "test/future_test.cc",
  100. "test/hash_map_utils_test.cc",
  101. "test/list_test.cc",
  102. "test/properties_test.cc",
  103. "test/rand_test.cc",
  104. "test/reactor_test.cc",
  105. "test/ringbuffer_test.cc",
  106. "test/semaphore_test.cc",
  107. "test/thread_test.cc",
  108. "test/wakelock_test.cc",
  109. ],
  110. shared_libs: [
  111. "liblog",
  112. "libprotobuf-cpp-lite",
  113. "libcutils",
  114. "libcrypto",
  115. ],
  116. static_libs: [
  117. "libbt-common",
  118. "libbt-protos-lite",
  119. "libgmock",
  120. "libosi",
  121. ],
  122. target: {
  123. linux_glibc: {
  124. cflags: ["-DOS_GENERIC"],
  125. },
  126. },
  127. sanitize: {
  128. cfi: false,
  129. },
  130. }