- record serialization + test
[oweals/gnunet.git] / src / namestore / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 pkgcfgdir= $(pkgnamedir)/config.d/
6
7 pkgcfg_NAME = \
8   namestore.conf
9
10 if MINGW
11   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
12 endif
13
14 if USE_COVERAGE
15   AM_CFLAGS = --coverage -O0
16   XLIBS = -lgcov
17 endif
18
19 if HAVE_SQLITE
20 SQLITE_TESTS = \
21  test_plugin_namestore_sqlite 
22 endif
23
24
25 check_PROGRAMS = \
26  $(SQLITE_TESTS) 
27
28 if HAVE_EXPERIMENTAL
29 check_PROGRAMS += test_namestore_api \
30 test_namestore_api_zone_iteration \
31 test_namestore_record_serialization
32 endif
33
34 lib_LTLIBRARIES = \
35   libgnunetnamestore.la
36
37 libgnunetnamestore_la_SOURCES = \
38   namestore_api.c namestore.h 
39 libgnunetnamestore_la_LIBADD = \
40   $(top_builddir)/src/statistics/libgnunetstatistics.la \
41   $(top_builddir)/src/util/libgnunetutil.la \
42   $(GN_LIBINTL) 
43 libgnunetnamestore_la_LDFLAGS = \
44   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
45   -version-info 0:0:0
46
47 bin_PROGRAMS = \
48  gnunet-service-namestore
49
50 gnunet_service_namestore_SOURCES = \
51  gnunet-service-namestore.c \
52  namestore_common.c
53 gnunet_service_namestore_LDADD = \
54   $(top_builddir)/src/statistics/libgnunetstatistics.la \
55   $(top_builddir)/src/util/libgnunetutil.la \
56   $(GN_LIBINTL)
57
58 if HAVE_SQLITE
59  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
60 endif
61
62 plugin_LTLIBRARIES = \
63   $(SQLITE_PLUGIN) 
64
65 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
66   plugin_namestore_sqlite.c
67 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
68   $(top_builddir)/src/statistics/libgnunetstatistics.la \
69   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
70 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
71  $(GN_PLUGIN_LDFLAGS)
72
73
74 test_namestore_api_SOURCES = \
75  test_namestore_api.c
76 test_namestore_api_LDADD = \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(top_builddir)/src/namestore/libgnunetnamestore.la
79   
80 test_namestore_api_zone_iteration_SOURCES = \
81  test_namestore_api_zone_iteration.c
82 test_namestore_api_zone_iteration_LDADD = \
83   $(top_builddir)/src/util/libgnunetutil.la \
84   $(top_builddir)/src/namestore/libgnunetnamestore.la  
85
86 test_namestore_record_serialization_SOURCES = \
87  test_namestore_record_serialization.c \
88  namestore_common.c
89 test_namestore_record_serialization_LDADD = \
90   $(top_builddir)/src/util/libgnunetutil.la \
91   $(top_builddir)/src/namestore/libgnunetnamestore.la  
92
93 EXTRA_DIST = \
94   test_namestore_api.conf \
95   test_plugin_namestore_sqlite.conf\
96   hostkey
97
98
99 test_plugin_namestore_sqlite_SOURCES = \
100  test_plugin_namestore.c
101 test_plugin_namestore_sqlite_LDADD = \
102  $(top_builddir)/src/util/libgnunetutil.la