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