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