Android.bp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. cc_binary {
  2. name: "gps_test",
  3. vendor: true,
  4. srcs: [
  5. "android/gps_test.c"
  6. ],
  7. shared_libs: [
  8. "libutils",
  9. "liblog",
  10. "libcutils"
  11. ],
  12. static_libs: [
  13. "libgps_static"
  14. ],
  15. cflags: [
  16. "-Wno-unused-variable",
  17. "-Wno-unused-parameter",
  18. "-Wno-missing-field-initializers",
  19. ]
  20. }
  21. cc_binary {
  22. name: "gpsd",
  23. vendor: true,
  24. required: ["gpsd_wrapper"],
  25. generated_headers: [
  26. "gpsd_config_h",
  27. "gpsd_packet_names_h"
  28. ],
  29. srcs: [
  30. "dbusexport.c",
  31. "gpsd.c",
  32. "shmexport.c",
  33. "timehint.c"
  34. ],
  35. static_libs: [
  36. "libgpsd",
  37. "libgps_static",
  38. ],
  39. cflags: [
  40. "-Wno-unused-variable",
  41. "-Wno-unused-parameter",
  42. "-Wno-missing-field-initializers",
  43. ]
  44. }
  45. cc_binary {
  46. name: "gpsd_wrapper",
  47. vendor: true,
  48. init_rc: ["android/gpsd.rc"],
  49. srcs: ["android/gpsd_wrapper.c"],
  50. shared_libs: [
  51. "liblog",
  52. "libcutils"
  53. ]
  54. }
  55. cc_library_shared {
  56. name: "libgps",
  57. vendor: true,
  58. export_include_dirs: ["."],
  59. generated_headers: [
  60. "gpsd_config_h",
  61. "gpsd_packet_names_h"
  62. ],
  63. generated_sources: ["gps_maskdump_c"],
  64. srcs: [
  65. "bits.c",
  66. "gpsdclient.c",
  67. "gpsutils.c",
  68. "hex.c",
  69. "json.c",
  70. "libgps_core.c",
  71. "libgps_dbus.c",
  72. "libgps_json.c",
  73. "libgps_shm.c",
  74. "libgps_sock.c",
  75. "netlib.c",
  76. "os_compat.c",
  77. "rtcm2_json.c",
  78. "rtcm3_json.c",
  79. "shared_json.c"
  80. ],
  81. cflags: [
  82. "-Wno-unused-variable",
  83. "-Wno-unused-parameter",
  84. "-Wno-missing-field-initializers",
  85. ],
  86. }
  87. cc_library_static {
  88. name: "libgps_static",
  89. vendor: true,
  90. export_include_dirs: ["."],
  91. generated_headers: [
  92. "gpsd_config_h",
  93. "gpsd_packet_names_h"
  94. ],
  95. generated_sources: ["gps_maskdump_c"],
  96. srcs: [
  97. "bits.c",
  98. "gpsdclient.c",
  99. "gpsutils.c",
  100. "hex.c",
  101. "json.c",
  102. "libgps_core.c",
  103. "libgps_dbus.c",
  104. "libgps_json.c",
  105. "libgps_shm.c",
  106. "libgps_sock.c",
  107. "netlib.c",
  108. "os_compat.c",
  109. "rtcm2_json.c",
  110. "rtcm3_json.c",
  111. "shared_json.c"
  112. ],
  113. cflags: [
  114. "-Wno-unused-variable",
  115. "-Wno-unused-parameter",
  116. "-Wno-missing-field-initializers",
  117. ],
  118. }
  119. genrule {
  120. name: "gpsd_packet_names_h",
  121. cmd: "rm -f $(out); sed -e '/^ *\\([A-Z][A-Z0-9_]*\\)," +
  122. "/s// \"\\1\",/' < $(in) > $(out)",
  123. srcs: ["packet_states.h"],
  124. out: ["packet_names.h"]
  125. }
  126. genrule {
  127. name: "gpsd_config_h",
  128. cmd: "cat $(in)/android/gpsd_config.in > $(out);" +
  129. "grep \"^gpsd_version\" $(in)/SConstruct | " +
  130. "cut -d\\= -f2 | sed -e 's/^/#define VERSION/'" +
  131. ">> $(out); " +
  132. "grep \"^gpsd_version\" $(in)/SConstruct | " +
  133. "cut -d\\= -f2 | sed -e 's/^/#define RELEASE/'" +
  134. ">> $(out)",
  135. srcs: [""],
  136. out: ["gpsd_config.h"]
  137. }
  138. python_binary_host {
  139. name: "maskaudit",
  140. main: "maskaudit.py",
  141. srcs: ["maskaudit.py"]
  142. }
  143. genrule {
  144. name: "gps_maskdump_c",
  145. tools: ["maskaudit"],
  146. cmd: "$(location maskaudit) -c $(in) > $(out)",
  147. out: ["gps_maskdump.c"],
  148. srcs: [""]
  149. }
  150. cc_library_static {
  151. name: "libgpsd",
  152. vendor: true,
  153. export_include_dirs: ["."],
  154. generated_headers: [
  155. "gpsd_config_h",
  156. "gpsd_packet_names_h"
  157. ],
  158. srcs: [
  159. "bsd_base64.c",
  160. "crc24q.c",
  161. "driver_ais.c",
  162. "driver_evermore.c",
  163. "driver_garmin.c",
  164. "driver_garmin_txt.c",
  165. "driver_geostar.c",
  166. "driver_greis.c",
  167. "driver_greis_checksum.c",
  168. "driver_italk.c",
  169. "driver_navcom.c",
  170. "driver_nmea0183.c",
  171. "driver_nmea2000.c",
  172. "driver_oncore.c",
  173. "driver_rtcm2.c",
  174. "driver_rtcm3.c",
  175. "drivers.c",
  176. "driver_sirf.c",
  177. "driver_skytraq.c",
  178. "driver_superstar2.c",
  179. "driver_tsip.c",
  180. "driver_ubx.c",
  181. "driver_zodiac.c",
  182. "geoid.c",
  183. "gpsd_json.c",
  184. "isgps.c",
  185. "libgpsd_core.c",
  186. "matrix.c",
  187. "net_dgpsip.c",
  188. "net_gnss_dispatch.c",
  189. "net_ntrip.c",
  190. "ntpshmread.c",
  191. "ntpshmwrite.c",
  192. "packet.c",
  193. "ppsthread.c",
  194. "pseudoais.c",
  195. "pseudonmea.c",
  196. "serial.c",
  197. "subframe.c",
  198. "timebase.c",
  199. "timespec_str.c"
  200. ],
  201. cflags: [
  202. "-Wno-unused-variable",
  203. "-Wno-unused-parameter",
  204. "-Wno-missing-field-initializers",
  205. "-Wno-uninitialized"
  206. ],
  207. }