-implementing zkey <-> pkey conversion functions
[oweals/gnunet.git] / src / namestore / Makefile.am
1 INCLUDES = -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_EXPERIMENTAL
41
42 if HAVE_TESTING
43 TESTING_TESTS = \
44  test_namestore_api \
45  test_namestore_api_remove
46  #test_namestore_api_lookup \
47  #test_namestore_api_lookup_specific_type \
48  #test_namestore_api_create \
49  #test_namestore_api_create_update \ 
50  #test_namestore_api_remove_not_existing_record \
51  #test_namestore_api_zone_to_name \
52  #test_namestore_api_monitoring \
53  #test_namestore_api_zone_iteration \
54  #test_namestore_api_zone_iteration_specific_zone \
55  #test_namestore_api_zone_iteration_stop
56 endif
57
58 if HAVE_SQLITE
59 check_PROGRAMS = \
60  test_namestore_record_serialization \
61  test_namestore_api_blocks \
62  $(SQLITE_TESTS) \
63  $(POSTGRES_TESTS) \
64  $(TESTING_TESTS)
65 endif
66
67 # end of 'HAVE_EXPERIMENTAL' for testcases 
68 endif
69
70 if ENABLE_TEST_RUN
71 TESTS = $(check_PROGRAMS)
72 endif
73
74 lib_LTLIBRARIES = \
75   libgnunetnamestore.la
76
77 libgnunetnamestore_la_SOURCES = \
78   namestore_api.c \
79   namestore_api_monitor.c \
80   namestore_api_common.c \
81   namestore.h
82 libgnunetnamestore_la_LIBADD = \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/util/libgnunetutil.la \
85   $(GN_LIBINTL) 
86 libgnunetnamestore_la_LDFLAGS = \
87   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
88   -version-info 0:1:0
89
90 libexec_PROGRAMS = \
91  gnunet-service-namestore 
92
93 bin_PROGRAMS = \
94  gnunet-namestore 
95
96 if HAVE_MHD
97 bin_PROGRAMS += \
98  gnunet-namestore-fcfsd
99 endif
100
101 gnunet_namestore_SOURCES = \
102  gnunet-namestore.c 
103 gnunet_namestore_LDADD = \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   $(top_builddir)/src/identity/libgnunetidentity.la \
106   libgnunetnamestore.la \
107   $(GN_LIBINTL)
108 gnunet_namestore_DEPENDENCIES = \
109   $(top_builddir)/src/identity/libgnunetidentity.la \
110   $(top_builddir)/src/util/libgnunetutil.la \
111   libgnunetnamestore.la
112
113
114 gnunet_namestore_fcfsd_SOURCES = \
115  gnunet-namestore-fcfsd.c 
116 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
117   $(top_builddir)/src/util/libgnunetutil.la \
118   $(top_builddir)/src/namestore/libgnunetnamestore.la \
119   $(GN_LIBINTL)
120 gnunet_namestore_fcfsd_DEPENDENCIES = \
121   $(top_builddir)/src/util/libgnunetutil.la \
122   libgnunetnamestore.la
123
124
125
126 gnunet_service_namestore_SOURCES = \
127  gnunet-service-namestore.c
128
129 gnunet_service_namestore_LDADD = \
130   $(top_builddir)/src/statistics/libgnunetstatistics.la \
131   $(top_builddir)/src/util/libgnunetutil.la \
132   libgnunetnamestore.la \
133   $(GN_LIBINTL)
134 gnunet_service_namestore_DEPENDENCIES = \
135   $(top_builddir)/src/statistics/libgnunetstatistics.la \
136   $(top_builddir)/src/util/libgnunetutil.la \
137   libgnunetnamestore.la
138
139
140 plugin_LTLIBRARIES = \
141   $(SQLITE_PLUGIN) \
142   $(POSTGRES_PLUGIN)
143
144 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
145   plugin_namestore_sqlite.c 
146 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
147   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
148   $(top_builddir)/src/statistics/libgnunetstatistics.la \
149   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
150   $(LTLIBINTL)
151 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
152  $(GN_PLUGIN_LDFLAGS)
153 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
154   $(top_builddir)/src/statistics/libgnunetstatistics.la \
155   $(top_builddir)/src/util/libgnunetutil.la \
156   libgnunetnamestore.la
157
158
159 libgnunet_plugin_namestore_postgres_la_SOURCES = \
160   plugin_namestore_postgres.c 
161 libgnunet_plugin_namestore_postgres_la_LIBADD = \
162   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
163   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
164   $(top_builddir)/src/statistics/libgnunetstatistics.la \
165   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
166   $(LTLIBINTL)
167 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
168  $(GN_PLUGIN_LDFLAGS)
169 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
170   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
171   $(top_builddir)/src/statistics/libgnunetstatistics.la \
172   $(top_builddir)/src/util/libgnunetutil.la \
173   libgnunetnamestore.la
174
175 test_namestore_api_blocks_SOURCES = \
176  test_namestore_api_blocks.c
177 test_namestore_api_blocks_LDADD = \
178   $(top_builddir)/src/util/libgnunetutil.la \
179   $(top_builddir)/src/testing/libgnunettesting.la \
180   $(top_builddir)/src/namestore/libgnunetnamestore.la
181
182 test_namestore_api_SOURCES = \
183  test_namestore_api.c
184 test_namestore_api_LDADD = \
185   $(top_builddir)/src/testing/libgnunettesting.la \
186   $(top_builddir)/src/util/libgnunetutil.la \
187   $(top_builddir)/src/namestore/libgnunetnamestore.la
188
189 test_namestore_api_put_SOURCES = \
190  test_namestore_api_put.c
191 test_namestore_api_put_LDADD = \
192   $(top_builddir)/src/testing/libgnunettesting.la \
193   $(top_builddir)/src/util/libgnunetutil.la \
194   $(top_builddir)/src/namestore/libgnunetnamestore.la
195
196 test_namestore_api_lookup_SOURCES = \
197  test_namestore_api_lookup.c
198 test_namestore_api_lookup_LDADD = \
199   $(top_builddir)/src/testing/libgnunettesting.la \
200   $(top_builddir)/src/util/libgnunetutil.la \
201   $(top_builddir)/src/namestore/libgnunetnamestore.la
202
203 test_namestore_api_lookup_specific_type_SOURCES = \
204  test_namestore_api_lookup_specific_type.c
205 test_namestore_api_lookup_specific_type_LDADD = \
206   $(top_builddir)/src/testing/libgnunettesting.la \
207   $(top_builddir)/src/util/libgnunetutil.la \
208   $(top_builddir)/src/namestore/libgnunetnamestore.la
209
210
211 test_namestore_api_create_SOURCES = \
212  test_namestore_api_create.c
213 test_namestore_api_create_LDADD = \
214   $(top_builddir)/src/testing/libgnunettesting.la \
215   $(top_builddir)/src/util/libgnunetutil.la \
216   $(top_builddir)/src/namestore/libgnunetnamestore.la
217
218 test_namestore_api_create_update_SOURCES = \
219  test_namestore_api_create_update.c
220 test_namestore_api_create_update_LDADD = \
221   $(top_builddir)/src/testing/libgnunettesting.la \
222   $(top_builddir)/src/util/libgnunetutil.la \
223   $(top_builddir)/src/namestore/libgnunetnamestore.la
224
225
226 test_namestore_api_remove_SOURCES = \
227  test_namestore_api_remove.c
228 test_namestore_api_remove_LDADD = \
229   $(top_builddir)/src/testing/libgnunettesting.la \
230   $(top_builddir)/src/util/libgnunetutil.la \
231   $(top_builddir)/src/namestore/libgnunetnamestore.la
232
233 test_namestore_api_remove_not_existing_record_SOURCES = \
234  test_namestore_api_remove_not_existing_record.c
235 test_namestore_api_remove_not_existing_record_LDADD = \
236   $(top_builddir)/src/testing/libgnunettesting.la \
237   $(top_builddir)/src/util/libgnunetutil.la \
238   $(top_builddir)/src/namestore/libgnunetnamestore.la
239
240 test_namestore_api_zone_to_name_SOURCES = \
241  test_namestore_api_zone_to_name.c
242 test_namestore_api_zone_to_name_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_monitoring_SOURCES = \
248  test_namestore_api_monitoring.c
249 test_namestore_api_monitoring_LDADD = \
250   $(top_builddir)/src/testing/libgnunettesting.la \
251   $(top_builddir)/src/namestore/libgnunetnamestore.la \
252   $(top_builddir)/src/util/libgnunetutil.la 
253
254 test_namestore_api_zone_iteration_SOURCES = \
255  test_namestore_api_zone_iteration.c
256 test_namestore_api_zone_iteration_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_api_zone_iteration_specific_zone_SOURCES = \
262  test_namestore_api_zone_iteration_specific_zone.c
263 test_namestore_api_zone_iteration_specific_zone_LDADD = \
264   $(top_builddir)/src/testing/libgnunettesting.la \
265   $(top_builddir)/src/util/libgnunetutil.la \
266   $(top_builddir)/src/namestore/libgnunetnamestore.la  
267
268 test_namestore_api_zone_iteration_stop_SOURCES = \
269  test_namestore_api_zone_iteration_stop.c
270 test_namestore_api_zone_iteration_stop_LDADD = \
271   $(top_builddir)/src/testing/libgnunettesting.la \
272   $(top_builddir)/src/util/libgnunetutil.la \
273   $(top_builddir)/src/namestore/libgnunetnamestore.la    
274
275 test_namestore_record_serialization_SOURCES = \
276  test_namestore_record_serialization.c
277 test_namestore_record_serialization_LDADD = \
278   $(top_builddir)/src/testing/libgnunettesting.la \
279   $(top_builddir)/src/util/libgnunetutil.la \
280   $(top_builddir)/src/namestore/libgnunetnamestore.la  
281
282 EXTRA_DIST = \
283   test_namestore_api.conf \
284   test_plugin_namestore_sqlite.conf\
285   test_plugin_namestore_postgres.conf\
286   test_hostkey \
287   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
288   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
289   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
290   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
291
292
293
294 test_plugin_namestore_sqlite_SOURCES = \
295  test_plugin_namestore.c
296 test_plugin_namestore_sqlite_LDADD = \
297  $(top_builddir)/src/testing/libgnunettesting.la \
298  $(top_builddir)/src/util/libgnunetutil.la  
299
300 test_plugin_namestore_postgres_SOURCES = \
301  test_plugin_namestore.c
302 test_plugin_namestore_postgres_LDADD = \
303  $(top_builddir)/src/testing/libgnunettesting.la \
304  $(top_builddir)/src/util/libgnunetutil.la