Makefile.am 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. # This Makefile.am is in the public domain
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/include
  3. plugindir = $(libdir)/gnunet
  4. pkgcfgdir= $(pkgdatadir)/config.d/
  5. libexecdir= $(pkglibdir)/libexec/
  6. pkgcfg_DATA = \
  7. datastore.conf
  8. if MINGW
  9. WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
  10. endif
  11. if USE_COVERAGE
  12. AM_CFLAGS = --coverage -O0
  13. XLIBS = -lgcov
  14. endif
  15. lib_LTLIBRARIES = \
  16. libgnunetdatastore.la
  17. libgnunetdatastore_la_SOURCES = \
  18. datastore_api.c datastore.h
  19. libgnunetdatastore_la_LIBADD = \
  20. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  21. $(top_builddir)/src/util/libgnunetutil.la \
  22. $(GN_LIBINTL)
  23. libgnunetdatastore_la_LDFLAGS = \
  24. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  25. -version-info 1:0:0
  26. bin_PROGRAMS = \
  27. gnunet-datastore
  28. libexec_PROGRAMS = \
  29. gnunet-service-datastore
  30. gnunet_service_datastore_SOURCES = \
  31. gnunet-service-datastore.c
  32. gnunet_service_datastore_LDADD = \
  33. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  34. $(top_builddir)/src/util/libgnunetutil.la \
  35. $(GN_LIBINTL)
  36. gnunet_datastore_SOURCES = \
  37. gnunet-datastore.c
  38. gnunet_datastore_LDADD = \
  39. libgnunetdatastore.la \
  40. $(top_builddir)/src/util/libgnunetutil.la \
  41. $(GN_LIBINTL)
  42. if HAVE_MYSQL
  43. MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la
  44. if HAVE_TESTING
  45. if HAVE_BENCHMARKS
  46. MYSQL_BENCHMARKS = \
  47. perf_datastore_api_mysql \
  48. perf_plugin_datastore_mysql
  49. endif
  50. MYSQL_TESTS = \
  51. test_datastore_api_mysql \
  52. test_datastore_api_management_mysql \
  53. test_plugin_datastore_mysql \
  54. $(MYSQL_BENCHMARKS)
  55. endif
  56. endif
  57. if HAVE_SQLITE
  58. SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
  59. if HAVE_TESTING
  60. if HAVE_BENCHMARKS
  61. SQLITE_BENCHMARKS = \
  62. perf_datastore_api_sqlite \
  63. perf_plugin_datastore_sqlite
  64. endif
  65. SQLITE_TESTS = \
  66. test_datastore_api_sqlite \
  67. test_datastore_api_management_sqlite \
  68. test_plugin_datastore_sqlite \
  69. $(SQLITE_BENCHMARKS)
  70. endif
  71. endif
  72. if HAVE_POSTGRESQL
  73. POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
  74. if HAVE_TESTING
  75. if HAVE_BENCHMARKS
  76. POSTGRES_BENCHMARKS = \
  77. perf_datastore_api_postgres \
  78. perf_plugin_datastore_postgres
  79. endif
  80. POSTGRES_TESTS = \
  81. test_datastore_api_postgres \
  82. test_datastore_api_management_postgres \
  83. test_plugin_datastore_postgres \
  84. $(POSTGRES_BENCHMARKS)
  85. endif
  86. endif
  87. plugin_LTLIBRARIES = \
  88. $(SQLITE_PLUGIN) \
  89. $(MYSQL_PLUGIN) \
  90. $(POSTGRES_PLUGIN) \
  91. libgnunet_plugin_datastore_heap.la
  92. # Real plugins should of course go into
  93. # plugin_LTLIBRARIES
  94. noinst_LTLIBRARIES = \
  95. libgnunet_plugin_datastore_template.la
  96. libgnunet_plugin_datastore_sqlite_la_SOURCES = \
  97. plugin_datastore_sqlite.c
  98. libgnunet_plugin_datastore_sqlite_la_LIBADD = \
  99. $(top_builddir)/src/sq/libgnunetsq.la \
  100. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  101. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
  102. $(LTLIBINTL)
  103. libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
  104. $(GN_PLUGIN_LDFLAGS)
  105. libgnunet_plugin_datastore_heap_la_SOURCES = \
  106. plugin_datastore_heap.c
  107. libgnunet_plugin_datastore_heap_la_LIBADD = \
  108. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  109. $(LTLIBINTL)
  110. libgnunet_plugin_datastore_heap_la_LDFLAGS = \
  111. $(GN_PLUGIN_LDFLAGS)
  112. libgnunet_plugin_datastore_mysql_la_SOURCES = \
  113. plugin_datastore_mysql.c
  114. libgnunet_plugin_datastore_mysql_la_LIBADD = \
  115. $(top_builddir)/src/my/libgnunetmy.la \
  116. $(top_builddir)/src/mysql/libgnunetmysql.la \
  117. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  118. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) $(Z_LIBS) -lmysqlclient
  119. libgnunet_plugin_datastore_mysql_la_LDFLAGS = \
  120. $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
  121. libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \
  122. $(MYSQL_CPPFLAGS) $(AM_CPPFLAGS)
  123. libgnunet_plugin_datastore_postgres_la_SOURCES = \
  124. plugin_datastore_postgres.c
  125. libgnunet_plugin_datastore_postgres_la_LIBADD = \
  126. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  127. $(top_builddir)/src/pq/libgnunetpq.la \
  128. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq
  129. libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
  130. $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
  131. libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
  132. $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
  133. libgnunet_plugin_datastore_template_la_SOURCES = \
  134. plugin_datastore_template.c
  135. libgnunet_plugin_datastore_template_la_LIBADD = \
  136. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  137. $(LTLIBINTL)
  138. libgnunet_plugin_datastore_template_la_LDFLAGS = \
  139. $(GN_PLUGIN_LDFLAGS)
  140. check_PROGRAMS = \
  141. test_datastore_api_heap \
  142. test_datastore_api_management_heap \
  143. perf_datastore_api_heap \
  144. perf_plugin_datastore_heap \
  145. test_plugin_datastore_heap \
  146. $(SQLITE_TESTS) \
  147. $(MYSQL_TESTS) \
  148. $(POSTGRES_TESTS)
  149. if ENABLE_TEST_RUN
  150. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  151. TESTS = $(check_PROGRAMS)
  152. endif
  153. test_datastore_api_heap_SOURCES = \
  154. test_datastore_api.c
  155. test_datastore_api_heap_LDADD = \
  156. $(top_builddir)/src/testing/libgnunettesting.la \
  157. libgnunetdatastore.la \
  158. $(top_builddir)/src/util/libgnunetutil.la
  159. test_datastore_api_management_heap_SOURCES = \
  160. test_datastore_api_management.c
  161. test_datastore_api_management_heap_LDADD = \
  162. $(top_builddir)/src/testing/libgnunettesting.la \
  163. libgnunetdatastore.la \
  164. $(top_builddir)/src/util/libgnunetutil.la
  165. perf_datastore_api_heap_SOURCES = \
  166. perf_datastore_api.c
  167. perf_datastore_api_heap_LDADD = \
  168. $(top_builddir)/src/testing/libgnunettesting.la \
  169. libgnunetdatastore.la \
  170. $(top_builddir)/src/util/libgnunetutil.la
  171. perf_plugin_datastore_heap_SOURCES = \
  172. perf_plugin_datastore.c
  173. perf_plugin_datastore_heap_LDADD = \
  174. $(top_builddir)/src/testing/libgnunettesting.la \
  175. $(top_builddir)/src/util/libgnunetutil.la
  176. test_plugin_datastore_heap_SOURCES = \
  177. test_plugin_datastore.c
  178. test_plugin_datastore_heap_LDADD = \
  179. $(top_builddir)/src/testing/libgnunettesting.la \
  180. $(top_builddir)/src/util/libgnunetutil.la
  181. test_datastore_api_sqlite_SOURCES = \
  182. test_datastore_api.c
  183. test_datastore_api_sqlite_LDADD = \
  184. $(top_builddir)/src/testing/libgnunettesting.la \
  185. libgnunetdatastore.la \
  186. $(top_builddir)/src/util/libgnunetutil.la
  187. test_datastore_api_management_sqlite_SOURCES = \
  188. test_datastore_api_management.c
  189. test_datastore_api_management_sqlite_LDADD = \
  190. $(top_builddir)/src/testing/libgnunettesting.la \
  191. libgnunetdatastore.la \
  192. $(top_builddir)/src/util/libgnunetutil.la
  193. perf_datastore_api_sqlite_SOURCES = \
  194. perf_datastore_api.c
  195. perf_datastore_api_sqlite_LDADD = \
  196. $(top_builddir)/src/testing/libgnunettesting.la \
  197. libgnunetdatastore.la \
  198. $(top_builddir)/src/util/libgnunetutil.la
  199. perf_plugin_datastore_sqlite_SOURCES = \
  200. perf_plugin_datastore.c
  201. perf_plugin_datastore_sqlite_LDADD = \
  202. $(top_builddir)/src/testing/libgnunettesting.la \
  203. $(top_builddir)/src/util/libgnunetutil.la
  204. test_plugin_datastore_sqlite_SOURCES = \
  205. test_plugin_datastore.c
  206. test_plugin_datastore_sqlite_LDADD = \
  207. $(top_builddir)/src/testing/libgnunettesting.la \
  208. $(top_builddir)/src/util/libgnunetutil.la
  209. test_datastore_api_mysql_SOURCES = \
  210. test_datastore_api.c
  211. test_datastore_api_mysql_LDADD = \
  212. $(top_builddir)/src/testing/libgnunettesting.la \
  213. libgnunetdatastore.la \
  214. $(top_builddir)/src/util/libgnunetutil.la
  215. test_datastore_api_management_mysql_SOURCES = \
  216. test_datastore_api_management.c
  217. test_datastore_api_management_mysql_LDADD = \
  218. $(top_builddir)/src/testing/libgnunettesting.la \
  219. libgnunetdatastore.la \
  220. $(top_builddir)/src/util/libgnunetutil.la
  221. perf_datastore_api_mysql_SOURCES = \
  222. perf_datastore_api.c
  223. perf_datastore_api_mysql_LDADD = \
  224. $(top_builddir)/src/testing/libgnunettesting.la \
  225. libgnunetdatastore.la \
  226. $(top_builddir)/src/util/libgnunetutil.la
  227. test_plugin_datastore_mysql_SOURCES = \
  228. test_plugin_datastore.c
  229. test_plugin_datastore_mysql_LDADD = \
  230. $(top_builddir)/src/testing/libgnunettesting.la \
  231. $(top_builddir)/src/util/libgnunetutil.la
  232. perf_plugin_datastore_mysql_SOURCES = \
  233. perf_plugin_datastore.c
  234. perf_plugin_datastore_mysql_LDADD = \
  235. $(top_builddir)/src/testing/libgnunettesting.la \
  236. $(top_builddir)/src/util/libgnunetutil.la
  237. test_datastore_api_postgres_SOURCES = \
  238. test_datastore_api.c
  239. test_datastore_api_postgres_LDADD = \
  240. $(top_builddir)/src/testing/libgnunettesting.la \
  241. libgnunetdatastore.la \
  242. $(top_builddir)/src/util/libgnunetutil.la
  243. test_datastore_api_management_postgres_SOURCES = \
  244. test_datastore_api_management.c
  245. test_datastore_api_management_postgres_LDADD = \
  246. $(top_builddir)/src/testing/libgnunettesting.la \
  247. libgnunetdatastore.la \
  248. $(top_builddir)/src/util/libgnunetutil.la
  249. perf_datastore_api_postgres_SOURCES = \
  250. perf_datastore_api.c
  251. perf_datastore_api_postgres_LDADD = \
  252. $(top_builddir)/src/testing/libgnunettesting.la \
  253. libgnunetdatastore.la \
  254. $(top_builddir)/src/util/libgnunetutil.la
  255. test_plugin_datastore_postgres_SOURCES = \
  256. test_plugin_datastore.c
  257. test_plugin_datastore_postgres_LDADD = \
  258. $(top_builddir)/src/testing/libgnunettesting.la \
  259. $(top_builddir)/src/util/libgnunetutil.la
  260. perf_plugin_datastore_postgres_SOURCES = \
  261. perf_plugin_datastore.c
  262. perf_plugin_datastore_postgres_LDADD = \
  263. $(top_builddir)/src/testing/libgnunettesting.la \
  264. $(top_builddir)/src/util/libgnunetutil.la
  265. EXTRA_DIST = \
  266. test_defaults.conf \
  267. test_datastore_api_data_sqlite.conf \
  268. perf_plugin_datastore_data_sqlite.conf \
  269. test_plugin_datastore_data_sqlite.conf \
  270. test_datastore_api_data_heap.conf \
  271. perf_plugin_datastore_data_heap.conf \
  272. test_plugin_datastore_data_heap.conf \
  273. test_datastore_api_data_mysql.conf \
  274. perf_plugin_datastore_data_mysql.conf \
  275. test_plugin_datastore_data_mysql.conf \
  276. test_datastore_api_data_postgres.conf \
  277. perf_plugin_datastore_data_postgres.conf \
  278. test_plugin_datastore_data_postgres.conf