-LRN: fix
[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_zone_iteration \
29  test_namestore_record_serialization
30
31 lib_LTLIBRARIES = \
32   libgnunetnamestore.la
33
34 libgnunetnamestore_la_SOURCES = \
35   namestore_api.c namestore_common.c namestore.h
36 libgnunetnamestore_la_LIBADD = \
37   $(top_builddir)/src/statistics/libgnunetstatistics.la \
38   $(top_builddir)/src/util/libgnunetutil.la \
39   $(GN_LIBINTL) 
40 libgnunetnamestore_la_LDFLAGS = \
41   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
42   -version-info 0:0:0
43
44 bin_PROGRAMS = \
45  gnunet-service-namestore
46
47 gnunet_service_namestore_SOURCES = \
48  gnunet-service-namestore.c
49
50 gnunet_service_namestore_LDADD = \
51   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
52   $(top_builddir)/src/statistics/libgnunetstatistics.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   $(GN_LIBINTL)
55
56 if HAVE_SQLITE
57  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
58 endif
59
60 plugin_LTLIBRARIES = \
61   $(SQLITE_PLUGIN) 
62
63 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
64   plugin_namestore_sqlite.c
65 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
66   $(top_builddir)/src/statistics/libgnunetstatistics.la \
67   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
68 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
69  $(GN_PLUGIN_LDFLAGS)
70
71
72 test_namestore_api_SOURCES = \
73  test_namestore_api.c
74
75 test_namestore_api_LDADD = \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(top_builddir)/src/namestore/libgnunetnamestore.la
78
79 test_namestore_api_zone_iteration_SOURCES = \
80  test_namestore_api_zone_iteration.c
81
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
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