-fixing #2405
[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/namestore/libgnunetnamestore.la
116
117 test_namestore_api_SOURCES = \
118  test_namestore_api.c
119 test_namestore_api_LDADD = \
120   $(top_builddir)/src/util/libgnunetutil.la \
121   $(top_builddir)/src/namestore/libgnunetnamestore.la
122
123 test_namestore_api_put_SOURCES = \
124  test_namestore_api_put.c
125 test_namestore_api_put_LDADD = \
126   $(top_builddir)/src/util/libgnunetutil.la \
127   $(top_builddir)/src/namestore/libgnunetnamestore.la
128
129 test_namestore_api_lookup_SOURCES = \
130  test_namestore_api_lookup.c
131 test_namestore_api_lookup_LDADD = \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   $(top_builddir)/src/namestore/libgnunetnamestore.la
134
135 test_namestore_api_lookup_specific_type_SOURCES = \
136  test_namestore_api_lookup_specific_type.c
137 test_namestore_api_lookup_specific_type_LDADD = \
138   $(top_builddir)/src/util/libgnunetutil.la \
139   $(top_builddir)/src/namestore/libgnunetnamestore.la
140
141
142 test_namestore_api_create_SOURCES = \
143  test_namestore_api_create.c
144 test_namestore_api_create_LDADD = \
145   $(top_builddir)/src/util/libgnunetutil.la \
146   $(top_builddir)/src/namestore/libgnunetnamestore.la
147
148 test_namestore_api_create_update_SOURCES = \
149  test_namestore_api_create_update.c
150 test_namestore_api_create_update_LDADD = \
151   $(top_builddir)/src/util/libgnunetutil.la \
152   $(top_builddir)/src/namestore/libgnunetnamestore.la
153
154
155 test_namestore_api_remove_SOURCES = \
156  test_namestore_api_remove.c
157 test_namestore_api_remove_LDADD = \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la
160
161 test_namestore_api_remove_not_existing_record_SOURCES = \
162  test_namestore_api_remove_not_existing_record.c
163 test_namestore_api_remove_not_existing_record_LDADD = \
164   $(top_builddir)/src/util/libgnunetutil.la \
165   $(top_builddir)/src/namestore/libgnunetnamestore.la
166
167 test_namestore_api_zone_to_name_SOURCES = \
168  test_namestore_api_zone_to_name.c
169 test_namestore_api_zone_to_name_LDADD = \
170   $(top_builddir)/src/util/libgnunetutil.la \
171   $(top_builddir)/src/namestore/libgnunetnamestore.la
172
173 test_namestore_api_zone_iteration_SOURCES = \
174  test_namestore_api_zone_iteration.c
175 test_namestore_api_zone_iteration_LDADD = \
176   $(top_builddir)/src/util/libgnunetutil.la \
177   $(top_builddir)/src/namestore/libgnunetnamestore.la  
178   
179 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
180  test_namestore_api_zone_iteration_specific_zone.c
181 test_namestore_api_zone_iteration_specific_zone_LDADD = \
182   $(top_builddir)/src/util/libgnunetutil.la \
183   $(top_builddir)/src/namestore/libgnunetnamestore.la  
184   
185 test_namestore_api_zone_iteration_stop_SOURCES = \
186  test_namestore_api_zone_iteration_stop.c
187 test_namestore_api_zone_iteration_stop_LDADD = \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(top_builddir)/src/namestore/libgnunetnamestore.la    
190
191 test_namestore_record_serialization_SOURCES = \
192  test_namestore_record_serialization.c
193 test_namestore_record_serialization_LDADD = \
194   $(top_builddir)/src/util/libgnunetutil.la \
195   $(top_builddir)/src/namestore/libgnunetnamestore.la  
196
197 EXTRA_DIST = \
198   test_namestore_api.conf \
199   test_plugin_namestore_sqlite.conf\
200   test_hostkey \
201   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
202   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
203
204
205 test_plugin_namestore_sqlite_SOURCES = \
206  test_plugin_namestore.c
207 test_plugin_namestore_sqlite_LDADD = \
208  $(top_builddir)/src/util/libgnunetutil.la