You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

156 lines
3.9 KiB

  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. psycstore.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. XLIB = -lgcov
  14. endif
  15. if HAVE_MYSQL
  16. MYSQL_PLUGIN = libgnunet_plugin_psycstore_mysql.la
  17. if HAVE_TESTING
  18. MYSQL_TESTS = test_plugin_psycstore_mysql
  19. endif
  20. endif
  21. if HAVE_POSTGRESQL
  22. POSTGRES_PLUGIN = libgnunet_plugin_psycstore_postgres.la
  23. if HAVE_TESTING
  24. POSTGRES_TESTS = test_plugin_psycstore_postgres
  25. endif
  26. endif
  27. if HAVE_SQLITE
  28. SQLITE_PLUGIN = libgnunet_plugin_psycstore_sqlite.la
  29. if HAVE_TESTING
  30. SQLITE_TESTS = test_plugin_psycstore_sqlite
  31. endif
  32. endif
  33. lib_LTLIBRARIES = libgnunetpsycstore.la
  34. libgnunetpsycstore_la_SOURCES = \
  35. psycstore_api.c \
  36. psycstore.h
  37. libgnunetpsycstore_la_LIBADD = \
  38. $(top_builddir)/src/util/libgnunetutil.la \
  39. $(GN_LIBINTL) $(XLIB)
  40. libgnunetpsycstore_la_LDFLAGS = \
  41. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  42. -version-info 0:0:0
  43. bin_PROGRAMS =
  44. libexec_PROGRAMS = \
  45. gnunet-service-psycstore
  46. gnunet_service_psycstore_SOURCES = \
  47. gnunet-service-psycstore.c
  48. gnunet_service_psycstore_LDADD = \
  49. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  50. $(top_builddir)/src/util/libgnunetutil.la \
  51. $(top_builddir)/src/psycutil/libgnunetpsycutil.la \
  52. $(GN_LIBINTL)
  53. plugin_LTLIBRARIES = \
  54. $(SQLITE_PLUGIN) \
  55. $(MYSQL_PLUGIN) \
  56. $(POSTGRES_PLUGIN)
  57. libgnunet_plugin_psycstore_mysql_la_SOURCES = \
  58. plugin_psycstore_mysql.c
  59. libgnunet_plugin_psycstore_mysql_la_LIBADD = \
  60. libgnunetpsycstore.la \
  61. $(top_builddir)/src/my/libgnunetmy.la \
  62. $(top_builddir)/src/mysql/libgnunetmysql.la \
  63. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  64. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
  65. $(LTLIBINTL)
  66. libgnunet_plugin_psycstore_mysql_la_LDFLAGS = \
  67. $(GN_PLUGIN_LDFLAGS)
  68. libgnunet_plugin_psycstore_postgres_la_SOURCES = \
  69. plugin_psycstore_postgres.c
  70. libgnunet_plugin_psycstore_postgres_la_LIBADD = \
  71. libgnunetpsycstore.la \
  72. $(top_builddir)/src/pq/libgnunetpq.la \
  73. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  74. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
  75. $(LTLIBINTL)
  76. libgnunet_plugin_psycstore_postgres_la_LDFLAGS = \
  77. $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
  78. libgnunet_plugin_psycstore_postgres_la_CPPFLAGS = \
  79. $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
  80. libgnunet_plugin_psycstore_sqlite_la_SOURCES = \
  81. plugin_psycstore_sqlite.c
  82. libgnunet_plugin_psycstore_sqlite_la_LIBADD = \
  83. libgnunetpsycstore.la \
  84. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  85. $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
  86. $(LTLIBINTL)
  87. libgnunet_plugin_psycstore_sqlite_la_LDFLAGS = \
  88. $(GN_PLUGIN_LDFLAGS)
  89. if HAVE_SQLITE
  90. if HAVE_TESTING
  91. check_PROGRAMS = \
  92. $(SQLITE_TESTS) \
  93. $(MYSQL_TESTS) \
  94. $(POSTGRES_TESTS) \
  95. test_psycstore
  96. endif
  97. endif
  98. if ENABLE_TEST_RUN
  99. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  100. TESTS = $(check_PROGRAMS)
  101. endif
  102. test_psycstore_SOURCES = \
  103. test_psycstore.c
  104. test_psycstore_LDADD = \
  105. libgnunetpsycstore.la \
  106. $(top_builddir)/src/testing/libgnunettesting.la \
  107. $(top_builddir)/src/util/libgnunetutil.la
  108. EXTRA_DIST = \
  109. test_psycstore.conf
  110. test_plugin_psycstore_sqlite_SOURCES = \
  111. test_plugin_psycstore.c
  112. test_plugin_psycstore_sqlite_LDADD = \
  113. $(top_builddir)/src/testing/libgnunettesting.la \
  114. $(top_builddir)/src/util/libgnunetutil.la
  115. test_plugin_psycstore_mysql_SOURCES = \
  116. test_plugin_psycstore.c
  117. test_plugin_psycstore_mysql_LDADD = \
  118. $(top_builddir)/src/testing/libgnunettesting.la \
  119. $(top_builddir)/src/util/libgnunetutil.la
  120. test_plugin_psycstore_postgres_SOURCES = \
  121. test_plugin_psycstore.c
  122. test_plugin_psycstore_postgres_LDADD = \
  123. $(top_builddir)/src/testing/libgnunettesting.la \
  124. $(top_builddir)/src/util/libgnunetutil.la