-moving code to new libgnunetgnsrecord in preparation for addressing #3052
[oweals/gnunet.git] / src / namestore / 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    namestore.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   XLIBS = -lgcov
20 endif
21
22 if HAVE_SQLITE
23 SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
24 if HAVE_TESTING
25 SQLITE_TESTS = test_plugin_namestore_sqlite
26 endif
27 endif
28
29 if HAVE_POSTGRES
30 # postgres doesn't even build yet; thus: experimental!
31 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
32 if HAVE_TESTING
33 POSTGRES_TESTS = test_plugin_namestore_postgres
34 endif
35 endif
36
37 # testcases do not even build yet; thus: experimental!
38 if HAVE_TESTING
39 TESTING_TESTS = \
40  test_namestore_api_store \
41  test_namestore_api_store_update \
42  test_namestore_api_cache_block \
43  test_namestore_api_lookup_public \
44  test_namestore_api_remove \
45  test_namestore_api_remove_not_existing_record \
46  test_namestore_api_zone_iteration \
47  test_namestore_api_zone_iteration_specific_zone \
48  test_namestore_api_zone_iteration_stop \
49  test_namestore_api_monitoring \
50  test_namestore_api_monitoring_existing
51 #test_namestore_api_zone_to_name
52 endif
53
54 if HAVE_SQLITE
55 check_PROGRAMS = \
56  test_namestore_record_serialization \
57  test_namestore_api_blocks \
58  $(SQLITE_TESTS) \
59  $(POSTGRES_TESTS) \
60  $(TESTING_TESTS)
61 endif
62
63 if ENABLE_TEST_RUN
64 TESTS = \
65   $(check_PROGRAMS) \
66   $(check_SCRIPTS)
67 endif
68
69 lib_LTLIBRARIES = \
70   libgnunetnamestore.la
71
72 libgnunetnamestore_la_SOURCES = \
73   namestore_api.c \
74   namestore_api_monitor.c \
75   namestore_api_common.c \
76   namestore.h
77 libgnunetnamestore_la_LIBADD = \
78   $(top_builddir)/src/statistics/libgnunetstatistics.la \
79   $(top_builddir)/src/dns/libgnunetdnsparser.la \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(GN_LIBINTL)
82 libgnunetnamestore_la_LDFLAGS = \
83   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
84   -version-info 0:1:0
85
86 libexec_PROGRAMS = \
87  gnunet-service-namestore
88
89 bin_PROGRAMS = \
90  gnunet-namestore
91
92 if HAVE_MHD
93 libexec_PROGRAMS += \
94  gnunet-namestore-fcfsd
95 endif
96
97 gnunet_namestore_SOURCES = \
98  gnunet-namestore.c
99 gnunet_namestore_LDADD = \
100   $(top_builddir)/src/identity/libgnunetidentity.la \
101   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
102   $(top_builddir)/src/util/libgnunetutil.la \
103   libgnunetnamestore.la \
104   $(GN_LIBINTL)
105 gnunet_namestore_DEPENDENCIES = \
106   $(top_builddir)/src/identity/libgnunetidentity.la \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   libgnunetnamestore.la
109
110
111 gnunet_namestore_fcfsd_SOURCES = \
112  gnunet-namestore-fcfsd.c
113 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
114   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
115   $(top_builddir)/src/identity/libgnunetidentity.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la \
117   $(top_builddir)/src/util/libgnunetutil.la \
118   $(GN_LIBINTL)
119 gnunet_namestore_fcfsd_DEPENDENCIES = \
120   $(top_builddir)/src/util/libgnunetutil.la \
121   libgnunetnamestore.la
122
123
124
125 gnunet_service_namestore_SOURCES = \
126  gnunet-service-namestore.c
127
128 gnunet_service_namestore_LDADD = \
129   $(top_builddir)/src/statistics/libgnunetstatistics.la \
130   $(top_builddir)/src/util/libgnunetutil.la \
131   libgnunetnamestore.la \
132   $(GN_LIBINTL)
133 gnunet_service_namestore_DEPENDENCIES = \
134   $(top_builddir)/src/statistics/libgnunetstatistics.la \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   libgnunetnamestore.la
137
138
139 plugin_LTLIBRARIES = \
140   $(SQLITE_PLUGIN) \
141   $(POSTGRES_PLUGIN)
142
143 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
144   plugin_namestore_sqlite.c
145 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
146   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
147   $(top_builddir)/src/statistics/libgnunetstatistics.la \
148   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
149   $(LTLIBINTL)
150 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
151  $(GN_PLUGIN_LDFLAGS)
152 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
153   $(top_builddir)/src/statistics/libgnunetstatistics.la \
154   $(top_builddir)/src/util/libgnunetutil.la \
155   libgnunetnamestore.la
156
157
158 libgnunet_plugin_namestore_postgres_la_SOURCES = \
159   plugin_namestore_postgres.c
160 libgnunet_plugin_namestore_postgres_la_LIBADD = \
161   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
162   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
163   $(top_builddir)/src/statistics/libgnunetstatistics.la \
164   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
165   $(LTLIBINTL)
166 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
167  $(GN_PLUGIN_LDFLAGS)
168 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
169   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
170   $(top_builddir)/src/statistics/libgnunetstatistics.la \
171   $(top_builddir)/src/util/libgnunetutil.la \
172   libgnunetnamestore.la
173
174 test_namestore_api_blocks_SOURCES = \
175  test_namestore_api_blocks.c
176 test_namestore_api_blocks_LDADD = \
177   $(top_builddir)/src/util/libgnunetutil.la \
178   $(top_builddir)/src/testing/libgnunettesting.la \
179   $(top_builddir)/src/namestore/libgnunetnamestore.la
180
181 test_namestore_api_store_SOURCES = \
182  test_namestore_api_store.c
183 test_namestore_api_store_LDADD = \
184   $(top_builddir)/src/testing/libgnunettesting.la \
185   $(top_builddir)/src/util/libgnunetutil.la \
186   $(top_builddir)/src/namestore/libgnunetnamestore.la
187
188 test_namestore_api_store_update_SOURCES = \
189  test_namestore_api_store_update.c
190 test_namestore_api_store_update_LDADD = \
191   $(top_builddir)/src/testing/libgnunettesting.la \
192   $(top_builddir)/src/util/libgnunetutil.la \
193   $(top_builddir)/src/namestore/libgnunetnamestore.la
194
195 test_namestore_api_cache_block_SOURCES = \
196  test_namestore_api_cache_block.c
197 test_namestore_api_cache_block_LDADD = \
198   $(top_builddir)/src/testing/libgnunettesting.la \
199   $(top_builddir)/src/util/libgnunetutil.la \
200   $(top_builddir)/src/namestore/libgnunetnamestore.la
201
202 test_namestore_api_lookup_public_SOURCES = \
203  test_namestore_api_lookup_public.c
204 test_namestore_api_lookup_public_LDADD = \
205   $(top_builddir)/src/testing/libgnunettesting.la \
206   $(top_builddir)/src/util/libgnunetutil.la \
207   $(top_builddir)/src/namestore/libgnunetnamestore.la
208
209 test_namestore_api_put_SOURCES = \
210  test_namestore_api_put.c
211 test_namestore_api_put_LDADD = \
212   $(top_builddir)/src/testing/libgnunettesting.la \
213   $(top_builddir)/src/util/libgnunetutil.la \
214   $(top_builddir)/src/namestore/libgnunetnamestore.la
215
216 test_namestore_api_remove_SOURCES = \
217  test_namestore_api_remove.c
218 test_namestore_api_remove_LDADD = \
219   $(top_builddir)/src/testing/libgnunettesting.la \
220   $(top_builddir)/src/util/libgnunetutil.la \
221   $(top_builddir)/src/namestore/libgnunetnamestore.la
222
223 test_namestore_api_remove_not_existing_record_SOURCES = \
224  test_namestore_api_remove_not_existing_record.c
225 test_namestore_api_remove_not_existing_record_LDADD = \
226   $(top_builddir)/src/testing/libgnunettesting.la \
227   $(top_builddir)/src/util/libgnunetutil.la \
228   $(top_builddir)/src/namestore/libgnunetnamestore.la
229
230 test_namestore_api_zone_to_name_SOURCES = \
231  test_namestore_api_zone_to_name.c
232 test_namestore_api_zone_to_name_LDADD = \
233   $(top_builddir)/src/testing/libgnunettesting.la \
234   $(top_builddir)/src/util/libgnunetutil.la \
235   $(top_builddir)/src/namestore/libgnunetnamestore.la
236
237 test_namestore_api_monitoring_SOURCES = \
238  test_namestore_api_monitoring.c
239 test_namestore_api_monitoring_LDADD = \
240   $(top_builddir)/src/testing/libgnunettesting.la \
241   $(top_builddir)/src/namestore/libgnunetnamestore.la \
242   $(top_builddir)/src/util/libgnunetutil.la
243
244 test_namestore_api_monitoring_existing_SOURCES = \
245  test_namestore_api_monitoring_existing.c
246 test_namestore_api_monitoring_existing_LDADD = \
247   $(top_builddir)/src/testing/libgnunettesting.la \
248   $(top_builddir)/src/namestore/libgnunetnamestore.la \
249   $(top_builddir)/src/util/libgnunetutil.la
250
251 test_namestore_api_zone_iteration_SOURCES = \
252  test_namestore_api_zone_iteration.c
253 test_namestore_api_zone_iteration_LDADD = \
254   $(top_builddir)/src/testing/libgnunettesting.la \
255   $(top_builddir)/src/util/libgnunetutil.la \
256   $(top_builddir)/src/namestore/libgnunetnamestore.la
257
258 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
259  test_namestore_api_zone_iteration_specific_zone.c
260 test_namestore_api_zone_iteration_specific_zone_LDADD = \
261   $(top_builddir)/src/testing/libgnunettesting.la \
262   $(top_builddir)/src/util/libgnunetutil.la \
263   $(top_builddir)/src/namestore/libgnunetnamestore.la
264
265 test_namestore_api_zone_iteration_stop_SOURCES = \
266  test_namestore_api_zone_iteration_stop.c
267 test_namestore_api_zone_iteration_stop_LDADD = \
268   $(top_builddir)/src/testing/libgnunettesting.la \
269   $(top_builddir)/src/util/libgnunetutil.la \
270   $(top_builddir)/src/namestore/libgnunetnamestore.la
271
272 test_namestore_record_serialization_SOURCES = \
273  test_namestore_record_serialization.c
274 test_namestore_record_serialization_LDADD = \
275   $(top_builddir)/src/testing/libgnunettesting.la \
276   $(top_builddir)/src/util/libgnunetutil.la \
277   $(top_builddir)/src/namestore/libgnunetnamestore.la
278
279 test_plugin_namestore_sqlite_SOURCES = \
280  test_plugin_namestore.c
281 test_plugin_namestore_sqlite_LDADD = \
282  $(top_builddir)/src/testing/libgnunettesting.la \
283  $(top_builddir)/src/util/libgnunetutil.la
284
285 test_plugin_namestore_postgres_SOURCES = \
286  test_plugin_namestore.c
287 test_plugin_namestore_postgres_LDADD = \
288  $(top_builddir)/src/testing/libgnunettesting.la \
289  $(top_builddir)/src/util/libgnunetutil.la
290
291 check_SCRIPTS = \
292         test_namestore_put.sh \
293         test_namestore_lookup.sh \
294         test_namestore_delete.sh
295
296 EXTRA_DIST = \
297   test_namestore_api.conf \
298   test_plugin_namestore_sqlite.conf \
299   test_plugin_namestore_postgres.conf \
300   test_namestore_defaults.conf \
301   test_hostkey \
302   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
303   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
304   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
305   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey \
306   $(check_SCRIPTS)
307