17b7657074558352b124df110bb4baae2f986499
[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 pkgcfg_DATA = \
8    namestore.conf
9
10
11 if MINGW
12   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
13 endif
14
15 if USE_COVERAGE
16   AM_CFLAGS = --coverage -O0
17   XLIBS = -lgcov
18 endif
19
20 if HAVE_SQLITE
21 SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
22 SQLITE_TESTS = test_plugin_namestore_sqlite 
23 endif
24 if HAVE_POSTGRES
25 POSTGRES_TESTS = test_plugin_namestore_postgres
26 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
27 endif
28
29 if HAVE_SQLITE
30 check_PROGRAMS = \
31  $(SQLITE_TESTS) \
32  $(POSTGRES_TESTS) \
33  test_namestore_record_serialization \
34  test_namestore_api_sign_verify \
35  test_namestore_api \
36  test_namestore_api_put \
37  test_namestore_api_lookup \
38  test_namestore_api_lookup_specific_type \
39  test_namestore_api_create \
40  test_namestore_api_create_update \
41  test_namestore_api_remove \
42  test_namestore_api_remove_not_existing_record \
43  test_namestore_api_zone_to_name \
44  test_namestore_api_zone_iteration \
45  test_namestore_api_zone_iteration_specific_zone \
46  test_namestore_api_zone_iteration_stop 
47 endif
48
49 if ENABLE_TEST_RUN
50 TESTS = $(check_PROGRAMS)
51 endif
52
53 lib_LTLIBRARIES = \
54   libgnunetnamestore.la
55
56 libgnunetnamestore_la_SOURCES = \
57   namestore_api.c namestore_common.c namestore.h
58 libgnunetnamestore_la_LIBADD = \
59   $(top_builddir)/src/statistics/libgnunetstatistics.la \
60   $(top_builddir)/src/util/libgnunetutil.la \
61   $(GN_LIBINTL) 
62 libgnunetnamestore_la_LDFLAGS = \
63   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
64   -version-info 0:0:0
65
66 bin_PROGRAMS = \
67  gnunet-service-namestore \
68  gnunet-namestore
69
70
71 gnunet_namestore_SOURCES = \
72  gnunet-namestore.c 
73 gnunet_namestore_LDADD = \
74   $(top_builddir)/src/util/libgnunetutil.la \
75   libgnunetnamestore.la \
76   $(GN_LIBINTL)
77 gnunet_namestore_DEPENDENCIES = \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   libgnunetnamestore.la
80
81
82
83 gnunet_service_namestore_SOURCES = \
84  gnunet-service-namestore.c
85
86 gnunet_service_namestore_LDADD = \
87   $(top_builddir)/src/statistics/libgnunetstatistics.la \
88   $(top_builddir)/src/util/libgnunetutil.la \
89   libgnunetnamestore.la \
90   $(GN_LIBINTL)
91 gnunet_service_namestore_DEPENDENCIES = \
92   $(top_builddir)/src/statistics/libgnunetstatistics.la \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   libgnunetnamestore.la
95
96
97 plugin_LTLIBRARIES = \
98   $(SQLITE_PLUGIN) \
99   $(POSTGRES_PLUGIN)
100
101 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
102   plugin_namestore_sqlite.c namestore_common.c
103 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
104   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
105   $(top_builddir)/src/statistics/libgnunetstatistics.la \
106   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
107   $(LTLIBINTL)
108 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
109  $(GN_PLUGIN_LDFLAGS)
110 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
111   $(top_builddir)/src/statistics/libgnunetstatistics.la \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   libgnunetnamestore.la
114
115
116 libgnunet_plugin_namestore_postgres_la_SOURCES = \
117   plugin_namestore_postgres.c namestore_common.c
118 libgnunet_plugin_namestore_postgres_la_LIBADD = \
119   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
120   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
121   $(top_builddir)/src/statistics/libgnunetstatistics.la \
122   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
123   $(LTLIBINTL)
124 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
125  $(GN_PLUGIN_LDFLAGS)
126 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
127   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
128   $(top_builddir)/src/statistics/libgnunetstatistics.la \
129   $(top_builddir)/src/util/libgnunetutil.la \
130   libgnunetnamestore.la
131
132 test_namestore_api_sign_verify_SOURCES = \
133  test_namestore_api_sign_verify.c
134 test_namestore_api_sign_verify_LDADD = \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/testing/libgnunettesting.la \
137   $(top_builddir)/src/namestore/libgnunetnamestore.la
138
139 test_namestore_api_SOURCES = \
140  test_namestore_api.c
141 test_namestore_api_LDADD = \
142   $(top_builddir)/src/testing/libgnunettesting.la \
143   $(top_builddir)/src/util/libgnunetutil.la \
144   $(top_builddir)/src/namestore/libgnunetnamestore.la
145
146 test_namestore_api_put_SOURCES = \
147  test_namestore_api_put.c
148 test_namestore_api_put_LDADD = \
149   $(top_builddir)/src/testing/libgnunettesting.la \
150   $(top_builddir)/src/util/libgnunetutil.la \
151   $(top_builddir)/src/namestore/libgnunetnamestore.la
152
153 test_namestore_api_lookup_SOURCES = \
154  test_namestore_api_lookup.c
155 test_namestore_api_lookup_LDADD = \
156   $(top_builddir)/src/testing/libgnunettesting.la \
157   $(top_builddir)/src/util/libgnunetutil.la \
158   $(top_builddir)/src/namestore/libgnunetnamestore.la
159
160 test_namestore_api_lookup_specific_type_SOURCES = \
161  test_namestore_api_lookup_specific_type.c
162 test_namestore_api_lookup_specific_type_LDADD = \
163   $(top_builddir)/src/testing/libgnunettesting.la \
164   $(top_builddir)/src/util/libgnunetutil.la \
165   $(top_builddir)/src/namestore/libgnunetnamestore.la
166
167
168 test_namestore_api_create_SOURCES = \
169  test_namestore_api_create.c
170 test_namestore_api_create_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_create_update_SOURCES = \
176  test_namestore_api_create_update.c
177 test_namestore_api_create_update_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_remove_SOURCES = \
184  test_namestore_api_remove.c
185 test_namestore_api_remove_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_remove_not_existing_record_SOURCES = \
191  test_namestore_api_remove_not_existing_record.c
192 test_namestore_api_remove_not_existing_record_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_zone_to_name_SOURCES = \
198  test_namestore_api_zone_to_name.c
199 test_namestore_api_zone_to_name_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_zone_iteration_SOURCES = \
205  test_namestore_api_zone_iteration.c
206 test_namestore_api_zone_iteration_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_iteration_specific_zone_SOURCES = \
212  test_namestore_api_zone_iteration_specific_zone.c
213 test_namestore_api_zone_iteration_specific_zone_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_zone_iteration_stop_SOURCES = \
219  test_namestore_api_zone_iteration_stop.c
220 test_namestore_api_zone_iteration_stop_LDADD = \
221   $(top_builddir)/src/testing/libgnunettesting.la \
222   $(top_builddir)/src/util/libgnunetutil.la \
223   $(top_builddir)/src/namestore/libgnunetnamestore.la    
224
225 test_namestore_record_serialization_SOURCES = \
226  test_namestore_record_serialization.c
227 test_namestore_record_serialization_LDADD = \
228   $(top_builddir)/src/testing/libgnunettesting.la \
229   $(top_builddir)/src/util/libgnunetutil.la \
230   $(top_builddir)/src/namestore/libgnunetnamestore.la  
231
232 EXTRA_DIST = \
233   test_namestore_api.conf \
234   test_plugin_namestore_sqlite.conf\
235   test_plugin_namestore_postgres.conf\
236   test_hostkey \
237   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
238   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
239
240
241 test_plugin_namestore_sqlite_SOURCES = \
242  test_plugin_namestore.c
243 test_plugin_namestore_sqlite_LDADD = \
244  $(top_builddir)/src/testing/libgnunettesting.la \
245  $(top_builddir)/src/util/libgnunetutil.la  
246
247 test_plugin_namestore_postgres_SOURCES = \
248  test_plugin_namestore.c
249 test_plugin_namestore_postgres_LDADD = \
250  $(top_builddir)/src/testing/libgnunettesting.la \
251  $(top_builddir)/src/util/libgnunetutil.la