-fix remove testcase
[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 = $(check_PROGRAMS)
66 endif
67
68 lib_LTLIBRARIES = \
69   libgnunetnamestore.la
70
71 libgnunetnamestore_la_SOURCES = \
72   namestore_api.c \
73   namestore_api_monitor.c \
74   namestore_api_common.c \
75   namestore.h
76 libgnunetnamestore_la_LIBADD = \
77   $(top_builddir)/src/statistics/libgnunetstatistics.la \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(GN_LIBINTL) 
80 libgnunetnamestore_la_LDFLAGS = \
81   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
82   -version-info 0:1:0
83
84 libexec_PROGRAMS = \
85  gnunet-service-namestore 
86
87 bin_PROGRAMS = \
88  gnunet-namestore 
89
90 if HAVE_MHD
91 bin_PROGRAMS += \
92  gnunet-namestore-fcfsd
93 endif
94
95 gnunet_namestore_SOURCES = \
96  gnunet-namestore.c 
97 gnunet_namestore_LDADD = \
98   $(top_builddir)/src/util/libgnunetutil.la \
99   $(top_builddir)/src/identity/libgnunetidentity.la \
100   libgnunetnamestore.la \
101   $(GN_LIBINTL)
102 gnunet_namestore_DEPENDENCIES = \
103   $(top_builddir)/src/identity/libgnunetidentity.la \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   libgnunetnamestore.la
106
107
108 gnunet_namestore_fcfsd_SOURCES = \
109  gnunet-namestore-fcfsd.c 
110 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/identity/libgnunetidentity.la \
113   $(top_builddir)/src/namestore/libgnunetnamestore.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/statistics/libgnunetstatistics.la \
126   $(top_builddir)/src/util/libgnunetutil.la \
127   libgnunetnamestore.la \
128   $(GN_LIBINTL)
129 gnunet_service_namestore_DEPENDENCIES = \
130   $(top_builddir)/src/statistics/libgnunetstatistics.la \
131   $(top_builddir)/src/util/libgnunetutil.la \
132   libgnunetnamestore.la
133
134
135 plugin_LTLIBRARIES = \
136   $(SQLITE_PLUGIN) \
137   $(POSTGRES_PLUGIN)
138
139 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
140   plugin_namestore_sqlite.c 
141 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
142   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
143   $(top_builddir)/src/statistics/libgnunetstatistics.la \
144   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
145   $(LTLIBINTL)
146 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
147  $(GN_PLUGIN_LDFLAGS)
148 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
149   $(top_builddir)/src/statistics/libgnunetstatistics.la \
150   $(top_builddir)/src/util/libgnunetutil.la \
151   libgnunetnamestore.la
152
153
154 libgnunet_plugin_namestore_postgres_la_SOURCES = \
155   plugin_namestore_postgres.c 
156 libgnunet_plugin_namestore_postgres_la_LIBADD = \
157   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
158   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
159   $(top_builddir)/src/statistics/libgnunetstatistics.la \
160   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
161   $(LTLIBINTL)
162 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
163  $(GN_PLUGIN_LDFLAGS)
164 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
165   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
166   $(top_builddir)/src/statistics/libgnunetstatistics.la \
167   $(top_builddir)/src/util/libgnunetutil.la \
168   libgnunetnamestore.la
169
170 test_namestore_api_blocks_SOURCES = \
171  test_namestore_api_blocks.c
172 test_namestore_api_blocks_LDADD = \
173   $(top_builddir)/src/util/libgnunetutil.la \
174   $(top_builddir)/src/testing/libgnunettesting.la \
175   $(top_builddir)/src/namestore/libgnunetnamestore.la
176
177 test_namestore_api_store_SOURCES = \
178  test_namestore_api_store.c
179 test_namestore_api_store_LDADD = \
180   $(top_builddir)/src/testing/libgnunettesting.la \
181   $(top_builddir)/src/util/libgnunetutil.la \
182   $(top_builddir)/src/namestore/libgnunetnamestore.la
183
184 test_namestore_api_store_update_SOURCES = \
185  test_namestore_api_store_update.c
186 test_namestore_api_store_update_LDADD = \
187   $(top_builddir)/src/testing/libgnunettesting.la \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(top_builddir)/src/namestore/libgnunetnamestore.la
190
191 test_namestore_api_lookup_public_SOURCES = \
192  test_namestore_api_lookup_public.c
193 test_namestore_api_lookup_public_LDADD = \
194   $(top_builddir)/src/testing/libgnunettesting.la \
195   $(top_builddir)/src/util/libgnunetutil.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/namestore/libgnunetnamestore.la
204
205 test_namestore_api_remove_SOURCES = \
206  test_namestore_api_remove.c
207 test_namestore_api_remove_LDADD = \
208   $(top_builddir)/src/testing/libgnunettesting.la \
209   $(top_builddir)/src/util/libgnunetutil.la \
210   $(top_builddir)/src/namestore/libgnunetnamestore.la
211
212 test_namestore_api_remove_not_existing_record_SOURCES = \
213  test_namestore_api_remove_not_existing_record.c
214 test_namestore_api_remove_not_existing_record_LDADD = \
215   $(top_builddir)/src/testing/libgnunettesting.la \
216   $(top_builddir)/src/util/libgnunetutil.la \
217   $(top_builddir)/src/namestore/libgnunetnamestore.la
218
219 test_namestore_api_zone_to_name_SOURCES = \
220  test_namestore_api_zone_to_name.c
221 test_namestore_api_zone_to_name_LDADD = \
222   $(top_builddir)/src/testing/libgnunettesting.la \
223   $(top_builddir)/src/util/libgnunetutil.la \
224   $(top_builddir)/src/namestore/libgnunetnamestore.la
225
226 test_namestore_api_monitoring_SOURCES = \
227  test_namestore_api_monitoring.c
228 test_namestore_api_monitoring_LDADD = \
229   $(top_builddir)/src/testing/libgnunettesting.la \
230   $(top_builddir)/src/namestore/libgnunetnamestore.la \
231   $(top_builddir)/src/util/libgnunetutil.la 
232
233 test_namestore_api_monitoring_existing_SOURCES = \
234  test_namestore_api_monitoring_existing.c
235 test_namestore_api_monitoring_existing_LDADD = \
236   $(top_builddir)/src/testing/libgnunettesting.la \
237   $(top_builddir)/src/namestore/libgnunetnamestore.la \
238   $(top_builddir)/src/util/libgnunetutil.la 
239
240 test_namestore_api_zone_iteration_SOURCES = \
241  test_namestore_api_zone_iteration.c
242 test_namestore_api_zone_iteration_LDADD = \
243   $(top_builddir)/src/testing/libgnunettesting.la \
244   $(top_builddir)/src/util/libgnunetutil.la \
245   $(top_builddir)/src/namestore/libgnunetnamestore.la  
246
247 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
248  test_namestore_api_zone_iteration_specific_zone.c
249 test_namestore_api_zone_iteration_specific_zone_LDADD = \
250   $(top_builddir)/src/testing/libgnunettesting.la \
251   $(top_builddir)/src/util/libgnunetutil.la \
252   $(top_builddir)/src/namestore/libgnunetnamestore.la  
253
254 test_namestore_api_zone_iteration_stop_SOURCES = \
255  test_namestore_api_zone_iteration_stop.c
256 test_namestore_api_zone_iteration_stop_LDADD = \
257   $(top_builddir)/src/testing/libgnunettesting.la \
258   $(top_builddir)/src/util/libgnunetutil.la \
259   $(top_builddir)/src/namestore/libgnunetnamestore.la    
260
261 test_namestore_record_serialization_SOURCES = \
262  test_namestore_record_serialization.c
263 test_namestore_record_serialization_LDADD = \
264   $(top_builddir)/src/testing/libgnunettesting.la \
265   $(top_builddir)/src/util/libgnunetutil.la \
266   $(top_builddir)/src/namestore/libgnunetnamestore.la  
267
268 EXTRA_DIST = \
269   test_namestore_api.conf \
270   test_plugin_namestore_sqlite.conf \
271   test_plugin_namestore_postgres.conf \
272   test_hostkey \
273   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
274   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
275   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
276   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
277
278
279
280 test_plugin_namestore_sqlite_SOURCES = \
281  test_plugin_namestore.c
282 test_plugin_namestore_sqlite_LDADD = \
283  $(top_builddir)/src/testing/libgnunettesting.la \
284  $(top_builddir)/src/util/libgnunetutil.la  
285
286 test_plugin_namestore_postgres_SOURCES = \
287  test_plugin_namestore.c
288 test_plugin_namestore_postgres_LDADD = \
289  $(top_builddir)/src/testing/libgnunettesting.la \
290  $(top_builddir)/src/util/libgnunetutil.la