2
0

Makefile.am 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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. dist_pkgcfg_DATA = \
  6. datacache.conf
  7. if USE_COVERAGE
  8. AM_CFLAGS = --coverage -O0
  9. XLIBS = -lgcov
  10. endif
  11. if HAVE_SQLITE
  12. SQLITE_PLUGIN = libgnunet_plugin_datacache_sqlite.la
  13. endif
  14. if HAVE_POSTGRESQL
  15. POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la
  16. endif
  17. lib_LTLIBRARIES = \
  18. libgnunetdatacache.la
  19. libgnunetdatacache_la_SOURCES = \
  20. datacache.c
  21. libgnunetdatacache_la_LIBADD = \
  22. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  23. $(top_builddir)/src/util/libgnunetutil.la \
  24. $(GN_LIBINTL)
  25. libgnunetdatacache_la_LDFLAGS = \
  26. $(GN_LIB_LDFLAGS) \
  27. -version-info 0:1:0
  28. plugin_LTLIBRARIES = \
  29. $(SQLITE_PLUGIN) \
  30. $(POSTGRES_PLUGIN) \
  31. libgnunet_plugin_datacache_heap.la
  32. # Real plugins should of course go into
  33. # plugin_LTLIBRARIES
  34. noinst_LTLIBRARIES = \
  35. libgnunet_plugin_datacache_template.la
  36. libgnunet_plugin_datacache_sqlite_la_SOURCES = \
  37. plugin_datacache_sqlite.c
  38. libgnunet_plugin_datacache_sqlite_la_LIBADD = \
  39. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  40. $(top_builddir)/src/sq/libgnunetsq.la \
  41. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
  42. $(LTLIBINTL)
  43. libgnunet_plugin_datacache_sqlite_la_LDFLAGS = \
  44. $(GN_PLUGIN_LDFLAGS)
  45. libgnunet_plugin_datacache_heap_la_SOURCES = \
  46. plugin_datacache_heap.c
  47. libgnunet_plugin_datacache_heap_la_LIBADD = \
  48. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  49. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  50. $(LTLIBINTL)
  51. libgnunet_plugin_datacache_heap_la_LDFLAGS = \
  52. $(GN_PLUGIN_LDFLAGS)
  53. libgnunet_plugin_datacache_postgres_la_SOURCES = \
  54. plugin_datacache_postgres.c
  55. libgnunet_plugin_datacache_postgres_la_LIBADD = \
  56. $(top_builddir)/src/pq/libgnunetpq.la \
  57. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  58. $(top_builddir)/src/util/libgnunetutil.la \
  59. $(GN_PLUGIN_LDFLAGS) -lpq
  60. libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \
  61. $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
  62. libgnunet_plugin_datacache_postgres_la_LDFLAGS = \
  63. $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
  64. libgnunet_plugin_datacache_template_la_SOURCES = \
  65. plugin_datacache_template.c
  66. libgnunet_plugin_datacache_template_la_LIBADD = \
  67. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  68. $(LTLIBINTL)
  69. libgnunet_plugin_datacache_template_la_LDFLAGS = \
  70. $(GN_PLUGIN_LDFLAGS)
  71. if HAVE_TESTING
  72. if HAVE_SQLITE
  73. if HAVE_BENCHMARKS
  74. SQLITE_BENCHMARKS = \
  75. perf_datacache_sqlite
  76. endif
  77. SQLITE_TESTS = \
  78. test_datacache_sqlite \
  79. test_datacache_quota_sqlite \
  80. $(SQLITE_BENCHMARKS)
  81. endif
  82. if HAVE_BENCHMARKS
  83. HEAP_BENCHMARKS = \
  84. perf_datacache_heap
  85. endif
  86. HEAP_TESTS = \
  87. test_datacache_heap \
  88. test_datacache_quota_heap \
  89. $(HEAP_BENCHMARKS)
  90. if HAVE_POSTGRESQL
  91. if HAVE_BENCHMARKS
  92. POSTGRES_BENCHMARKS = \
  93. perf_datacache_postgres
  94. endif
  95. POSTGRES_TESTS = \
  96. test_datacache_postgres \
  97. test_datacache_quota_postgres \
  98. $(POSTGRES_BENCHMARKS)
  99. endif
  100. endif
  101. check_PROGRAMS = \
  102. $(SQLITE_TESTS) \
  103. $(HEAP_TESTS) \
  104. $(POSTGRES_TESTS)
  105. if ENABLE_TEST_RUN
  106. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  107. TESTS = $(check_PROGRAMS)
  108. endif
  109. test_datacache_sqlite_SOURCES = \
  110. test_datacache.c
  111. test_datacache_sqlite_LDADD = \
  112. $(top_builddir)/src/testing/libgnunettesting.la \
  113. libgnunetdatacache.la \
  114. $(top_builddir)/src/util/libgnunetutil.la
  115. test_datacache_quota_sqlite_SOURCES = \
  116. test_datacache_quota.c
  117. test_datacache_quota_sqlite_LDADD = \
  118. $(top_builddir)/src/testing/libgnunettesting.la \
  119. libgnunetdatacache.la \
  120. $(top_builddir)/src/util/libgnunetutil.la
  121. perf_datacache_sqlite_SOURCES = \
  122. perf_datacache.c
  123. perf_datacache_sqlite_LDADD = \
  124. $(top_builddir)/src/testing/libgnunettesting.la \
  125. libgnunetdatacache.la \
  126. $(top_builddir)/src/util/libgnunetutil.la
  127. test_datacache_heap_SOURCES = \
  128. test_datacache.c
  129. test_datacache_heap_LDADD = \
  130. $(top_builddir)/src/testing/libgnunettesting.la \
  131. libgnunetdatacache.la \
  132. $(top_builddir)/src/util/libgnunetutil.la
  133. test_datacache_quota_heap_SOURCES = \
  134. test_datacache_quota.c
  135. test_datacache_quota_heap_LDADD = \
  136. $(top_builddir)/src/testing/libgnunettesting.la \
  137. libgnunetdatacache.la \
  138. $(top_builddir)/src/util/libgnunetutil.la
  139. perf_datacache_heap_SOURCES = \
  140. perf_datacache.c
  141. perf_datacache_heap_LDADD = \
  142. $(top_builddir)/src/testing/libgnunettesting.la \
  143. libgnunetdatacache.la \
  144. $(top_builddir)/src/util/libgnunetutil.la
  145. test_datacache_postgres_SOURCES = \
  146. test_datacache.c
  147. test_datacache_postgres_LDADD = \
  148. $(top_builddir)/src/testing/libgnunettesting.la \
  149. libgnunetdatacache.la \
  150. $(top_builddir)/src/util/libgnunetutil.la
  151. test_datacache_quota_postgres_SOURCES = \
  152. test_datacache_quota.c
  153. test_datacache_quota_postgres_LDADD = \
  154. $(top_builddir)/src/testing/libgnunettesting.la \
  155. libgnunetdatacache.la \
  156. $(top_builddir)/src/util/libgnunetutil.la
  157. perf_datacache_postgres_SOURCES = \
  158. perf_datacache.c
  159. perf_datacache_postgres_LDADD = \
  160. $(top_builddir)/src/testing/libgnunettesting.la \
  161. libgnunetdatacache.la \
  162. $(top_builddir)/src/util/libgnunetutil.la
  163. EXTRA_DIST = \
  164. test_datacache_data_sqlite.conf \
  165. perf_datacache_data_sqlite.conf \
  166. test_datacache_data_heap.conf \
  167. perf_datacache_data_heap.conf \
  168. test_datacache_data_postgres.conf \
  169. perf_datacache_data_postgres.conf