5f2e23e8bdfb1fd463bcd8defe12b4033d2f1125
[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_put \
29  test_namestore_api_lookup \
30  test_namestore_api_create \
31  test_namestore_api_remove \
32  test_namestore_api_zone_iteration \
33  test_namestore_record_serialization
34
35 if ENABLE_TEST_RUN
36 TESTS = $(check_PROGRAMS)
37 endif
38
39 lib_LTLIBRARIES = \
40   libgnunetnamestore.la
41
42 libgnunetnamestore_la_SOURCES = \
43   namestore_api.c namestore_common.c namestore.h
44 libgnunetnamestore_la_LIBADD = \
45   $(top_builddir)/src/statistics/libgnunetstatistics.la \
46   $(top_builddir)/src/util/libgnunetutil.la \
47   $(GN_LIBINTL) 
48 libgnunetnamestore_la_LDFLAGS = \
49   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
50   -version-info 0:0:0
51
52 bin_PROGRAMS = \
53  gnunet-service-namestore
54
55 gnunet_service_namestore_SOURCES = \
56  gnunet-service-namestore.c
57
58 gnunet_service_namestore_LDADD = \
59   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
60   $(top_builddir)/src/statistics/libgnunetstatistics.la \
61   $(top_builddir)/src/util/libgnunetutil.la \
62   libgnunetnamestore.la \
63   $(GN_LIBINTL)
64
65 if HAVE_SQLITE
66  SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
67 endif
68
69 plugin_LTLIBRARIES = \
70   $(SQLITE_PLUGIN) 
71
72 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
73   plugin_namestore_sqlite.c
74 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
75   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
76   $(top_builddir)/src/statistics/libgnunetstatistics.la \
77   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
78 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
79  $(GN_PLUGIN_LDFLAGS)
80
81 test_namestore_api_SOURCES = \
82  test_namestore_api.c
83 test_namestore_api_LDADD = \
84   $(top_builddir)/src/util/libgnunetutil.la \
85   $(top_builddir)/src/namestore/libgnunetnamestore.la
86
87 test_namestore_api_put_SOURCES = \
88  test_namestore_api_put.c
89 test_namestore_api_put_LDADD = \
90   $(top_builddir)/src/util/libgnunetutil.la \
91   $(top_builddir)/src/namestore/libgnunetnamestore.la
92
93 test_namestore_api_lookup_SOURCES = \
94  test_namestore_api_lookup.c
95 test_namestore_api_lookup_LDADD = \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/namestore/libgnunetnamestore.la
98
99 test_namestore_api_create_SOURCES = \
100  test_namestore_api_create.c
101 test_namestore_api_create_LDADD = \
102   $(top_builddir)/src/util/libgnunetutil.la \
103   $(top_builddir)/src/namestore/libgnunetnamestore.la
104
105 test_namestore_api_remove_SOURCES = \
106  test_namestore_api_remove.c
107 test_namestore_api_remove_LDADD = \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   $(top_builddir)/src/namestore/libgnunetnamestore.la
110
111
112 test_namestore_api_zone_iteration_SOURCES = \
113  test_namestore_api_zone_iteration.c
114 test_namestore_api_zone_iteration_LDADD = \
115   $(top_builddir)/src/util/libgnunetutil.la \
116   $(top_builddir)/src/namestore/libgnunetnamestore.la  
117
118 test_namestore_record_serialization_SOURCES = \
119  test_namestore_record_serialization.c
120 test_namestore_record_serialization_LDADD = \
121   $(top_builddir)/src/util/libgnunetutil.la \
122   $(top_builddir)/src/namestore/libgnunetnamestore.la  
123
124 EXTRA_DIST = \
125   test_namestore_api.conf \
126   test_plugin_namestore_sqlite.conf\
127   hostkey
128
129
130 test_plugin_namestore_sqlite_SOURCES = \
131  test_plugin_namestore.c
132 test_plugin_namestore_sqlite_LDADD = \
133  $(top_builddir)/src/util/libgnunetutil.la