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