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