-towards implementing improved namestore API
[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 if HAVE_POSTGRES
29 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
30 if HAVE_TESTING
31 POSTGRES_TESTS = test_plugin_namestore_postgres
32 endif
33 endif
34 if HAVE_TESTING
35 TESTING_TESTS = \
36  test_namestore_api \
37  test_namestore_api_put \
38  test_namestore_api_lookup \
39  test_namestore_api_lookup_specific_type \
40  test_namestore_api_create \
41  test_namestore_api_create_update \
42  test_namestore_api_remove \
43  test_namestore_api_remove_not_existing_record \
44  test_namestore_api_zone_to_name \
45  test_namestore_api_zone_iteration \
46  test_namestore_api_zone_iteration_specific_zone \
47  test_namestore_api_zone_iteration_stop
48 endif
49
50 if HAVE_SQLITE
51 check_PROGRAMS = \
52  $(SQLITE_TESTS) \
53  $(POSTGRES_TESTS) \
54  $(TESTING_TESTS) \
55  test_namestore_record_serialization \
56  test_namestore_api_sign_verify
57 endif
58
59 if ENABLE_TEST_RUN
60 TESTS = $(check_PROGRAMS)
61 endif
62
63 lib_LTLIBRARIES = \
64   libgnunetnamestore.la
65
66 libgnunetnamestore_la_SOURCES = \
67   namestore_api.c \
68   namestore_api_monitor.c \
69   namestore_api_common.c \
70   namestore.h
71 libgnunetnamestore_la_LIBADD = \
72   $(top_builddir)/src/statistics/libgnunetstatistics.la \
73   $(top_builddir)/src/util/libgnunetutil.la \
74   $(GN_LIBINTL) 
75 libgnunetnamestore_la_LDFLAGS = \
76   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
77   -version-info 0:1:0
78
79 libexec_PROGRAMS = \
80  gnunet-service-namestore 
81
82 bin_PROGRAMS = \
83  gnunet-namestore
84
85
86 gnunet_namestore_SOURCES = \
87  gnunet-namestore.c 
88 gnunet_namestore_LDADD = \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   libgnunetnamestore.la \
91   $(GN_LIBINTL)
92 gnunet_namestore_DEPENDENCIES = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   libgnunetnamestore.la
95
96
97
98 gnunet_service_namestore_SOURCES = \
99  gnunet-service-namestore.c
100
101 gnunet_service_namestore_LDADD = \
102   $(top_builddir)/src/statistics/libgnunetstatistics.la \
103   $(top_builddir)/src/util/libgnunetutil.la \
104   libgnunetnamestore.la \
105   $(GN_LIBINTL)
106 gnunet_service_namestore_DEPENDENCIES = \
107   $(top_builddir)/src/statistics/libgnunetstatistics.la \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   libgnunetnamestore.la
110
111
112 plugin_LTLIBRARIES = \
113   $(SQLITE_PLUGIN) \
114   $(POSTGRES_PLUGIN)
115
116 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
117   plugin_namestore_sqlite.c 
118 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
119   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
120   $(top_builddir)/src/statistics/libgnunetstatistics.la \
121   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
122   $(LTLIBINTL)
123 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
124  $(GN_PLUGIN_LDFLAGS)
125 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
126   $(top_builddir)/src/statistics/libgnunetstatistics.la \
127   $(top_builddir)/src/util/libgnunetutil.la \
128   libgnunetnamestore.la
129
130
131 libgnunet_plugin_namestore_postgres_la_SOURCES = \
132   plugin_namestore_postgres.c 
133 libgnunet_plugin_namestore_postgres_la_LIBADD = \
134   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
135   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
136   $(top_builddir)/src/statistics/libgnunetstatistics.la \
137   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
138   $(LTLIBINTL)
139 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
140  $(GN_PLUGIN_LDFLAGS)
141 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
142   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
143   $(top_builddir)/src/statistics/libgnunetstatistics.la \
144   $(top_builddir)/src/util/libgnunetutil.la \
145   libgnunetnamestore.la
146
147 test_namestore_api_sign_verify_SOURCES = \
148  test_namestore_api_sign_verify.c
149 test_namestore_api_sign_verify_LDADD = \
150   $(top_builddir)/src/util/libgnunetutil.la \
151   $(top_builddir)/src/testing/libgnunettesting.la \
152   $(top_builddir)/src/namestore/libgnunetnamestore.la
153
154 test_namestore_api_SOURCES = \
155  test_namestore_api.c
156 test_namestore_api_LDADD = \
157   $(top_builddir)/src/testing/libgnunettesting.la \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la
160
161 test_namestore_api_put_SOURCES = \
162  test_namestore_api_put.c
163 test_namestore_api_put_LDADD = \
164   $(top_builddir)/src/testing/libgnunettesting.la \
165   $(top_builddir)/src/util/libgnunetutil.la \
166   $(top_builddir)/src/namestore/libgnunetnamestore.la
167
168 test_namestore_api_lookup_SOURCES = \
169  test_namestore_api_lookup.c
170 test_namestore_api_lookup_LDADD = \
171   $(top_builddir)/src/testing/libgnunettesting.la \
172   $(top_builddir)/src/util/libgnunetutil.la \
173   $(top_builddir)/src/namestore/libgnunetnamestore.la
174
175 test_namestore_api_lookup_specific_type_SOURCES = \
176  test_namestore_api_lookup_specific_type.c
177 test_namestore_api_lookup_specific_type_LDADD = \
178   $(top_builddir)/src/testing/libgnunettesting.la \
179   $(top_builddir)/src/util/libgnunetutil.la \
180   $(top_builddir)/src/namestore/libgnunetnamestore.la
181
182
183 test_namestore_api_create_SOURCES = \
184  test_namestore_api_create.c
185 test_namestore_api_create_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_create_update_SOURCES = \
191  test_namestore_api_create_update.c
192 test_namestore_api_create_update_LDADD = \
193   $(top_builddir)/src/testing/libgnunettesting.la \
194   $(top_builddir)/src/util/libgnunetutil.la \
195   $(top_builddir)/src/namestore/libgnunetnamestore.la
196
197
198 test_namestore_api_remove_SOURCES = \
199  test_namestore_api_remove.c
200 test_namestore_api_remove_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_not_existing_record_SOURCES = \
206  test_namestore_api_remove_not_existing_record.c
207 test_namestore_api_remove_not_existing_record_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_zone_to_name_SOURCES = \
213  test_namestore_api_zone_to_name.c
214 test_namestore_api_zone_to_name_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_iteration_SOURCES = \
220  test_namestore_api_zone_iteration.c
221 test_namestore_api_zone_iteration_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_zone_iteration_specific_zone_SOURCES = \
227  test_namestore_api_zone_iteration_specific_zone.c
228 test_namestore_api_zone_iteration_specific_zone_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_zone_iteration_stop_SOURCES = \
234  test_namestore_api_zone_iteration_stop.c
235 test_namestore_api_zone_iteration_stop_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_record_serialization_SOURCES = \
241  test_namestore_record_serialization.c
242 test_namestore_record_serialization_LDADD = \
243   $(top_builddir)/src/testing/libgnunettesting.la \
244   $(top_builddir)/src/util/libgnunetutil.la \
245   $(top_builddir)/src/namestore/libgnunetnamestore.la  
246
247 EXTRA_DIST = \
248   test_namestore_api.conf \
249   test_plugin_namestore_sqlite.conf\
250   test_plugin_namestore_postgres.conf\
251   test_hostkey \
252   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
253   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
254
255
256 test_plugin_namestore_sqlite_SOURCES = \
257  test_plugin_namestore.c
258 test_plugin_namestore_sqlite_LDADD = \
259  $(top_builddir)/src/testing/libgnunettesting.la \
260  $(top_builddir)/src/util/libgnunetutil.la  
261
262 test_plugin_namestore_postgres_SOURCES = \
263  test_plugin_namestore.c
264 test_plugin_namestore_postgres_LDADD = \
265  $(top_builddir)/src/testing/libgnunettesting.la \
266  $(top_builddir)/src/util/libgnunetutil.la