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