improving datastore API --- not working yet
[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 if HAVE_EXPERIMENTAL
41  MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la
42  MYSQL_TESTS = \
43   test_datastore_api_mysql \
44   test_datastore_api_management_mysql \
45   perf_datastore_api_mysql \
46   perf_plugin_datastore_mysql
47 endif
48 endif
49 if HAVE_SQLITE
50  SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
51  SQLITE_TESTS = \
52   test_datastore_api_sqlite \
53   test_datastore_api_management_sqlite \
54   perf_datastore_api_sqlite \
55   perf_plugin_datastore_sqlite
56 endif
57 if HAVE_POSTGRES
58 if HAVE_EXPERIMENTAL
59  POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
60  POSTGRES_TESTS = \
61   test_datastore_api_postgres \
62   test_datastore_api_management_postgres \
63   perf_datastore_api_postgres \
64   perf_plugin_datastore_postgres
65 endif
66 endif
67
68 plugin_LTLIBRARIES = \
69   $(SQLITE_PLUGIN) \
70   $(MYSQL_PLUGIN) \
71   $(POSTGRES_PLUGIN) \
72   libgnunet_plugin_datastore_template.la 
73
74
75 libgnunet_plugin_datastore_sqlite_la_SOURCES = \
76   plugin_datastore_sqlite.c
77 libgnunet_plugin_datastore_sqlite_la_LIBADD = \
78   $(top_builddir)/src/statistics/libgnunetstatistics.la \
79   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
80 libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
81  $(GN_PLUGIN_LDFLAGS)
82
83
84 libgnunet_plugin_datastore_mysql_la_SOURCES = \
85   plugin_datastore_mysql.c
86 libgnunet_plugin_datastore_mysql_la_LIBADD = \
87   $(top_builddir)/src/statistics/libgnunetstatistics.la \
88   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lmysqlclient
89 libgnunet_plugin_datastore_mysql_la_LDFLAGS = \
90  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
91 libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \
92  $(MYSQL_CPPFLAGS)
93
94 libgnunet_plugin_datastore_postgres_la_SOURCES = \
95   plugin_datastore_postgres.c
96 libgnunet_plugin_datastore_postgres_la_LIBADD = \
97   $(top_builddir)/src/statistics/libgnunetstatistics.la \
98   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq
99 libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
100  $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
101 libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
102  $(POSTGRES_CPPFLAGS)
103
104
105 libgnunet_plugin_datastore_template_la_SOURCES = \
106   plugin_datastore_template.c
107 libgnunet_plugin_datastore_template_la_LIBADD = \
108   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS)
109 libgnunet_plugin_datastore_template_la_LDFLAGS = \
110  $(GN_PLUGIN_LDFLAGS)
111
112 check_PROGRAMS = \
113   $(SQLITE_TESTS) \
114   $(MYSQL_TESTS) \
115   $(POSTGRES_TESTS)
116
117 if !DISABLE_TEST_RUN
118 TESTS = $(check_PROGRAMS)
119 endif
120
121 test_datastore_api_sqlite_SOURCES = \
122  test_datastore_api.c
123 test_datastore_api_sqlite_LDADD = \
124  $(top_builddir)/src/datastore/libgnunetdatastore.la \
125  $(top_builddir)/src/util/libgnunetutil.la  
126
127 test_datastore_api_management_sqlite_SOURCES = \
128  test_datastore_api_management.c
129 test_datastore_api_management_sqlite_LDADD = \
130  $(top_builddir)/src/datastore/libgnunetdatastore.la \
131  $(top_builddir)/src/util/libgnunetutil.la  
132
133 perf_datastore_api_sqlite_SOURCES = \
134  perf_datastore_api.c
135 perf_datastore_api_sqlite_LDADD = \
136  $(top_builddir)/src/datastore/libgnunetdatastore.la \
137  $(top_builddir)/src/util/libgnunetutil.la  
138
139 perf_plugin_datastore_sqlite_SOURCES = \
140  perf_plugin_datastore.c
141 perf_plugin_datastore_sqlite_LDADD = \
142  $(top_builddir)/src/util/libgnunetutil.la  
143
144
145 test_datastore_api_mysql_SOURCES = \
146  test_datastore_api.c
147 test_datastore_api_mysql_LDADD = \
148  $(top_builddir)/src/datastore/libgnunetdatastore.la \
149  $(top_builddir)/src/util/libgnunetutil.la  
150
151 test_datastore_api_management_mysql_SOURCES = \
152  test_datastore_api_management.c
153 test_datastore_api_management_mysql_LDADD = \
154  $(top_builddir)/src/datastore/libgnunetdatastore.la \
155  $(top_builddir)/src/util/libgnunetutil.la  
156
157 perf_datastore_api_mysql_SOURCES = \
158  perf_datastore_api.c
159 perf_datastore_api_mysql_LDADD = \
160  $(top_builddir)/src/datastore/libgnunetdatastore.la \
161  $(top_builddir)/src/util/libgnunetutil.la  
162
163 perf_plugin_datastore_mysql_SOURCES = \
164  perf_plugin_datastore.c
165 perf_plugin_datastore_mysql_LDADD = \
166  $(top_builddir)/src/util/libgnunetutil.la  
167
168
169 test_datastore_api_postgres_SOURCES = \
170  test_datastore_api.c
171 test_datastore_api_postgres_LDADD = \
172  $(top_builddir)/src/datastore/libgnunetdatastore.la \
173  $(top_builddir)/src/util/libgnunetutil.la  
174
175 test_datastore_api_management_postgres_SOURCES = \
176  test_datastore_api_management.c
177 test_datastore_api_management_postgres_LDADD = \
178  $(top_builddir)/src/datastore/libgnunetdatastore.la \
179  $(top_builddir)/src/util/libgnunetutil.la  
180
181 perf_datastore_api_postgres_SOURCES = \
182  perf_datastore_api.c
183 perf_datastore_api_postgres_LDADD = \
184  $(top_builddir)/src/datastore/libgnunetdatastore.la \
185  $(top_builddir)/src/util/libgnunetutil.la  
186
187 perf_plugin_datastore_postgres_SOURCES = \
188  perf_plugin_datastore.c
189 perf_plugin_datastore_postgres_LDADD = \
190  $(top_builddir)/src/util/libgnunetutil.la  
191
192
193 EXTRA_DIST = \
194  test_datastore_api_data_sqlite.conf \
195  perf_plugin_datastore_data_sqlite.conf \
196  test_datastore_api_data_mysql.conf \
197  perf_plugin_datastore_data_mysql.conf \
198  test_datastore_api_data_postgres.conf \
199  perf_plugin_datastore_data_postgres.conf