-first draft of postgres namestore plugin (#2157)
[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/namestore/libgnunetnamestore.la  \
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/namestore/libgnunetnamestore.la  \
128   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
129   $(top_builddir)/src/statistics/libgnunetstatistics.la \
130   $(top_builddir)/src/util/libgnunetutil.la \
131   libgnunetnamestore.la
132
133 test_namestore_api_sign_verify_SOURCES = \
134  test_namestore_api_sign_verify.c
135 test_namestore_api_sign_verify_LDADD = \
136   $(top_builddir)/src/util/libgnunetutil.la \
137   $(top_builddir)/src/testing/libgnunettesting.la \
138   $(top_builddir)/src/namestore/libgnunetnamestore.la
139
140 test_namestore_api_SOURCES = \
141  test_namestore_api.c
142 test_namestore_api_LDADD = \
143   $(top_builddir)/src/testing/libgnunettesting.la \
144   $(top_builddir)/src/util/libgnunetutil.la \
145   $(top_builddir)/src/namestore/libgnunetnamestore.la
146
147 test_namestore_api_put_SOURCES = \
148  test_namestore_api_put.c
149 test_namestore_api_put_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_lookup_SOURCES = \
155  test_namestore_api_lookup.c
156 test_namestore_api_lookup_LDADD = \
157   $(top_builddir)/src/testing/libgnunettesting.la \
158   $(top_builddir)/src/util/libgnunetutil.la \
159   $(top_builddir)/src/namestore/libgnunetnamestore.la
160
161 test_namestore_api_lookup_specific_type_SOURCES = \
162  test_namestore_api_lookup_specific_type.c
163 test_namestore_api_lookup_specific_type_LDADD = \
164   $(top_builddir)/src/testing/libgnunettesting.la \
165   $(top_builddir)/src/util/libgnunetutil.la \
166   $(top_builddir)/src/namestore/libgnunetnamestore.la
167
168
169 test_namestore_api_create_SOURCES = \
170  test_namestore_api_create.c
171 test_namestore_api_create_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_create_update_SOURCES = \
177  test_namestore_api_create_update.c
178 test_namestore_api_create_update_LDADD = \
179   $(top_builddir)/src/testing/libgnunettesting.la \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/namestore/libgnunetnamestore.la
182
183
184 test_namestore_api_remove_SOURCES = \
185  test_namestore_api_remove.c
186 test_namestore_api_remove_LDADD = \
187   $(top_builddir)/src/testing/libgnunettesting.la \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(top_builddir)/src/namestore/libgnunetnamestore.la
190
191 test_namestore_api_remove_not_existing_record_SOURCES = \
192  test_namestore_api_remove_not_existing_record.c
193 test_namestore_api_remove_not_existing_record_LDADD = \
194   $(top_builddir)/src/testing/libgnunettesting.la \
195   $(top_builddir)/src/util/libgnunetutil.la \
196   $(top_builddir)/src/namestore/libgnunetnamestore.la
197
198 test_namestore_api_zone_to_name_SOURCES = \
199  test_namestore_api_zone_to_name.c
200 test_namestore_api_zone_to_name_LDADD = \
201   $(top_builddir)/src/testing/libgnunettesting.la \
202   $(top_builddir)/src/util/libgnunetutil.la \
203   $(top_builddir)/src/namestore/libgnunetnamestore.la
204
205 test_namestore_api_zone_iteration_SOURCES = \
206  test_namestore_api_zone_iteration.c
207 test_namestore_api_zone_iteration_LDADD = \
208   $(top_builddir)/src/testing/libgnunettesting.la \
209   $(top_builddir)/src/util/libgnunetutil.la \
210   $(top_builddir)/src/namestore/libgnunetnamestore.la  
211
212 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
213  test_namestore_api_zone_iteration_specific_zone.c
214 test_namestore_api_zone_iteration_specific_zone_LDADD = \
215   $(top_builddir)/src/testing/libgnunettesting.la \
216   $(top_builddir)/src/util/libgnunetutil.la \
217   $(top_builddir)/src/namestore/libgnunetnamestore.la  
218
219 test_namestore_api_zone_iteration_stop_SOURCES = \
220  test_namestore_api_zone_iteration_stop.c
221 test_namestore_api_zone_iteration_stop_LDADD = \
222   $(top_builddir)/src/testing/libgnunettesting.la \
223   $(top_builddir)/src/util/libgnunetutil.la \
224   $(top_builddir)/src/namestore/libgnunetnamestore.la    
225
226 test_namestore_record_serialization_SOURCES = \
227  test_namestore_record_serialization.c
228 test_namestore_record_serialization_LDADD = \
229   $(top_builddir)/src/testing/libgnunettesting.la \
230   $(top_builddir)/src/util/libgnunetutil.la \
231   $(top_builddir)/src/namestore/libgnunetnamestore.la  
232
233 EXTRA_DIST = \
234   test_namestore_api.conf \
235   test_plugin_namestore_sqlite.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