00c1cd21204a99c3f47913f6ba265835c6b88831
[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 endif
31
32 if HAVE_EXPERIMENTAL
33 lib_LTLIBRARIES = \
34   libgnunetnamestore.la
35 endif
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 gnunet_service_namestore_LDADD = \
53   $(top_builddir)/src/statistics/libgnunetstatistics.la \
54   $(top_builddir)/src/util/libgnunetutil.la \
55   $(GN_LIBINTL)
56
57 if HAVE_SQLITE
58  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
59 endif
60
61 plugin_LTLIBRARIES = \
62   $(SQLITE_PLUGIN) 
63
64 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
65   plugin_namestore_sqlite.c
66 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
67   $(top_builddir)/src/statistics/libgnunetstatistics.la \
68   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
69 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
70  $(GN_PLUGIN_LDFLAGS)
71
72
73 test_namestore_api_SOURCES = \
74  test_namestore_api.c
75 test_namestore_api_LDADD = \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(top_builddir)/src/namestore/libgnunetnamestore.la
78
79 EXTRADIST = \
80   test_namestore_api.conf \
81   test_plugin_namestore_sqlite.conf
82
83
84 test_plugin_namestore_sqlite_SOURCES = \
85  test_plugin_namestore.c
86 test_plugin_namestore_sqlite_LDADD = \
87  $(top_builddir)/src/util/libgnunetutil.la