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