- run tests
[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  test_namestore_api \
28  test_namestore_api_put \
29  test_namestore_api_lookup \
30  test_namestore_api_zone_iteration \
31  test_namestore_record_serialization
32
33 if ENABLE_TEST_RUN
34 TESTS = $(check_PROGRAMS)
35 endif
36
37 lib_LTLIBRARIES = \
38   libgnunetnamestore.la
39
40 libgnunetnamestore_la_SOURCES = \
41   namestore_api.c namestore_common.c namestore.h
42 libgnunetnamestore_la_LIBADD = \
43   $(top_builddir)/src/statistics/libgnunetstatistics.la \
44   $(top_builddir)/src/util/libgnunetutil.la \
45   $(GN_LIBINTL) 
46 libgnunetnamestore_la_LDFLAGS = \
47   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
48   -version-info 0:0:0
49
50 bin_PROGRAMS = \
51  gnunet-service-namestore
52
53 gnunet_service_namestore_SOURCES = \
54  gnunet-service-namestore.c
55
56 gnunet_service_namestore_LDADD = \
57   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
58   $(top_builddir)/src/statistics/libgnunetstatistics.la \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   libgnunetnamestore.la \
61   $(GN_LIBINTL)
62
63 if HAVE_SQLITE
64  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
65 endif
66
67 plugin_LTLIBRARIES = \
68   $(SQLITE_PLUGIN) 
69
70 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
71   plugin_namestore_sqlite.c
72 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
73   $(top_builddir)/src/statistics/libgnunetstatistics.la \
74   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
75 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
76  $(GN_PLUGIN_LDFLAGS)
77
78 test_namestore_api_SOURCES = \
79  test_namestore_api.c
80 test_namestore_api_LDADD = \
81   $(top_builddir)/src/util/libgnunetutil.la \
82   $(top_builddir)/src/namestore/libgnunetnamestore.la
83
84 test_namestore_api_put_SOURCES = \
85  test_namestore_api_put.c
86 test_namestore_api_put_LDADD = \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   $(top_builddir)/src/namestore/libgnunetnamestore.la
89
90 test_namestore_api_lookup_SOURCES = \
91  test_namestore_api_lookup.c
92 test_namestore_api_lookup_LDADD = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/namestore/libgnunetnamestore.la
95
96 test_namestore_api_zone_iteration_SOURCES = \
97  test_namestore_api_zone_iteration.c
98 test_namestore_api_zone_iteration_LDADD = \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(top_builddir)/src/namestore/libgnunetnamestore.la  
101
102 test_namestore_record_serialization_SOURCES = \
103  test_namestore_record_serialization.c
104 test_namestore_record_serialization_LDADD = \
105   $(top_builddir)/src/util/libgnunetutil.la \
106   $(top_builddir)/src/namestore/libgnunetnamestore.la  
107
108 EXTRA_DIST = \
109   test_namestore_api.conf \
110   test_plugin_namestore_sqlite.conf\
111   hostkey
112
113
114 test_plugin_namestore_sqlite_SOURCES = \
115  test_plugin_namestore.c
116 test_plugin_namestore_sqlite_LDADD = \
117  $(top_builddir)/src/util/libgnunetutil.la