-more testcase cleanup
[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_TESTS = \
22  test_plugin_namestore_sqlite 
23 endif
24
25
26 check_PROGRAMS = \
27  $(SQLITE_TESTS) \
28  test_namestore_record_serialization \
29  test_namestore_api_sign_verify \
30  test_namestore_api \
31  test_namestore_api_put \
32  test_namestore_api_lookup \
33  test_namestore_api_lookup_specific_type \
34  test_namestore_api_create \
35  test_namestore_api_create_update \
36  test_namestore_api_remove \
37  test_namestore_api_remove_not_existing_record \
38  test_namestore_api_zone_to_name \
39  test_namestore_api_zone_iteration \
40  test_namestore_api_zone_iteration_specific_zone \
41  test_namestore_api_zone_iteration_stop 
42
43 if ENABLE_TEST_RUN
44 TESTS = $(check_PROGRAMS)
45 endif
46
47 lib_LTLIBRARIES = \
48   libgnunetnamestore.la
49
50 libgnunetnamestore_la_SOURCES = \
51   namestore_api.c namestore_common.c namestore.h
52 libgnunetnamestore_la_LIBADD = \
53   $(top_builddir)/src/statistics/libgnunetstatistics.la \
54   $(top_builddir)/src/util/libgnunetutil.la \
55   $(GN_LIBINTL) 
56 libgnunetnamestore_la_LDFLAGS = \
57   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
58   -version-info 0:0:0
59
60 bin_PROGRAMS = \
61  gnunet-service-namestore \
62  gnunet-namestore
63
64
65 gnunet_namestore_SOURCES = \
66  gnunet-namestore.c 
67 gnunet_namestore_LDADD = \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   libgnunetnamestore.la \
70   $(GN_LIBINTL)
71 gnunet_namestore_DEPENDENCIES = \
72   $(top_builddir)/src/util/libgnunetutil.la \
73   libgnunetnamestore.la
74
75
76
77 gnunet_service_namestore_SOURCES = \
78  gnunet-service-namestore.c
79
80 gnunet_service_namestore_LDADD = \
81   $(top_builddir)/src/statistics/libgnunetstatistics.la \
82   $(top_builddir)/src/util/libgnunetutil.la \
83   libgnunetnamestore.la \
84   $(GN_LIBINTL)
85 gnunet_service_namestore_DEPENDENCIES = \
86   $(top_builddir)/src/statistics/libgnunetstatistics.la \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   libgnunetnamestore.la
89
90 if HAVE_SQLITE
91  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
92 endif
93
94 plugin_LTLIBRARIES = \
95   $(SQLITE_PLUGIN) 
96
97 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
98   plugin_namestore_sqlite.c namestore_common.c
99 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
100   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
101   $(top_builddir)/src/statistics/libgnunetstatistics.la \
102   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
103   $(LTLIBINTL)
104 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
105  $(GN_PLUGIN_LDFLAGS)
106 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
107   $(top_builddir)/src/statistics/libgnunetstatistics.la \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   libgnunetnamestore.la
110
111 test_namestore_api_sign_verify_SOURCES = \
112  test_namestore_api_sign_verify.c
113 test_namestore_api_sign_verify_LDADD = \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(top_builddir)/src/testing/libgnunettesting.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la
117
118 test_namestore_api_SOURCES = \
119  test_namestore_api.c
120 test_namestore_api_LDADD = \
121   $(top_builddir)/src/testing/libgnunettesting.la \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/namestore/libgnunetnamestore.la
124
125 test_namestore_api_put_SOURCES = \
126  test_namestore_api_put.c
127 test_namestore_api_put_LDADD = \
128   $(top_builddir)/src/testing/libgnunettesting.la \
129   $(top_builddir)/src/util/libgnunetutil.la \
130   $(top_builddir)/src/namestore/libgnunetnamestore.la
131
132 test_namestore_api_lookup_SOURCES = \
133  test_namestore_api_lookup.c
134 test_namestore_api_lookup_LDADD = \
135   $(top_builddir)/src/testing/libgnunettesting.la \
136   $(top_builddir)/src/util/libgnunetutil.la \
137   $(top_builddir)/src/namestore/libgnunetnamestore.la
138
139 test_namestore_api_lookup_specific_type_SOURCES = \
140  test_namestore_api_lookup_specific_type.c
141 test_namestore_api_lookup_specific_type_LDADD = \
142   $(top_builddir)/src/testing/libgnunettesting.la \
143   $(top_builddir)/src/util/libgnunetutil.la \
144   $(top_builddir)/src/namestore/libgnunetnamestore.la
145
146
147 test_namestore_api_create_SOURCES = \
148  test_namestore_api_create.c
149 test_namestore_api_create_LDADD = \
150   $(top_builddir)/src/testing/libgnunettesting.la \
151   $(top_builddir)/src/util/libgnunetutil.la \
152   $(top_builddir)/src/namestore/libgnunetnamestore.la
153
154 test_namestore_api_create_update_SOURCES = \
155  test_namestore_api_create_update.c
156 test_namestore_api_create_update_LDADD = \
157   $(top_builddir)/src/testing/libgnunettesting.la \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la
160
161
162 test_namestore_api_remove_SOURCES = \
163  test_namestore_api_remove.c
164 test_namestore_api_remove_LDADD = \
165   $(top_builddir)/src/testing/libgnunettesting.la \
166   $(top_builddir)/src/util/libgnunetutil.la \
167   $(top_builddir)/src/namestore/libgnunetnamestore.la
168
169 test_namestore_api_remove_not_existing_record_SOURCES = \
170  test_namestore_api_remove_not_existing_record.c
171 test_namestore_api_remove_not_existing_record_LDADD = \
172   $(top_builddir)/src/testing/libgnunettesting.la \
173   $(top_builddir)/src/util/libgnunetutil.la \
174   $(top_builddir)/src/namestore/libgnunetnamestore.la
175
176 test_namestore_api_zone_to_name_SOURCES = \
177  test_namestore_api_zone_to_name.c
178 test_namestore_api_zone_to_name_LDADD = \
179   $(top_builddir)/src/testing/libgnunettesting.la \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/namestore/libgnunetnamestore.la
182
183 test_namestore_api_zone_iteration_SOURCES = \
184  test_namestore_api_zone_iteration.c
185 test_namestore_api_zone_iteration_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_zone_iteration_specific_zone_SOURCES = \
191  test_namestore_api_zone_iteration_specific_zone.c
192 test_namestore_api_zone_iteration_specific_zone_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_iteration_stop_SOURCES = \
198  test_namestore_api_zone_iteration_stop.c
199 test_namestore_api_zone_iteration_stop_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_record_serialization_SOURCES = \
205  test_namestore_record_serialization.c
206 test_namestore_record_serialization_LDADD = \
207   $(top_builddir)/src/testing/libgnunettesting.la \
208   $(top_builddir)/src/util/libgnunetutil.la \
209   $(top_builddir)/src/namestore/libgnunetnamestore.la  
210
211 EXTRA_DIST = \
212   test_namestore_api.conf \
213   test_plugin_namestore_sqlite.conf\
214   test_hostkey \
215   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
216   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
217
218
219 test_plugin_namestore_sqlite_SOURCES = \
220  test_plugin_namestore.c
221 test_plugin_namestore_sqlite_LDADD = \
222  $(top_builddir)/src/testing/libgnunettesting.la \
223  $(top_builddir)/src/util/libgnunetutil.la