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