ignore return values
[oweals/gnunet.git] / src / datastore / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 if MINGW
6   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
7 endif
8
9 if USE_COVERAGE
10   AM_CFLAGS = --coverage -O0
11   XLIBS = -lgcov
12 endif
13
14
15 lib_LTLIBRARIES = \
16   libgnunetdatastore.la
17
18 libgnunetdatastore_la_SOURCES = \
19   datastore_api.c datastore.h 
20 libgnunetdatastore_la_LIBADD = \
21   $(top_builddir)/src/statistics/libgnunetstatistics.la \
22   $(top_builddir)/src/util/libgnunetutil.la \
23   $(GN_LIBINTL) 
24 libgnunetdatastore_la_LDFLAGS = \
25   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
26   -version-info 0:0:0
27
28
29 bin_PROGRAMS = \
30  gnunet-service-datastore
31
32 gnunet_service_datastore_SOURCES = \
33  gnunet-service-datastore.c 
34 gnunet_service_datastore_LDADD = \
35   $(top_builddir)/src/statistics/libgnunetstatistics.la \
36   $(top_builddir)/src/util/libgnunetutil.la \
37   $(GN_LIBINTL)
38
39 if HAVE_MYSQL
40  MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la
41  MYSQL_TESTS = \
42   test_datastore_api_mysql \
43   test_datastore_api_management_mysql \
44   perf_datastore_api_mysql \
45   perf_plugin_datastore_mysql
46 endif
47 if HAVE_SQLITE
48  SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
49  SQLITE_TESTS = \
50   test_datastore_api_sqlite \
51   test_datastore_api_management_sqlite \
52   perf_datastore_api_sqlite \
53   perf_plugin_datastore_sqlite
54 endif
55 if HAVE_POSTGRES
56  POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
57  POSTGRES_TESTS = \
58   test_datastore_api_postgres \
59   test_datastore_api_management_postgres \
60   perf_datastore_api_postgres \
61   perf_plugin_datastore_postgres
62 endif
63
64 plugin_LTLIBRARIES = \
65   $(SQLITE_PLUGIN) \
66   $(MYSQL_PLUGIN) \
67   $(POSTGRES_PLUGIN) \
68   libgnunet_plugin_datastore_template.la 
69
70
71 libgnunet_plugin_datastore_sqlite_la_SOURCES = \
72   plugin_datastore_sqlite.c
73 libgnunet_plugin_datastore_sqlite_la_LIBADD = \
74   $(top_builddir)/src/statistics/libgnunetstatistics.la \
75   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
76 libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
77  $(GN_PLUGIN_LDFLAGS)
78
79
80 libgnunet_plugin_datastore_mysql_la_SOURCES = \
81   plugin_datastore_mysql.c
82 libgnunet_plugin_datastore_mysql_la_LIBADD = \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lmysqlclient
85 libgnunet_plugin_datastore_mysql_la_LDFLAGS = \
86  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
87 libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \
88  $(MYSQL_CPPFLAGS)
89
90 libgnunet_plugin_datastore_postgres_la_SOURCES = \
91   plugin_datastore_postgres.c
92 libgnunet_plugin_datastore_postgres_la_LIBADD = \
93   $(top_builddir)/src/statistics/libgnunetstatistics.la \
94   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq
95 libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
96  $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
97 libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
98  $(POSTGRES_CPPFLAGS)
99
100
101 libgnunet_plugin_datastore_template_la_SOURCES = \
102   plugin_datastore_template.c
103 libgnunet_plugin_datastore_template_la_LIBADD = \
104   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS)
105 libgnunet_plugin_datastore_template_la_LDFLAGS = \
106  $(GN_PLUGIN_LDFLAGS)
107
108 check_PROGRAMS = \
109   $(SQLITE_TESTS) \
110   $(MYSQL_TESTS) \
111   $(POSTGRES_TESTS)
112
113 if !DISABLE_TEST_RUN
114 TESTS = $(check_PROGRAMS)
115 endif
116
117 test_datastore_api_sqlite_SOURCES = \
118  test_datastore_api.c
119 test_datastore_api_sqlite_LDADD = \
120  $(top_builddir)/src/datastore/libgnunetdatastore.la \
121  $(top_builddir)/src/util/libgnunetutil.la  
122
123 test_datastore_api_management_sqlite_SOURCES = \
124  test_datastore_api_management.c
125 test_datastore_api_management_sqlite_LDADD = \
126  $(top_builddir)/src/datastore/libgnunetdatastore.la \
127  $(top_builddir)/src/util/libgnunetutil.la  
128
129 perf_datastore_api_sqlite_SOURCES = \
130  perf_datastore_api.c
131 perf_datastore_api_sqlite_LDADD = \
132  $(top_builddir)/src/datastore/libgnunetdatastore.la \
133  $(top_builddir)/src/util/libgnunetutil.la  
134
135 perf_plugin_datastore_sqlite_SOURCES = \
136  perf_plugin_datastore.c
137 perf_plugin_datastore_sqlite_LDADD = \
138  $(top_builddir)/src/util/libgnunetutil.la  
139
140
141 test_datastore_api_mysql_SOURCES = \
142  test_datastore_api.c
143 test_datastore_api_mysql_LDADD = \
144  $(top_builddir)/src/datastore/libgnunetdatastore.la \
145  $(top_builddir)/src/util/libgnunetutil.la  
146
147 test_datastore_api_management_mysql_SOURCES = \
148  test_datastore_api_management.c
149 test_datastore_api_management_mysql_LDADD = \
150  $(top_builddir)/src/datastore/libgnunetdatastore.la \
151  $(top_builddir)/src/util/libgnunetutil.la  
152
153 perf_datastore_api_mysql_SOURCES = \
154  perf_datastore_api.c
155 perf_datastore_api_mysql_LDADD = \
156  $(top_builddir)/src/datastore/libgnunetdatastore.la \
157  $(top_builddir)/src/util/libgnunetutil.la  
158
159 perf_plugin_datastore_mysql_SOURCES = \
160  perf_plugin_datastore.c
161 perf_plugin_datastore_mysql_LDADD = \
162  $(top_builddir)/src/util/libgnunetutil.la  
163
164
165 test_datastore_api_postgres_SOURCES = \
166  test_datastore_api.c
167 test_datastore_api_postgres_LDADD = \
168  $(top_builddir)/src/datastore/libgnunetdatastore.la \
169  $(top_builddir)/src/util/libgnunetutil.la  
170
171 test_datastore_api_management_postgres_SOURCES = \
172  test_datastore_api_management.c
173 test_datastore_api_management_postgres_LDADD = \
174  $(top_builddir)/src/datastore/libgnunetdatastore.la \
175  $(top_builddir)/src/util/libgnunetutil.la  
176
177 perf_datastore_api_postgres_SOURCES = \
178  perf_datastore_api.c
179 perf_datastore_api_postgres_LDADD = \
180  $(top_builddir)/src/datastore/libgnunetdatastore.la \
181  $(top_builddir)/src/util/libgnunetutil.la  
182
183 perf_plugin_datastore_postgres_SOURCES = \
184  perf_plugin_datastore.c
185 perf_plugin_datastore_postgres_LDADD = \
186  $(top_builddir)/src/util/libgnunetutil.la  
187
188
189 EXTRA_DIST = \
190  test_datastore_api_data_sqlite.conf \
191  perf_plugin_datastore_data_sqlite.conf \
192  test_datastore_api_data_mysql.conf \
193  perf_plugin_datastore_data_mysql.conf \
194  test_datastore_api_data_postgres.conf \
195  perf_plugin_datastore_data_postgres.conf