fix segfault
[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/namestore/libgnunetnamestore.la  \
82   $(top_builddir)/src/statistics/libgnunetstatistics.la \
83   $(top_builddir)/src/util/libgnunetutil.la \
84   libgnunetnamestore.la \
85   $(GN_LIBINTL)
86
87 if HAVE_SQLITE
88  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
89 endif
90
91 plugin_LTLIBRARIES = \
92   $(SQLITE_PLUGIN) 
93
94 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
95   plugin_namestore_sqlite.c
96 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
97   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
98   $(top_builddir)/src/statistics/libgnunetstatistics.la \
99   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
100 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
101  $(GN_PLUGIN_LDFLAGS)
102 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
103   $(top_builddir)/src/statistics/libgnunetstatistics.la \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   libgnunetnamestore.la
106
107 test_namestore_api_sign_verify_SOURCES = \
108  test_namestore_api_sign_verify.c
109 test_namestore_api_sign_verify_LDADD = \
110   $(top_builddir)/src/util/libgnunetutil.la \
111   $(top_builddir)/src/namestore/libgnunetnamestore.la
112
113 test_namestore_api_SOURCES = \
114  test_namestore_api.c
115 test_namestore_api_LDADD = \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   $(top_builddir)/src/namestore/libgnunetnamestore.la
118
119 test_namestore_api_put_SOURCES = \
120  test_namestore_api_put.c
121 test_namestore_api_put_LDADD = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/namestore/libgnunetnamestore.la
124
125 test_namestore_api_lookup_SOURCES = \
126  test_namestore_api_lookup.c
127 test_namestore_api_lookup_LDADD = \
128   $(top_builddir)/src/util/libgnunetutil.la \
129   $(top_builddir)/src/namestore/libgnunetnamestore.la
130
131 test_namestore_api_lookup_specific_type_SOURCES = \
132  test_namestore_api_lookup_specific_type.c
133 test_namestore_api_lookup_specific_type_LDADD = \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   $(top_builddir)/src/namestore/libgnunetnamestore.la
136
137
138 test_namestore_api_create_SOURCES = \
139  test_namestore_api_create.c
140 test_namestore_api_create_LDADD = \
141   $(top_builddir)/src/util/libgnunetutil.la \
142   $(top_builddir)/src/namestore/libgnunetnamestore.la
143
144 test_namestore_api_create_update_SOURCES = \
145  test_namestore_api_create_update.c
146 test_namestore_api_create_update_LDADD = \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   $(top_builddir)/src/namestore/libgnunetnamestore.la
149
150
151 test_namestore_api_remove_SOURCES = \
152  test_namestore_api_remove.c
153 test_namestore_api_remove_LDADD = \
154   $(top_builddir)/src/util/libgnunetutil.la \
155   $(top_builddir)/src/namestore/libgnunetnamestore.la
156
157 test_namestore_api_remove_not_existing_record_SOURCES = \
158  test_namestore_api_remove_not_existing_record.c
159 test_namestore_api_remove_not_existing_record_LDADD = \
160   $(top_builddir)/src/util/libgnunetutil.la \
161   $(top_builddir)/src/namestore/libgnunetnamestore.la
162
163 test_namestore_api_zone_to_name_SOURCES = \
164  test_namestore_api_zone_to_name.c
165 test_namestore_api_zone_to_name_LDADD = \
166   $(top_builddir)/src/util/libgnunetutil.la \
167   $(top_builddir)/src/namestore/libgnunetnamestore.la
168
169 test_namestore_api_zone_iteration_SOURCES = \
170  test_namestore_api_zone_iteration.c
171 test_namestore_api_zone_iteration_LDADD = \
172   $(top_builddir)/src/util/libgnunetutil.la \
173   $(top_builddir)/src/namestore/libgnunetnamestore.la  
174   
175 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
176  test_namestore_api_zone_iteration_specific_zone.c
177 test_namestore_api_zone_iteration_specific_zone_LDADD = \
178   $(top_builddir)/src/util/libgnunetutil.la \
179   $(top_builddir)/src/namestore/libgnunetnamestore.la  
180   
181 test_namestore_api_zone_iteration_stop_SOURCES = \
182  test_namestore_api_zone_iteration_stop.c
183 test_namestore_api_zone_iteration_stop_LDADD = \
184   $(top_builddir)/src/util/libgnunetutil.la \
185   $(top_builddir)/src/namestore/libgnunetnamestore.la    
186
187 test_namestore_record_serialization_SOURCES = \
188  test_namestore_record_serialization.c
189 test_namestore_record_serialization_LDADD = \
190   $(top_builddir)/src/util/libgnunetutil.la \
191   $(top_builddir)/src/namestore/libgnunetnamestore.la  
192
193 EXTRA_DIST = \
194   test_namestore_api.conf \
195   test_plugin_namestore_sqlite.conf\
196   test_hostkey \
197   zonefiles/4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone \
198   zonefiles/KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zone
199
200
201 test_plugin_namestore_sqlite_SOURCES = \
202  test_plugin_namestore.c
203 test_plugin_namestore_sqlite_LDADD = \
204  $(top_builddir)/src/util/libgnunetutil.la