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