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