last XDG change: use GNUNET_RUNTIME_DIR instead of /tmp for UNIXPATHs by default
[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 libgnunetpsycstore_la_DEPENDENCIES = \
41   $(top_builddir)/src/util/libgnunetutil.la
42
43 bin_PROGRAMS =
44
45 libexec_PROGRAMS = \
46  gnunet-service-psycstore
47
48 gnunet_service_psycstore_SOURCES = \
49  gnunet-service-psycstore.c
50 gnunet_service_psycstore_LDADD = \
51   $(top_builddir)/src/statistics/libgnunetstatistics.la \
52   $(top_builddir)/src/util/libgnunetutil.la \
53   $(GN_LIBINTL)
54 gnunet_service_psycstore_DEPENDENCIES = \
55   $(top_builddir)/src/statistics/libgnunetstatistics.la \
56   $(top_builddir)/src/util/libgnunetutil.la
57
58
59 plugin_LTLIBRARIES = \
60   $(SQLITE_PLUGIN)
61
62 libgnunet_plugin_psycstore_sqlite_la_SOURCES = \
63   plugin_psycstore_sqlite.c
64 libgnunet_plugin_psycstore_sqlite_la_LIBADD = \
65   $(top_builddir)/src/psycstore/libgnunetpsycstore.la  \
66   $(top_builddir)/src/statistics/libgnunetstatistics.la \
67   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
68   $(LTLIBINTL)
69 libgnunet_plugin_psycstore_sqlite_la_LDFLAGS = \
70  $(GN_PLUGIN_LDFLAGS)
71 libgnunet_plugin_psycstore_sqlite_la_DEPENDENCIES = \
72   $(top_builddir)/src/statistics/libgnunetstatistics.la \
73   $(top_builddir)/src/util/libgnunetutil.la \
74   libgnunetpsycstore.la
75
76
77 if HAVE_TESTING
78 check_PROGRAMS = \
79  $(SQLITE_TESTS) \
80  test_psycstore
81 endif
82
83 if ENABLE_TEST_RUN
84 TESTS = $(check_PROGRAMS)
85 endif
86
87 test_psycstore_SOURCES = \
88  test_psycstore.c
89 test_psycstore_LDADD = \
90   libgnunetpsycstore.la \
91   $(top_builddir)/src/testing/libgnunettesting.la \
92   $(top_builddir)/src/util/libgnunetutil.la
93 test_psycstore_DEPENDENCIES = \
94   libgnunetpsycstore.la \
95   $(top_builddir)/src/testing/libgnunettesting.la \
96   $(top_builddir)/src/util/libgnunetutil.la
97
98 EXTRA_DIST = \
99   test_psycstore.conf
100
101
102 test_plugin_psycstore_sqlite_SOURCES = \
103  test_plugin_psycstore.c
104 test_plugin_psycstore_sqlite_LDADD = \
105  $(top_builddir)/src/testing/libgnunettesting.la \
106  $(top_builddir)/src/util/libgnunetutil.la