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