-rps doxygen
[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_MYSQL
24 MYSQL_PLUGIN = libgnunet_plugin_psycstore_mysql.la
25 if HAVE_TESTING
26 MYSQL_TESTS = test_plugin_psycstore_mysql
27 endif
28 endif
29
30 if HAVE_SQLITE
31 SQLITE_PLUGIN = libgnunet_plugin_psycstore_sqlite.la
32 if HAVE_TESTING
33 SQLITE_TESTS = test_plugin_psycstore_sqlite
34 endif
35 endif
36
37 lib_LTLIBRARIES = libgnunetpsycstore.la
38
39 libgnunetpsycstore_la_SOURCES = \
40   psycstore_api.c \
41   psycstore.h
42 libgnunetpsycstore_la_LIBADD = \
43   $(top_builddir)/src/util/libgnunetutil.la \
44   $(GN_LIBINTL) $(XLIB)
45 libgnunetpsycstore_la_LDFLAGS = \
46   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
47   -version-info 0:0:0
48
49 bin_PROGRAMS =
50
51 libexec_PROGRAMS = \
52  gnunet-service-psycstore
53
54 gnunet_service_psycstore_SOURCES = \
55  gnunet-service-psycstore.c
56 gnunet_service_psycstore_LDADD = \
57   $(top_builddir)/src/statistics/libgnunetstatistics.la \
58   $(top_builddir)/src/util/libgnunetutil.la \
59   $(top_builddir)/src/psycutil/libgnunetpsycutil.la \
60   $(GN_LIBINTL)
61
62 plugin_LTLIBRARIES = \
63   $(SQLITE_PLUGIN) \
64   $(MYSQL_PLUGIN)
65
66 libgnunet_plugin_psycstore_mysql_la_SOURCES = \
67   plugin_psycstore_mysql.c
68 libgnunet_plugin_psycstore_mysql_la_LIBADD = \
69   libgnunetpsycstore.la  \
70   $(top_builddir)/src/my/libgnunetmy.la \
71   $(top_builddir)/src/mysql/libgnunetmysql.la \
72   $(top_builddir)/src/statistics/libgnunetstatistics.la \
73   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
74   $(LTLIBINTL)
75 libgnunet_plugin_psycstore_mysql_la_LDFLAGS = \
76  $(GN_PLUGIN_LDFLAGS)
77
78
79 libgnunet_plugin_psycstore_sqlite_la_SOURCES = \
80   plugin_psycstore_sqlite.c
81 libgnunet_plugin_psycstore_sqlite_la_LIBADD = \
82   libgnunetpsycstore.la  \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
85   $(LTLIBINTL)
86 libgnunet_plugin_psycstore_sqlite_la_LDFLAGS = \
87  $(GN_PLUGIN_LDFLAGS)
88
89
90 if HAVE_SQLITE
91 if HAVE_TESTING
92 check_PROGRAMS = \
93  $(SQLITE_TESTS) \
94  $(MYSQL_TESTS) \
95  test_psycstore
96 endif
97 endif
98
99 if ENABLE_TEST_RUN
100 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
101 TESTS = $(check_PROGRAMS)
102 endif
103
104 test_psycstore_SOURCES = \
105  test_psycstore.c
106 test_psycstore_LDADD = \
107   libgnunetpsycstore.la \
108   $(top_builddir)/src/testing/libgnunettesting.la \
109   $(top_builddir)/src/util/libgnunetutil.la
110
111 EXTRA_DIST = \
112   test_psycstore.conf
113
114
115 test_plugin_psycstore_sqlite_SOURCES = \
116  test_plugin_psycstore.c
117 test_plugin_psycstore_sqlite_LDADD = \
118   $(top_builddir)/src/testing/libgnunettesting.la \
119   $(top_builddir)/src/util/libgnunetutil.la
120
121 test_plugin_psycstore_mysql_SOURCES = \
122  test_plugin_psycstore.c
123 test_plugin_psycstore_mysql_LDADD = \
124   $(top_builddir)/src/testing/libgnunettesting.la \
125   $(top_builddir)/src/util/libgnunetutil.la
126