Android.bp 5.2 KB

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