making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even...
[oweals/gnunet.git] / src / psycstore / Makefile.am
index 461ec6c4e4c0e1971f431ac3e2cbc998afe92325..8dbd5f053edd11a6ec8b6ff8089c2e80331d8443 100644 (file)
@@ -1,13 +1,6 @@
-INCLUDES = -I$(top_srcdir)/src/include
+AM_CPPFLAGS = -I$(top_srcdir)/src/include
 
-if MINGW
- WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols 
-endif
-
-if USE_COVERAGE
-  AM_CFLAGS = --coverage -O0
-  XLIB = -lgcov
-endif
+plugindir = $(libdir)/gnunet
 
 pkgcfgdir= $(pkgdatadir)/config.d/
 
@@ -17,6 +10,22 @@ pkgcfg_DATA = \
   psycstore.conf
 
 
+if MINGW
+ WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
+endif
+
+if USE_COVERAGE
+  AM_CFLAGS = --coverage -O0
+  XLIB = -lgcov
+endif
+
+if HAVE_SQLITE
+SQLITE_PLUGIN = libgnunet_plugin_psycstore_sqlite.la
+if HAVE_TESTING
+SQLITE_TESTS = test_plugin_psycstore_sqlite
+endif
+endif
+
 lib_LTLIBRARIES = libgnunetpsycstore.la
 
 libgnunetpsycstore_la_SOURCES = \
@@ -28,31 +37,42 @@ libgnunetpsycstore_la_LIBADD = \
 libgnunetpsycstore_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
   -version-info 0:0:0
-libgnunetpsycstore_la_DEPENDENCIES = \
-  $(top_builddir)/src/util/libgnunetutil.la 
 
 bin_PROGRAMS =
 
 libexec_PROGRAMS = \
- gnunet-service-psycstore 
+ gnunet-service-psycstore
 
 gnunet_service_psycstore_SOURCES = \
- gnunet-service-psycstore.c         
+ gnunet-service-psycstore.c
 gnunet_service_psycstore_LDADD = \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(GN_LIBINTL)
-gnunet_service_psycstore_DEPENDENCIES = \
+
+plugin_LTLIBRARIES = \
+  $(SQLITE_PLUGIN)
+
+libgnunet_plugin_psycstore_sqlite_la_SOURCES = \
+  plugin_psycstore_sqlite.c
+libgnunet_plugin_psycstore_sqlite_la_LIBADD = \
+  libgnunetpsycstore.la  \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
-  $(top_builddir)/src/util/libgnunetutil.la 
+  $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
+  $(LTLIBINTL)
+libgnunet_plugin_psycstore_sqlite_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
 
 if HAVE_TESTING
 check_PROGRAMS = \
+ $(SQLITE_TESTS) \
  test_psycstore
 endif
 
 if ENABLE_TEST_RUN
-TESTS = $(check_PROGRAMS) 
+AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
+TESTS = $(check_PROGRAMS)
 endif
 
 test_psycstore_SOURCES = \
@@ -60,13 +80,14 @@ test_psycstore_SOURCES = \
 test_psycstore_LDADD = \
   libgnunetpsycstore.la \
   $(top_builddir)/src/testing/libgnunettesting.la \
-  $(top_builddir)/src/util/libgnunetutil.la 
-test_psycstore_DEPENDENCIES = \
-  libgnunetpsycstore.la \
-  $(top_builddir)/src/testing/libgnunettesting.la \
-  $(top_builddir)/src/util/libgnunetutil.la 
+  $(top_builddir)/src/util/libgnunetutil.la
 
 EXTRA_DIST = \
-  test_psycstore.conf 
+  test_psycstore.conf
 
 
+test_plugin_psycstore_sqlite_SOURCES = \
+ test_plugin_psycstore.c
+test_plugin_psycstore_sqlite_LDADD = \
+  $(top_builddir)/src/testing/libgnunettesting.la \
+  $(top_builddir)/src/util/libgnunetutil.la