plugin datastore mysql
[oweals/gnunet.git] / src / psycstore / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 plugindir = $(libdir)/gnunet
5
6 pkgcfgdir= $(pkgdatadir)/config.d/
7
8 libexecdir= $(pkglibdir)/libexec/
9
10 pkgcfg_DATA = \
11   psycstore.conf
12
13
14 if MINGW
15  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
16 endif
17
18 if USE_COVERAGE
19   AM_CFLAGS = --coverage -O0
20   XLIB = -lgcov
21 endif
22
23 if HAVE_SQLITE
24 SQLITE_PLUGIN = libgnunet_plugin_psycstore_sqlite.la
25 if HAVE_TESTING
26 SQLITE_TESTS = test_plugin_psycstore_sqlite
27 endif
28 endif
29
30 lib_LTLIBRARIES = libgnunetpsycstore.la
31
32 libgnunetpsycstore_la_SOURCES = \
33   psycstore_api.c \
34   psycstore.h
35 libgnunetpsycstore_la_LIBADD = \
36   $(top_builddir)/src/util/libgnunetutil.la \
37   $(GN_LIBINTL) $(XLIB)
38 libgnunetpsycstore_la_LDFLAGS = \
39   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
40   -version-info 0:0:0
41
42 bin_PROGRAMS =
43
44 libexec_PROGRAMS = \
45  gnunet-service-psycstore
46
47 gnunet_service_psycstore_SOURCES = \
48  gnunet-service-psycstore.c
49 gnunet_service_psycstore_LDADD = \
50   $(top_builddir)/src/statistics/libgnunetstatistics.la \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(top_builddir)/src/psycutil/libgnunetpsycutil.la \
53   $(GN_LIBINTL)
54
55 plugin_LTLIBRARIES = \
56   $(SQLITE_PLUGIN)
57
58 libgnunet_plugin_psycstore_sqlite_la_SOURCES = \
59   plugin_psycstore_sqlite.c
60 libgnunet_plugin_psycstore_sqlite_la_LIBADD = \
61   libgnunetpsycstore.la  \
62   $(top_builddir)/src/statistics/libgnunetstatistics.la \
63   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
64   $(LTLIBINTL)
65 libgnunet_plugin_psycstore_sqlite_la_LDFLAGS = \
66  $(GN_PLUGIN_LDFLAGS)
67
68
69 if HAVE_SQLITE
70 if HAVE_TESTING
71 check_PROGRAMS = \
72  $(SQLITE_TESTS) \
73  test_psycstore
74 endif
75 endif
76
77 if ENABLE_TEST_RUN
78 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
79 TESTS = $(check_PROGRAMS)
80 endif
81
82 test_psycstore_SOURCES = \
83  test_psycstore.c
84 test_psycstore_LDADD = \
85   libgnunetpsycstore.la \
86   $(top_builddir)/src/testing/libgnunettesting.la \
87   $(top_builddir)/src/util/libgnunetutil.la
88
89 EXTRA_DIST = \
90   test_psycstore.conf
91
92
93 test_plugin_psycstore_sqlite_SOURCES = \
94  test_plugin_psycstore.c
95 test_plugin_psycstore_sqlite_LDADD = \
96   $(top_builddir)/src/testing/libgnunettesting.la \
97   $(top_builddir)/src/util/libgnunetutil.la