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