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