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