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.
 
 
 
 

159 lines
3.4 KiB

  1. # This Makefile.am is in the public domain
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/include \
  3. $(GNUNET_CPPFLAGS)
  4. plugindir = $(libdir)/gnunet
  5. pkgcfgdir= $(pkgdatadir)/config.d/
  6. libexecdir= $(pkglibdir)/libexec/
  7. pkgcfg_DATA = \
  8. psycstore.conf
  9. if MINGW
  10. WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
  11. endif
  12. if USE_COVERAGE
  13. AM_CFLAGS = --coverage -O0
  14. XLIB = -lgcov
  15. endif
  16. if HAVE_MYSQL
  17. MYSQL_PLUGIN = libgnunet_plugin_psycstore_mysql.la
  18. if HAVE_TESTING
  19. MYSQL_TESTS = test_plugin_psycstore_mysql
  20. endif
  21. endif
  22. if HAVE_POSTGRESQL
  23. POSTGRES_PLUGIN = libgnunet_plugin_psycstore_postgres.la
  24. if HAVE_TESTING
  25. POSTGRES_TESTS = test_plugin_psycstore_postgres
  26. endif
  27. endif
  28. if HAVE_SQLITE
  29. SQLITE_PLUGIN = libgnunet_plugin_psycstore_sqlite.la
  30. if HAVE_TESTING
  31. SQLITE_TESTS = test_plugin_psycstore_sqlite
  32. endif
  33. endif
  34. lib_LTLIBRARIES = libgnunetpsycstore.la
  35. libgnunetpsycstore_la_SOURCES = \
  36. psycstore_api.c \
  37. psycstore.h
  38. libgnunetpsycstore_la_LIBADD = \
  39. -lgnunetutil \
  40. $(GN_LIBINTL) $(XLIB)
  41. libgnunetpsycstore_la_LDFLAGS = \
  42. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  43. -version-info 0:0:0
  44. bin_PROGRAMS =
  45. libexec_PROGRAMS = \
  46. gnunet-service-psycstore
  47. gnunet_service_psycstore_SOURCES = \
  48. gnunet-service-psycstore.c
  49. gnunet_service_psycstore_LDADD = \
  50. $(top_builddir)/src/psycutil/libgnunetpsycutil.la \
  51. -lgnunetstatistics \
  52. -lgnunetutil \
  53. $(GN_LIBINTL)
  54. plugin_LTLIBRARIES = \
  55. $(SQLITE_PLUGIN) \
  56. $(MYSQL_PLUGIN) \
  57. $(POSTGRES_PLUGIN)
  58. libgnunet_plugin_psycstore_mysql_la_SOURCES = \
  59. plugin_psycstore_mysql.c
  60. libgnunet_plugin_psycstore_mysql_la_LIBADD = \
  61. libgnunetpsycstore.la \
  62. -lgnunetmy \
  63. -lgnunetmysql \
  64. -lgnunetstatistics \
  65. -lgnunetutil \
  66. $(XLIBS) \
  67. $(LTLIBINTL)
  68. libgnunet_plugin_psycstore_mysql_la_LDFLAGS = \
  69. $(GN_PLUGIN_LDFLAGS)
  70. libgnunet_plugin_psycstore_postgres_la_SOURCES = \
  71. plugin_psycstore_postgres.c
  72. libgnunet_plugin_psycstore_postgres_la_LIBADD = \
  73. libgnunetpsycstore.la \
  74. -lgnunetpq \
  75. -lgnunetstatistics \
  76. -lgnunetutil \
  77. $(XLIBS) -lpq \
  78. $(LTLIBINTL)
  79. libgnunet_plugin_psycstore_postgres_la_LDFLAGS = \
  80. $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
  81. libgnunet_plugin_psycstore_postgres_la_CPPFLAGS = \
  82. $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
  83. libgnunet_plugin_psycstore_sqlite_la_SOURCES = \
  84. plugin_psycstore_sqlite.c
  85. libgnunet_plugin_psycstore_sqlite_la_LIBADD = \
  86. libgnunetpsycstore.la \
  87. -lgnunetstatistics \
  88. -lgnunetutil \
  89. $(XLIBS) -lsqlite3 \
  90. $(LTLIBINTL)
  91. libgnunet_plugin_psycstore_sqlite_la_LDFLAGS = \
  92. $(GN_PLUGIN_LDFLAGS)
  93. if HAVE_SQLITE
  94. if HAVE_TESTING
  95. check_PROGRAMS = \
  96. $(SQLITE_TESTS) \
  97. $(MYSQL_TESTS) \
  98. $(POSTGRES_TESTS) \
  99. test_psycstore
  100. endif
  101. endif
  102. if ENABLE_TEST_RUN
  103. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  104. TESTS = $(check_PROGRAMS)
  105. endif
  106. test_psycstore_SOURCES = \
  107. test_psycstore.c
  108. test_psycstore_LDADD = \
  109. libgnunetpsycstore.la \
  110. -lgnunettesting \
  111. -lgnunetutil
  112. EXTRA_DIST = \
  113. test_psycstore.conf
  114. test_plugin_psycstore_sqlite_SOURCES = \
  115. test_plugin_psycstore.c
  116. test_plugin_psycstore_sqlite_LDADD = \
  117. -lgnunettesting \
  118. -lgnunetutil
  119. test_plugin_psycstore_mysql_SOURCES = \
  120. test_plugin_psycstore.c
  121. test_plugin_psycstore_mysql_LDADD = \
  122. -lgnunettesting \
  123. -lgnunetutil
  124. test_plugin_psycstore_postgres_SOURCES = \
  125. test_plugin_psycstore.c
  126. test_plugin_psycstore_postgres_LDADD = \
  127. -lgnunettesting \
  128. -lgnunetutil