Makefile.am 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. AM_CPPFLAGS = -I$(top_srcdir)/src/include
  2. plugindir = $(libdir)/gnunet
  3. pkgcfgdir= $(pkgdatadir)/config.d/
  4. libexecdir= $(pkglibdir)/libexec/
  5. pkgcfg_DATA = \
  6. namecache.conf
  7. if MINGW
  8. WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
  9. endif
  10. if USE_COVERAGE
  11. AM_CFLAGS = --coverage -O0
  12. XLIBS = -lgcov
  13. endif
  14. if HAVE_SQLITE
  15. SQLITE_PLUGIN = libgnunet_plugin_namecache_sqlite.la
  16. if HAVE_TESTING
  17. SQLITE_TESTS = test_plugin_namecache_sqlite
  18. endif
  19. endif
  20. if HAVE_POSTGRESQL
  21. POSTGRES_PLUGIN = libgnunet_plugin_namecache_postgres.la
  22. if HAVE_TESTING
  23. POSTGRES_TESTS = test_plugin_namecache_postgres
  24. endif
  25. endif
  26. # testcases do not even build yet; thus: experimental!
  27. if HAVE_TESTING
  28. TESTING_TESTS = \
  29. test_namecache_api_cache_block
  30. endif
  31. if HAVE_SQLITE
  32. check_PROGRAMS = \
  33. $(SQLITE_TESTS) \
  34. $(POSTGRES_TESTS) \
  35. $(TESTING_TESTS)
  36. endif
  37. if ENABLE_TEST_RUN
  38. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
  39. TESTS = \
  40. $(check_PROGRAMS)
  41. endif
  42. lib_LTLIBRARIES = \
  43. libgnunetnamecache.la
  44. libgnunetnamecache_la_SOURCES = \
  45. namecache_api.c \
  46. namecache.h
  47. libgnunetnamecache_la_LIBADD = \
  48. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  49. $(top_builddir)/src/util/libgnunetutil.la \
  50. $(GN_LIBINTL)
  51. libgnunetnamecache_la_LDFLAGS = \
  52. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  53. -version-info 0:0:0
  54. libexec_PROGRAMS = \
  55. gnunet-service-namecache
  56. bin_PROGRAMS = \
  57. gnunet-namecache
  58. gnunet_namecache_SOURCES = \
  59. gnunet-namecache.c
  60. gnunet_namecache_LDADD = \
  61. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  62. $(top_builddir)/src/util/libgnunetutil.la \
  63. libgnunetnamecache.la \
  64. $(GN_LIBINTL)
  65. gnunet_namecache_DEPENDENCIES = \
  66. $(top_builddir)/src/identity/libgnunetidentity.la \
  67. $(top_builddir)/src/util/libgnunetutil.la \
  68. libgnunetnamecache.la
  69. gnunet_service_namecache_SOURCES = \
  70. gnunet-service-namecache.c
  71. gnunet_service_namecache_LDADD = \
  72. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  73. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  74. $(top_builddir)/src/util/libgnunetutil.la \
  75. libgnunetnamecache.la \
  76. $(GN_LIBINTL)
  77. gnunet_service_namecache_DEPENDENCIES = \
  78. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  79. $(top_builddir)/src/util/libgnunetutil.la \
  80. libgnunetnamecache.la
  81. plugin_LTLIBRARIES = \
  82. $(SQLITE_PLUGIN) \
  83. $(POSTGRES_PLUGIN)
  84. libgnunet_plugin_namecache_sqlite_la_SOURCES = \
  85. plugin_namecache_sqlite.c
  86. libgnunet_plugin_namecache_sqlite_la_LIBADD = \
  87. $(top_builddir)/src/namecache/libgnunetnamecache.la \
  88. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  89. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
  90. $(LTLIBINTL)
  91. libgnunet_plugin_namecache_sqlite_la_LDFLAGS = \
  92. $(GN_PLUGIN_LDFLAGS)
  93. libgnunet_plugin_namecache_sqlite_la_DEPENDENCIES = \
  94. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  95. $(top_builddir)/src/util/libgnunetutil.la \
  96. libgnunetnamecache.la
  97. libgnunet_plugin_namecache_postgres_la_SOURCES = \
  98. plugin_namecache_postgres.c
  99. libgnunet_plugin_namecache_postgres_la_LIBADD = \
  100. $(top_builddir)/src/namecache/libgnunetnamecache.la \
  101. $(top_builddir)/src/postgres/libgnunetpostgres.la \
  102. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  103. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
  104. $(LTLIBINTL)
  105. libgnunet_plugin_namecache_postgres_la_LDFLAGS = \
  106. $(GN_PLUGIN_LDFLAGS)
  107. libgnunet_plugin_namecache_postgres_la_DEPENDENCIES = \
  108. $(top_builddir)/src/postgres/libgnunetpostgres.la \
  109. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  110. $(top_builddir)/src/util/libgnunetutil.la \
  111. libgnunetnamecache.la
  112. test_namecache_api_cache_block_SOURCES = \
  113. test_namecache_api_cache_block.c
  114. test_namecache_api_cache_block_LDADD = \
  115. $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  116. $(top_builddir)/src/namecache/libgnunetnamecache.la \
  117. $(top_builddir)/src/testing/libgnunettesting.la \
  118. $(top_builddir)/src/util/libgnunetutil.la
  119. test_plugin_namecache_sqlite_SOURCES = \
  120. test_plugin_namecache.c
  121. test_plugin_namecache_sqlite_LDADD = \
  122. $(top_builddir)/src/testing/libgnunettesting.la \
  123. $(top_builddir)/src/util/libgnunetutil.la
  124. test_plugin_namecache_postgres_SOURCES = \
  125. test_plugin_namecache.c
  126. test_plugin_namecache_postgres_LDADD = \
  127. $(top_builddir)/src/testing/libgnunettesting.la \
  128. $(top_builddir)/src/util/libgnunetutil.la
  129. EXTRA_DIST = \
  130. test_namecache_api.conf \
  131. test_plugin_namecache_sqlite.conf \
  132. test_plugin_namecache_postgres.conf