de-experimentalizing
[oweals/gnunet.git] / src / datastore / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 if MINGW
6   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
7 endif
8
9 if USE_COVERAGE
10   AM_CFLAGS = --coverage -O0
11   XLIBS = -lgcov
12 endif
13
14
15 lib_LTLIBRARIES = \
16   libgnunetdatastore.la
17
18 libgnunetdatastore_la_SOURCES = \
19   datastore_api.c datastore.h 
20 libgnunetdatastore_la_LIBADD = \
21   $(top_builddir)/src/statistics/libgnunetstatistics.la \
22   $(top_builddir)/src/util/libgnunetutil.la \
23   $(GN_LIBINTL) 
24 libgnunetdatastore_la_LDFLAGS = \
25   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
26   -version-info 0:0:0
27
28
29 bin_PROGRAMS = \
30  gnunet-service-datastore
31
32 gnunet_service_datastore_SOURCES = \
33  gnunet-service-datastore.c 
34 gnunet_service_datastore_LDADD = \
35   $(top_builddir)/src/statistics/libgnunetstatistics.la \
36   $(top_builddir)/src/util/libgnunetutil.la \
37   $(GN_LIBINTL)
38
39 if HAVE_MYSQL
40  MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la
41  MYSQL_TESTS = \
42   test_datastore_api_mysql \
43   test_datastore_api_management_mysql \
44   test_plugin_datastore_mysql \
45   perf_datastore_api_mysql \
46   perf_plugin_datastore_mysql
47 endif
48 if HAVE_SQLITE
49  SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
50  SQLITE_TESTS = \
51   test_datastore_api_sqlite \
52   test_datastore_api_management_sqlite \
53   test_plugin_datastore_sqlite \
54   perf_datastore_api_sqlite \
55   perf_plugin_datastore_sqlite
56 endif
57 if HAVE_POSTGRES
58 if HAVE_EXPERIMENTAL
59  POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
60  POSTGRES_TESTS = \
61   test_datastore_api_postgres \
62   test_datastore_api_management_postgres \
63   test_plugin_datastore_postgres \
64   perf_datastore_api_postgres \
65   perf_plugin_datastore_postgres
66 endif
67 endif
68
69 plugin_LTLIBRARIES = \
70   $(SQLITE_PLUGIN) \
71   $(MYSQL_PLUGIN) \
72   $(POSTGRES_PLUGIN) \
73   libgnunet_plugin_datastore_template.la 
74
75
76 libgnunet_plugin_datastore_sqlite_la_SOURCES = \
77   plugin_datastore_sqlite.c
78 libgnunet_plugin_datastore_sqlite_la_LIBADD = \
79   $(top_builddir)/src/statistics/libgnunetstatistics.la \
80   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
81 libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
82  $(GN_PLUGIN_LDFLAGS)
83
84
85 libgnunet_plugin_datastore_mysql_la_SOURCES = \
86   plugin_datastore_mysql.c
87 libgnunet_plugin_datastore_mysql_la_LIBADD = \
88   $(top_builddir)/src/statistics/libgnunetstatistics.la \
89   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lmysqlclient
90 libgnunet_plugin_datastore_mysql_la_LDFLAGS = \
91  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
92 libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \
93  $(MYSQL_CPPFLAGS)
94
95 libgnunet_plugin_datastore_postgres_la_SOURCES = \
96   plugin_datastore_postgres.c
97 libgnunet_plugin_datastore_postgres_la_LIBADD = \
98   $(top_builddir)/src/statistics/libgnunetstatistics.la \
99   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq
100 libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
101  $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
102 libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
103  $(POSTGRES_CPPFLAGS)
104
105
106 libgnunet_plugin_datastore_template_la_SOURCES = \
107   plugin_datastore_template.c
108 libgnunet_plugin_datastore_template_la_LIBADD = \
109   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS)
110 libgnunet_plugin_datastore_template_la_LDFLAGS = \
111  $(GN_PLUGIN_LDFLAGS)
112
113 check_PROGRAMS = \
114   $(SQLITE_TESTS) \
115   $(MYSQL_TESTS) \
116   $(POSTGRES_TESTS)
117
118 if !DISABLE_TEST_RUN
119 TESTS = $(check_PROGRAMS)
120 endif
121
122 test_datastore_api_sqlite_SOURCES = \
123  test_datastore_api.c
124 test_datastore_api_sqlite_LDADD = \
125  $(top_builddir)/src/datastore/libgnunetdatastore.la \
126  $(top_builddir)/src/util/libgnunetutil.la  
127
128 test_datastore_api_management_sqlite_SOURCES = \
129  test_datastore_api_management.c
130 test_datastore_api_management_sqlite_LDADD = \
131  $(top_builddir)/src/datastore/libgnunetdatastore.la \
132  $(top_builddir)/src/util/libgnunetutil.la  
133
134 perf_datastore_api_sqlite_SOURCES = \
135  perf_datastore_api.c
136 perf_datastore_api_sqlite_LDADD = \
137  $(top_builddir)/src/datastore/libgnunetdatastore.la \
138  $(top_builddir)/src/util/libgnunetutil.la  
139
140 perf_plugin_datastore_sqlite_SOURCES = \
141  perf_plugin_datastore.c
142 perf_plugin_datastore_sqlite_LDADD = \
143  $(top_builddir)/src/util/libgnunetutil.la  
144
145 test_plugin_datastore_sqlite_SOURCES = \
146  test_plugin_datastore.c
147 test_plugin_datastore_sqlite_LDADD = \
148  $(top_builddir)/src/util/libgnunetutil.la  
149
150
151 test_datastore_api_mysql_SOURCES = \
152  test_datastore_api.c
153 test_datastore_api_mysql_LDADD = \
154  $(top_builddir)/src/datastore/libgnunetdatastore.la \
155  $(top_builddir)/src/util/libgnunetutil.la  
156
157 test_datastore_api_management_mysql_SOURCES = \
158  test_datastore_api_management.c
159 test_datastore_api_management_mysql_LDADD = \
160  $(top_builddir)/src/datastore/libgnunetdatastore.la \
161  $(top_builddir)/src/util/libgnunetutil.la  
162
163 perf_datastore_api_mysql_SOURCES = \
164  perf_datastore_api.c
165 perf_datastore_api_mysql_LDADD = \
166  $(top_builddir)/src/datastore/libgnunetdatastore.la \
167  $(top_builddir)/src/util/libgnunetutil.la  
168
169 test_plugin_datastore_mysql_SOURCES = \
170  test_plugin_datastore.c
171 test_plugin_datastore_mysql_LDADD = \
172  $(top_builddir)/src/util/libgnunetutil.la  
173
174 perf_plugin_datastore_mysql_SOURCES = \
175  perf_plugin_datastore.c
176 perf_plugin_datastore_mysql_LDADD = \
177  $(top_builddir)/src/util/libgnunetutil.la  
178
179
180 test_datastore_api_postgres_SOURCES = \
181  test_datastore_api.c
182 test_datastore_api_postgres_LDADD = \
183  $(top_builddir)/src/datastore/libgnunetdatastore.la \
184  $(top_builddir)/src/util/libgnunetutil.la  
185
186 test_datastore_api_management_postgres_SOURCES = \
187  test_datastore_api_management.c
188 test_datastore_api_management_postgres_LDADD = \
189  $(top_builddir)/src/datastore/libgnunetdatastore.la \
190  $(top_builddir)/src/util/libgnunetutil.la  
191
192 perf_datastore_api_postgres_SOURCES = \
193  perf_datastore_api.c
194 perf_datastore_api_postgres_LDADD = \
195  $(top_builddir)/src/datastore/libgnunetdatastore.la \
196  $(top_builddir)/src/util/libgnunetutil.la  
197
198 test_plugin_datastore_postgres_SOURCES = \
199  test_plugin_datastore.c
200 test_plugin_datastore_postgres_LDADD = \
201  $(top_builddir)/src/util/libgnunetutil.la  
202
203 perf_plugin_datastore_postgres_SOURCES = \
204  perf_plugin_datastore.c
205 perf_plugin_datastore_postgres_LDADD = \
206  $(top_builddir)/src/util/libgnunetutil.la  
207
208
209 EXTRA_DIST = \
210  test_datastore_api_data_sqlite.conf \
211  perf_plugin_datastore_data_sqlite.conf \
212  test_datastore_api_data_mysql.conf \
213  perf_plugin_datastore_data_mysql.conf \
214  test_datastore_api_data_postgres.conf \
215  perf_plugin_datastore_data_postgres.conf