Makefile.am 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. dist_pkgcfg_DATA = \
  7. peerstore.conf
  8. if MINGW
  9. WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
  10. endif
  11. if USE_COVERAGE
  12. AM_CFLAGS = -fprofile-arcs -ftest-coverage
  13. endif
  14. bin_PROGRAMS = \
  15. gnunet-peerstore
  16. libexec_PROGRAMS = \
  17. gnunet-service-peerstore
  18. lib_LTLIBRARIES = \
  19. libgnunetpeerstore.la
  20. gnunet_peerstore_SOURCES = \
  21. gnunet-peerstore.c
  22. gnunet_peerstore_LDADD = \
  23. $(top_builddir)/src/util/libgnunetutil.la \
  24. libgnunetpeerstore.la \
  25. $(GN_LIBINTL)
  26. gnunet_service_peerstore_SOURCES = \
  27. gnunet-service-peerstore.c \
  28. peerstore_common.c peerstore_common.h \
  29. peerstore.h
  30. gnunet_service_peerstore_CFLAGS = $(AM_CFLAGS)
  31. gnunet_service_peerstore_LDADD = \
  32. $(top_builddir)/src/util/libgnunetutil.la \
  33. $(GN_LIBINTL)
  34. libgnunetpeerstore_la_SOURCES = \
  35. peerstore_api.c \
  36. peerstore_common.c
  37. libgnunetpeerstore_la_LIBADD = \
  38. $(top_builddir)/src/util/libgnunetutil.la
  39. libgnunetpeerstore_la_LDFLAGS = \
  40. $(GN_LIB_LDFLAGS)
  41. if HAVE_EXPERIMENTAL
  42. FLAT_PLUGIN = libgnunet_plugin_peerstore_flat.la
  43. FLAT_TESTS = test_plugin_peerstore_flat
  44. libgnunet_plugin_peerstore_flat_la_SOURCES = \
  45. plugin_peerstore_flat.c
  46. libgnunet_plugin_peerstore_flat_la_LIBADD = \
  47. libgnunetpeerstore.la \
  48. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  49. $(LTLIBINTL)
  50. libgnunet_plugin_peerstore_flat_la_LDFLAGS = \
  51. $(GN_PLUGIN_LDFLAGS)
  52. endif
  53. if HAVE_SQLITE
  54. SQLITE_PLUGIN = libgnunet_plugin_peerstore_sqlite.la
  55. if HAVE_TESTING
  56. SQLITE_TESTS = test_plugin_peerstore_sqlite
  57. endif
  58. libgnunet_plugin_peerstore_sqlite_la_SOURCES = \
  59. plugin_peerstore_sqlite.c
  60. libgnunet_plugin_peerstore_sqlite_la_LIBADD = \
  61. libgnunetpeerstore.la \
  62. $(top_builddir)/src/sq/libgnunetsq.la \
  63. $(top_builddir)/src/util/libgnunetutil.la \
  64. $(XLIBS) -lsqlite3 \
  65. $(LTLIBINTL)
  66. libgnunet_plugin_peerstore_sqlite_la_LDFLAGS = \
  67. $(GN_PLUGIN_LDFLAGS)
  68. endif
  69. plugin_LTLIBRARIES = \
  70. $(SQLITE_PLUGIN) \
  71. $(FLAT_PLUGIN)
  72. test_plugin_peerstore_sqlite_SOURCES = \
  73. test_plugin_peerstore.c
  74. test_plugin_peerstore_sqlite_LDADD = \
  75. $(top_builddir)/src/testing/libgnunettesting.la \
  76. $(top_builddir)/src/util/libgnunetutil.la
  77. test_plugin_peerstore_flat_SOURCES = \
  78. test_plugin_peerstore.c
  79. test_plugin_peerstore_flat_LDADD = \
  80. $(top_builddir)/src/testing/libgnunettesting.la \
  81. $(top_builddir)/src/util/libgnunetutil.la
  82. check_PROGRAMS = \
  83. test_peerstore_api_store \
  84. test_peerstore_api_iterate \
  85. test_peerstore_api_watch \
  86. test_peerstore_api_sync \
  87. perf_peerstore_store \
  88. $(SQLITE_TESTS) \
  89. $(FLAT_TESTS)
  90. EXTRA_DIST = \
  91. test_peerstore_api_data.conf \
  92. test_plugin_peerstore_flat.conf \
  93. test_plugin_peerstore_sqlite.conf
  94. if ENABLE_TEST_RUN
  95. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  96. TESTS = $(check_PROGRAMS)
  97. endif
  98. test_peerstore_api_store_SOURCES = \
  99. test_peerstore_api_store.c
  100. test_peerstore_api_store_LDADD = \
  101. libgnunetpeerstore.la \
  102. $(top_builddir)/src/testing/libgnunettesting.la \
  103. $(top_builddir)/src/util/libgnunetutil.la
  104. test_peerstore_api_iterate_SOURCES = \
  105. test_peerstore_api_iterate.c
  106. test_peerstore_api_iterate_LDADD = \
  107. libgnunetpeerstore.la \
  108. $(top_builddir)/src/testing/libgnunettesting.la \
  109. $(top_builddir)/src/util/libgnunetutil.la
  110. test_peerstore_api_watch_SOURCES = \
  111. test_peerstore_api_watch.c
  112. test_peerstore_api_watch_LDADD = \
  113. libgnunetpeerstore.la \
  114. $(top_builddir)/src/testing/libgnunettesting.la \
  115. $(top_builddir)/src/util/libgnunetutil.la
  116. test_peerstore_api_sync_SOURCES = \
  117. test_peerstore_api_sync.c
  118. test_peerstore_api_sync_LDADD = \
  119. libgnunetpeerstore.la \
  120. $(top_builddir)/src/testing/libgnunettesting.la \
  121. $(top_builddir)/src/util/libgnunetutil.la
  122. perf_peerstore_store_SOURCES = \
  123. perf_peerstore_store.c
  124. perf_peerstore_store_LDADD = \
  125. libgnunetpeerstore.la \
  126. $(top_builddir)/src/testing/libgnunettesting.la \
  127. $(top_builddir)/src/util/libgnunetutil.la