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