-version bumping
[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 SQLITE_TESTS = test_plugin_namestore_sqlite 
25 endif
26 if HAVE_POSTGRES
27 POSTGRES_TESTS = test_plugin_namestore_postgres
28 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
29 endif
30
31 if HAVE_SQLITE
32 check_PROGRAMS = \
33  $(SQLITE_TESTS) \
34  $(POSTGRES_TESTS) \
35  test_namestore_record_serialization \
36  test_namestore_api_sign_verify \
37  test_namestore_api \
38  test_namestore_api_put \
39  test_namestore_api_lookup \
40  test_namestore_api_lookup_specific_type \
41  test_namestore_api_create \
42  test_namestore_api_create_update \
43  test_namestore_api_remove \
44  test_namestore_api_remove_not_existing_record \
45  test_namestore_api_zone_to_name \
46  test_namestore_api_zone_iteration \
47  test_namestore_api_zone_iteration_specific_zone \
48  test_namestore_api_zone_iteration_stop 
49 endif
50
51 if ENABLE_TEST_RUN
52 TESTS = $(check_PROGRAMS)
53 endif
54
55 lib_LTLIBRARIES = \
56   libgnunetnamestore.la
57
58 libgnunetnamestore_la_SOURCES = \
59   namestore_api.c namestore_common.c namestore.h
60 libgnunetnamestore_la_LIBADD = \
61   $(top_builddir)/src/statistics/libgnunetstatistics.la \
62   $(top_builddir)/src/util/libgnunetutil.la \
63   $(GN_LIBINTL) 
64 libgnunetnamestore_la_LDFLAGS = \
65   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
66   -version-info 0:1:0
67
68 libexec_PROGRAMS = \
69  gnunet-service-namestore 
70
71 bin_PROGRAMS = \
72  gnunet-namestore
73
74
75 gnunet_namestore_SOURCES = \
76  gnunet-namestore.c 
77 gnunet_namestore_LDADD = \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   libgnunetnamestore.la \
80   $(GN_LIBINTL)
81 gnunet_namestore_DEPENDENCIES = \
82   $(top_builddir)/src/util/libgnunetutil.la \
83   libgnunetnamestore.la
84
85
86
87 gnunet_service_namestore_SOURCES = \
88  gnunet-service-namestore.c
89
90 gnunet_service_namestore_LDADD = \
91   $(top_builddir)/src/statistics/libgnunetstatistics.la \
92   $(top_builddir)/src/util/libgnunetutil.la \
93   libgnunetnamestore.la \
94   $(GN_LIBINTL)
95 gnunet_service_namestore_DEPENDENCIES = \
96   $(top_builddir)/src/statistics/libgnunetstatistics.la \
97   $(top_builddir)/src/util/libgnunetutil.la \
98   libgnunetnamestore.la
99
100
101 plugin_LTLIBRARIES = \
102   $(SQLITE_PLUGIN) \
103   $(POSTGRES_PLUGIN)
104
105 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
106   plugin_namestore_sqlite.c namestore_common.c
107 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
108   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
109   $(top_builddir)/src/statistics/libgnunetstatistics.la \
110   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
111   $(LTLIBINTL)
112 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
113  $(GN_PLUGIN_LDFLAGS)
114 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
115   $(top_builddir)/src/statistics/libgnunetstatistics.la \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   libgnunetnamestore.la
118
119
120 libgnunet_plugin_namestore_postgres_la_SOURCES = \
121   plugin_namestore_postgres.c namestore_common.c
122 libgnunet_plugin_namestore_postgres_la_LIBADD = \
123   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
124   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
125   $(top_builddir)/src/statistics/libgnunetstatistics.la \
126   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
127   $(LTLIBINTL)
128 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
129  $(GN_PLUGIN_LDFLAGS)
130 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
131   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
132   $(top_builddir)/src/statistics/libgnunetstatistics.la \
133   $(top_builddir)/src/util/libgnunetutil.la \
134   libgnunetnamestore.la
135
136 test_namestore_api_sign_verify_SOURCES = \
137  test_namestore_api_sign_verify.c
138 test_namestore_api_sign_verify_LDADD = \
139   $(top_builddir)/src/util/libgnunetutil.la \
140   $(top_builddir)/src/testing/libgnunettesting.la \
141   $(top_builddir)/src/namestore/libgnunetnamestore.la
142
143 test_namestore_api_SOURCES = \
144  test_namestore_api.c
145 test_namestore_api_LDADD = \
146   $(top_builddir)/src/testing/libgnunettesting.la \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   $(top_builddir)/src/namestore/libgnunetnamestore.la
149
150 test_namestore_api_put_SOURCES = \
151  test_namestore_api_put.c
152 test_namestore_api_put_LDADD = \
153   $(top_builddir)/src/testing/libgnunettesting.la \
154   $(top_builddir)/src/util/libgnunetutil.la \
155   $(top_builddir)/src/namestore/libgnunetnamestore.la
156
157 test_namestore_api_lookup_SOURCES = \
158  test_namestore_api_lookup.c
159 test_namestore_api_lookup_LDADD = \
160   $(top_builddir)/src/testing/libgnunettesting.la \
161   $(top_builddir)/src/util/libgnunetutil.la \
162   $(top_builddir)/src/namestore/libgnunetnamestore.la
163
164 test_namestore_api_lookup_specific_type_SOURCES = \
165  test_namestore_api_lookup_specific_type.c
166 test_namestore_api_lookup_specific_type_LDADD = \
167   $(top_builddir)/src/testing/libgnunettesting.la \
168   $(top_builddir)/src/util/libgnunetutil.la \
169   $(top_builddir)/src/namestore/libgnunetnamestore.la
170
171
172 test_namestore_api_create_SOURCES = \
173  test_namestore_api_create.c
174 test_namestore_api_create_LDADD = \
175   $(top_builddir)/src/testing/libgnunettesting.la \
176   $(top_builddir)/src/util/libgnunetutil.la \
177   $(top_builddir)/src/namestore/libgnunetnamestore.la
178
179 test_namestore_api_create_update_SOURCES = \
180  test_namestore_api_create_update.c
181 test_namestore_api_create_update_LDADD = \
182   $(top_builddir)/src/testing/libgnunettesting.la \
183   $(top_builddir)/src/util/libgnunetutil.la \
184   $(top_builddir)/src/namestore/libgnunetnamestore.la
185
186
187 test_namestore_api_remove_SOURCES = \
188  test_namestore_api_remove.c
189 test_namestore_api_remove_LDADD = \
190   $(top_builddir)/src/testing/libgnunettesting.la \
191   $(top_builddir)/src/util/libgnunetutil.la \
192   $(top_builddir)/src/namestore/libgnunetnamestore.la
193
194 test_namestore_api_remove_not_existing_record_SOURCES = \
195  test_namestore_api_remove_not_existing_record.c
196 test_namestore_api_remove_not_existing_record_LDADD = \
197   $(top_builddir)/src/testing/libgnunettesting.la \
198   $(top_builddir)/src/util/libgnunetutil.la \
199   $(top_builddir)/src/namestore/libgnunetnamestore.la
200
201 test_namestore_api_zone_to_name_SOURCES = \
202  test_namestore_api_zone_to_name.c
203 test_namestore_api_zone_to_name_LDADD = \
204   $(top_builddir)/src/testing/libgnunettesting.la \
205   $(top_builddir)/src/util/libgnunetutil.la \
206   $(top_builddir)/src/namestore/libgnunetnamestore.la
207
208 test_namestore_api_zone_iteration_SOURCES = \
209  test_namestore_api_zone_iteration.c
210 test_namestore_api_zone_iteration_LDADD = \
211   $(top_builddir)/src/testing/libgnunettesting.la \
212   $(top_builddir)/src/util/libgnunetutil.la \
213   $(top_builddir)/src/namestore/libgnunetnamestore.la  
214
215 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
216  test_namestore_api_zone_iteration_specific_zone.c
217 test_namestore_api_zone_iteration_specific_zone_LDADD = \
218   $(top_builddir)/src/testing/libgnunettesting.la \
219   $(top_builddir)/src/util/libgnunetutil.la \
220   $(top_builddir)/src/namestore/libgnunetnamestore.la  
221
222 test_namestore_api_zone_iteration_stop_SOURCES = \
223  test_namestore_api_zone_iteration_stop.c
224 test_namestore_api_zone_iteration_stop_LDADD = \
225   $(top_builddir)/src/testing/libgnunettesting.la \
226   $(top_builddir)/src/util/libgnunetutil.la \
227   $(top_builddir)/src/namestore/libgnunetnamestore.la    
228
229 test_namestore_record_serialization_SOURCES = \
230  test_namestore_record_serialization.c
231 test_namestore_record_serialization_LDADD = \
232   $(top_builddir)/src/testing/libgnunettesting.la \
233   $(top_builddir)/src/util/libgnunetutil.la \
234   $(top_builddir)/src/namestore/libgnunetnamestore.la  
235
236 EXTRA_DIST = \
237   test_namestore_api.conf \
238   test_plugin_namestore_sqlite.conf\
239   test_plugin_namestore_postgres.conf\
240   test_hostkey \
241   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
242   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
243
244
245 test_plugin_namestore_sqlite_SOURCES = \
246  test_plugin_namestore.c
247 test_plugin_namestore_sqlite_LDADD = \
248  $(top_builddir)/src/testing/libgnunettesting.la \
249  $(top_builddir)/src/util/libgnunetutil.la  
250
251 test_plugin_namestore_postgres_SOURCES = \
252  test_plugin_namestore.c
253 test_plugin_namestore_postgres_LDADD = \
254  $(top_builddir)/src/testing/libgnunettesting.la \
255  $(top_builddir)/src/util/libgnunetutil.la