Android.bp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. // Copyright (C) 2016 The Android Open Source Project
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. cc_defaults {
  15. name: "wificond_defaults",
  16. cppflags: [
  17. "-Wall",
  18. "-Werror",
  19. "-Wno-unused-parameter",
  20. ],
  21. include_dirs: ["system/connectivity"],
  22. }
  23. //
  24. // wificond daemon.
  25. //
  26. cc_binary {
  27. name: "wificond",
  28. defaults: ["wificond_defaults"],
  29. init_rc: ["wificond.rc"],
  30. srcs: ["main.cpp"],
  31. shared_libs: [
  32. "[email protected]",
  33. "libbinder",
  34. "libbase",
  35. "libcutils",
  36. "libhidlbase",
  37. "libhidltransport",
  38. "libminijail",
  39. "libutils",
  40. "libwifi-system-iface",
  41. ],
  42. static_libs: ["libwificond"],
  43. }
  44. //
  45. // wificond static library
  46. //
  47. cc_library_static {
  48. name: "libwificond",
  49. defaults: ["wificond_defaults"],
  50. srcs: [
  51. "ap_interface_binder.cpp",
  52. "ap_interface_impl.cpp",
  53. "client_interface_binder.cpp",
  54. "client_interface_impl.cpp",
  55. "logging_utils.cpp",
  56. "scanning/channel_settings.cpp",
  57. "scanning/hidden_network.cpp",
  58. "scanning/offload_scan_callback_interface_impl.cpp",
  59. "scanning/pno_network.cpp",
  60. "scanning/pno_settings.cpp",
  61. "scanning/radio_chain_info.cpp",
  62. "scanning/scan_result.cpp",
  63. "scanning/offload/scan_stats.cpp",
  64. "scanning/single_scan_settings.cpp",
  65. "scanning/scan_utils.cpp",
  66. "scanning/scanner_impl.cpp",
  67. "scanning/offload/offload_scan_manager.cpp",
  68. "scanning/offload/offload_callback.cpp",
  69. "scanning/offload/offload_service_utils.cpp",
  70. "scanning/offload/offload_scan_utils.cpp",
  71. "server.cpp",
  72. ],
  73. shared_libs: [
  74. "[email protected]",
  75. "libbase",
  76. "libutils",
  77. "libhidlbase",
  78. "libhidltransport",
  79. "libwifi-system-iface",
  80. ],
  81. whole_static_libs: [
  82. "libwificond_ipc",
  83. "libwificond_nl",
  84. "libwificond_event_loop",
  85. ],
  86. }
  87. //
  88. // wificond netlink library
  89. //
  90. cc_library_static {
  91. name: "libwificond_nl",
  92. defaults: ["wificond_defaults"],
  93. srcs: [
  94. "net/mlme_event.cpp",
  95. "net/netlink_manager.cpp",
  96. "net/netlink_utils.cpp",
  97. "net/nl80211_attribute.cpp",
  98. "net/nl80211_packet.cpp",
  99. ],
  100. shared_libs: ["libbase"],
  101. }
  102. //
  103. // wificond event loop library
  104. //
  105. cc_library_static {
  106. name: "libwificond_event_loop",
  107. defaults: ["wificond_defaults"],
  108. srcs: ["looper_backed_event_loop.cpp"],
  109. whole_static_libs: [
  110. "liblog",
  111. "libbase",
  112. "libutils",
  113. ],
  114. }
  115. //
  116. // wificond IPC interface library
  117. //
  118. cc_library_static {
  119. name: "libwificond_ipc",
  120. defaults: ["wificond_defaults"],
  121. aidl: {
  122. local_include_dirs: ["aidl"],
  123. export_aidl_headers: true,
  124. },
  125. srcs: [
  126. "ipc_constants.cpp",
  127. "aidl/android/net/wifi/IApInterface.aidl",
  128. "aidl/android/net/wifi/IApInterfaceEventCallback.aidl",
  129. "aidl/android/net/wifi/IClientInterface.aidl",
  130. "aidl/android/net/wifi/IInterfaceEventCallback.aidl",
  131. "aidl/android/net/wifi/IPnoScanEvent.aidl",
  132. "aidl/android/net/wifi/IScanEvent.aidl",
  133. "aidl/android/net/wifi/ISendMgmtFrameEvent.aidl",
  134. "aidl/android/net/wifi/IWificond.aidl",
  135. "aidl/android/net/wifi/IWifiScannerImpl.aidl",
  136. "scanning/channel_settings.cpp",
  137. "scanning/hidden_network.cpp",
  138. "scanning/pno_network.cpp",
  139. "scanning/pno_settings.cpp",
  140. "scanning/radio_chain_info.cpp",
  141. "scanning/scan_result.cpp",
  142. "scanning/single_scan_settings.cpp",
  143. ],
  144. shared_libs: ["libbinder"],
  145. }
  146. //
  147. // test util library
  148. //
  149. cc_library_static {
  150. name: "libwificond_test_utils",
  151. defaults: ["wificond_defaults"],
  152. srcs: [
  153. "tests/integration/binder_dispatcher.cpp",
  154. "tests/integration/process_utils.cpp",
  155. "tests/shell_utils.cpp",
  156. ],
  157. shared_libs: ["libbase"],
  158. whole_static_libs: [
  159. "libwificond_ipc",
  160. "libwificond_event_loop",
  161. ],
  162. }
  163. //
  164. // wificond unit tests.
  165. //
  166. cc_test {
  167. name: "wificond_unit_test",
  168. defaults: ["wificond_defaults"],
  169. test_suites: ["device-tests"],
  170. srcs: [
  171. "tests/ap_interface_impl_unittest.cpp",
  172. "tests/client_interface_impl_unittest.cpp",
  173. "tests/looper_backed_event_loop_unittest.cpp",
  174. "tests/main.cpp",
  175. "tests/mock_client_interface_impl.cpp",
  176. "tests/mock_netlink_manager.cpp",
  177. "tests/mock_netlink_utils.cpp",
  178. "tests/mock_offload.cpp",
  179. "tests/mock_offload_callback_handlers.cpp",
  180. "tests/mock_offload_scan_callback_interface.cpp",
  181. "tests/mock_offload_scan_callback_interface_impl.cpp",
  182. "tests/mock_offload_scan_manager.cpp",
  183. "tests/mock_offload_service_utils.cpp",
  184. "tests/mock_scan_utils.cpp",
  185. "tests/netlink_manager_unittest.cpp",
  186. "tests/netlink_utils_unittest.cpp",
  187. "tests/nl80211_attribute_unittest.cpp",
  188. "tests/nl80211_packet_unittest.cpp",
  189. "tests/offload_callback_test.cpp",
  190. "tests/offload_hal_test_constants.cpp",
  191. "tests/offload_scan_manager_test.cpp",
  192. "tests/offload_scan_utils_test.cpp",
  193. "tests/offload_test_utils.cpp",
  194. "tests/scanner_unittest.cpp",
  195. "tests/scan_result_unittest.cpp",
  196. "tests/scan_settings_unittest.cpp",
  197. "tests/scan_stats_unittest.cpp",
  198. "tests/scan_utils_unittest.cpp",
  199. "tests/server_unittest.cpp",
  200. ],
  201. static_libs: [
  202. "libgmock",
  203. "libgtest",
  204. "libwifi-system-iface-test",
  205. "libwificond",
  206. "libwificond_nl",
  207. ],
  208. shared_libs: [
  209. "[email protected]",
  210. "libbase",
  211. "libbinder",
  212. "libcutils",
  213. "libhidltransport",
  214. "libhidlbase",
  215. "liblog",
  216. "libutils",
  217. "libwifi-system-iface",
  218. ],
  219. }
  220. //
  221. // wificond device integration tests.
  222. //
  223. cc_test {
  224. name: "wificond_integration_test",
  225. defaults: ["wificond_defaults"],
  226. srcs: [
  227. "tests/integration/ap_interface_test.cpp",
  228. "tests/integration/client_interface_test.cpp",
  229. "tests/integration/life_cycle_test.cpp",
  230. "tests/integration/scanner_test.cpp",
  231. "tests/main.cpp",
  232. "tests/shell_unittest.cpp",
  233. ],
  234. shared_libs: [
  235. "libbase",
  236. "libbinder",
  237. "libcutils",
  238. "libutils",
  239. "libwifi-system-iface",
  240. ],
  241. static_libs: [
  242. "libgmock",
  243. "libwificond_ipc",
  244. "libwificond_test_utils",
  245. ],
  246. }