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