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