rescheduling sessions for udp
[oweals/gnunet.git] / src / datacache / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 pkgcfgdir= $(pkgdatadir)/config.d/
6
7 dist_pkgcfg_DATA = \
8   datacache.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_PLUGIN = libgnunet_plugin_datacache_sqlite.la
21 endif
22 if HAVE_POSTGRES
23   POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la
24 endif
25
26 lib_LTLIBRARIES = \
27   libgnunetdatacache.la
28
29 libgnunetdatacache_la_SOURCES = \
30   datacache.c 
31 libgnunetdatacache_la_LIBADD = \
32   $(top_builddir)/src/statistics/libgnunetstatistics.la \
33   $(top_builddir)/src/util/libgnunetutil.la \
34   $(GN_LIBINTL) 
35 libgnunetdatacache_la_LDFLAGS = \
36   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
37   -version-info 0:1:0
38
39
40 plugin_LTLIBRARIES = \
41   $(SQLITE_PLUGIN) \
42   $(POSTGRES_PLUGIN) \
43   libgnunet_plugin_datacache_heap.la \
44   libgnunet_plugin_datacache_template.la 
45
46
47 libgnunet_plugin_datacache_sqlite_la_SOURCES = \
48   plugin_datacache_sqlite.c
49 libgnunet_plugin_datacache_sqlite_la_LIBADD = \
50   $(top_builddir)/src/statistics/libgnunetstatistics.la \
51   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
52   $(LTLIBINTL)
53 libgnunet_plugin_datacache_sqlite_la_LDFLAGS = \
54  $(GN_PLUGIN_LDFLAGS)
55
56 libgnunet_plugin_datacache_heap_la_SOURCES = \
57   plugin_datacache_heap.c
58 libgnunet_plugin_datacache_heap_la_LIBADD = \
59   $(top_builddir)/src/statistics/libgnunetstatistics.la \
60   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
61   $(LTLIBINTL)
62 libgnunet_plugin_datacache_heap_la_LDFLAGS = \
63  $(GN_PLUGIN_LDFLAGS)
64
65 libgnunet_plugin_datacache_postgres_la_SOURCES = \
66   plugin_datacache_postgres.c
67 libgnunet_plugin_datacache_postgres_la_LIBADD = \
68   $(top_builddir)/src/postgres/libgnunetpostgres.la \
69   $(top_builddir)/src/statistics/libgnunetstatistics.la \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
72 libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \
73  $(POSTGRES_CPPFLAGS) $(AM_CPPFLAGS)
74 libgnunet_plugin_datacache_postgres_la_LDFLAGS = \
75  $(GN_PLUGIN_LDFLAGS) $(POSTGRES_LDFLAGS) -lpq
76
77 libgnunet_plugin_datacache_template_la_SOURCES = \
78   plugin_datacache_template.c
79 libgnunet_plugin_datacache_template_la_LIBADD = \
80   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
81   $(LTLIBINTL)
82 libgnunet_plugin_datacache_template_la_LDFLAGS = \
83  $(GN_PLUGIN_LDFLAGS)
84
85
86 if HAVE_TESTING
87 if HAVE_SQLITE
88 if HAVE_BENCHMARKS
89  SQLITE_BENCHMARKS = \
90   perf_datacache_sqlite
91 endif
92 SQLITE_TESTS = \
93  test_datacache_sqlite \
94  test_datacache_quota_sqlite \
95  $(SQLITE_BENCHMARKS)
96 endif
97
98 if HAVE_BENCHMARKS
99  HEAP_BENCHMARKS = \
100   perf_datacache_heap
101 endif
102 HEAP_TESTS = \
103  test_datacache_heap \
104  test_datacache_quota_heap \
105  $(HEAP_BENCHMARKS)
106
107 if HAVE_POSTGRES
108 if HAVE_BENCHMARKS
109  POSTGRES_BENCHMARKS = \
110   perf_datacache_postgres
111 endif
112 POSTGRES_TESTS = \
113  test_datacache_postgres \
114  test_datacache_quota_postgres \
115  $(POSTGRES_BENCHMARKS)
116 endif
117 endif
118
119 check_PROGRAMS = \
120  $(SQLITE_TESTS) \
121  $(HEAP_TESTS) \
122  $(POSTGRES_TESTS) 
123
124 if ENABLE_TEST_RUN
125 TESTS = $(check_PROGRAMS)
126 endif
127
128 test_datacache_sqlite_SOURCES = \
129  test_datacache.c
130 test_datacache_sqlite_LDADD = \
131  $(top_builddir)/src/testing/libgnunettesting.la \
132  $(top_builddir)/src/datacache/libgnunetdatacache.la \
133  $(top_builddir)/src/util/libgnunetutil.la  
134
135 test_datacache_quota_sqlite_SOURCES = \
136  test_datacache_quota.c
137 test_datacache_quota_sqlite_LDADD = \
138  $(top_builddir)/src/testing/libgnunettesting.la \
139  $(top_builddir)/src/datacache/libgnunetdatacache.la \
140  $(top_builddir)/src/util/libgnunetutil.la  
141
142 perf_datacache_sqlite_SOURCES = \
143  perf_datacache.c
144 perf_datacache_sqlite_LDADD = \
145  $(top_builddir)/src/testing/libgnunettesting.la \
146  $(top_builddir)/src/datacache/libgnunetdatacache.la \
147  $(top_builddir)/src/util/libgnunetutil.la  
148
149 test_datacache_heap_SOURCES = \
150  test_datacache.c
151 test_datacache_heap_LDADD = \
152  $(top_builddir)/src/testing/libgnunettesting.la \
153  $(top_builddir)/src/datacache/libgnunetdatacache.la \
154  $(top_builddir)/src/util/libgnunetutil.la  
155
156 test_datacache_quota_heap_SOURCES = \
157  test_datacache_quota.c
158 test_datacache_quota_heap_LDADD = \
159  $(top_builddir)/src/testing/libgnunettesting.la \
160  $(top_builddir)/src/datacache/libgnunetdatacache.la \
161  $(top_builddir)/src/util/libgnunetutil.la  
162
163 perf_datacache_heap_SOURCES = \
164  perf_datacache.c
165 perf_datacache_heap_LDADD = \
166  $(top_builddir)/src/testing/libgnunettesting.la \
167  $(top_builddir)/src/datacache/libgnunetdatacache.la \
168  $(top_builddir)/src/util/libgnunetutil.la  
169
170 test_datacache_postgres_SOURCES = \
171  test_datacache.c
172 test_datacache_postgres_LDADD = \
173  $(top_builddir)/src/testing/libgnunettesting.la \
174  $(top_builddir)/src/datacache/libgnunetdatacache.la \
175  $(top_builddir)/src/util/libgnunetutil.la  
176
177 test_datacache_quota_postgres_SOURCES = \
178  test_datacache_quota.c
179 test_datacache_quota_postgres_LDADD = \
180  $(top_builddir)/src/testing/libgnunettesting.la \
181  $(top_builddir)/src/datacache/libgnunetdatacache.la \
182  $(top_builddir)/src/util/libgnunetutil.la  
183
184 perf_datacache_postgres_SOURCES = \
185  perf_datacache.c
186 perf_datacache_postgres_LDADD = \
187  $(top_builddir)/src/testing/libgnunettesting.la \
188  $(top_builddir)/src/datacache/libgnunetdatacache.la \
189  $(top_builddir)/src/util/libgnunetutil.la  
190
191 EXTRA_DIST = \
192  test_datacache_data_sqlite.conf \
193  perf_datacache_data_sqlite.conf \
194  test_datacache_data_heap.conf \
195  perf_datacache_data_heap.conf \
196  test_datacache_data_postgres.conf \
197  perf_datacache_data_postgres.conf