aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/datastore/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin/datastore/Makefile.am')
-rw-r--r--src/plugin/datastore/Makefile.am144
1 files changed, 144 insertions, 0 deletions
diff --git a/src/plugin/datastore/Makefile.am b/src/plugin/datastore/Makefile.am
new file mode 100644
index 000000000..bde7321dd
--- /dev/null
+++ b/src/plugin/datastore/Makefile.am
@@ -0,0 +1,144 @@
1# This Makefile.am is in the public domain
2AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4plugindir = $(libdir)/gnunet
5
6pkgcfgdir= $(pkgdatadir)/config.d/
7
8libexecdir= $(pkglibdir)/libexec/
9
10sqldir = $(prefix)/share/gnunet/sql/
11
12sql_DATA = \
13 datastore-0001.sql \
14 datastore-drop.sql
15
16if USE_COVERAGE
17 AM_CFLAGS = --coverage -O0
18 XLIBS = -lgcov
19endif
20
21
22if HAVE_SQLITE
23 SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
24if HAVE_BENCHMARKS
25 SQLITE_BENCHMARKS = \
26 perf_plugin_datastore_sqlite
27endif
28 SQLITE_TESTS = \
29 test_plugin_datastore_sqlite \
30 $(SQLITE_BENCHMARKS)
31endif
32if HAVE_POSTGRESQL
33 POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la
34if HAVE_BENCHMARKS
35 POSTGRES_BENCHMARKS = \
36 perf_plugin_datastore_postgres
37endif
38 POSTGRES_TESTS = \
39 test_plugin_datastore_postgres \
40 $(POSTGRES_BENCHMARKS)
41endif
42
43plugin_LTLIBRARIES = \
44 $(SQLITE_PLUGIN) \
45 $(POSTGRES_PLUGIN) \
46 libgnunet_plugin_datastore_heap.la
47
48# Real plugins should of course go into
49# plugin_LTLIBRARIES
50noinst_LTLIBRARIES = \
51 libgnunet_plugin_datastore_template.la
52
53
54libgnunet_plugin_datastore_sqlite_la_SOURCES = \
55 plugin_datastore_sqlite.c
56libgnunet_plugin_datastore_sqlite_la_LIBADD = \
57 $(top_builddir)/src/lib/sq/libgnunetsq.la \
58 $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
59 $(LTLIBINTL)
60libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
61 $(GN_PLUGIN_LDFLAGS)
62
63
64libgnunet_plugin_datastore_heap_la_SOURCES = \
65 plugin_datastore_heap.c
66libgnunet_plugin_datastore_heap_la_LIBADD = \
67 $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \
68 $(LTLIBINTL)
69libgnunet_plugin_datastore_heap_la_LDFLAGS = \
70 $(GN_PLUGIN_LDFLAGS)
71
72
73libgnunet_plugin_datastore_postgres_la_SOURCES = \
74 plugin_datastore_postgres.c
75libgnunet_plugin_datastore_postgres_la_LIBADD = \
76 $(top_builddir)/src/lib/pq/libgnunetpq.la \
77 $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lpq
78libgnunet_plugin_datastore_postgres_la_LDFLAGS = \
79 $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)
80libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \
81 $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS)
82
83
84libgnunet_plugin_datastore_template_la_SOURCES = \
85 plugin_datastore_template.c
86libgnunet_plugin_datastore_template_la_LIBADD = \
87 $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \
88 $(LTLIBINTL)
89libgnunet_plugin_datastore_template_la_LDFLAGS = \
90 $(GN_PLUGIN_LDFLAGS)
91
92check_PROGRAMS = \
93 perf_plugin_datastore_heap \
94 test_plugin_datastore_heap \
95 $(SQLITE_TESTS) \
96 $(POSTGRES_TESTS)
97
98if ENABLE_TEST_RUN
99AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
100TESTS = $(check_PROGRAMS)
101endif
102
103perf_plugin_datastore_heap_SOURCES = \
104 perf_plugin_datastore.c
105perf_plugin_datastore_heap_LDADD = \
106 $(top_builddir)/src/lib/util/libgnunetutil.la
107
108test_plugin_datastore_heap_SOURCES = \
109 test_plugin_datastore.c
110test_plugin_datastore_heap_LDADD = \
111 $(top_builddir)/src/lib/util/libgnunetutil.la
112
113
114perf_plugin_datastore_sqlite_SOURCES = \
115 perf_plugin_datastore.c
116perf_plugin_datastore_sqlite_LDADD = \
117 $(top_builddir)/src/lib/util/libgnunetutil.la
118
119test_plugin_datastore_sqlite_SOURCES = \
120 test_plugin_datastore.c
121test_plugin_datastore_sqlite_LDADD = \
122 $(top_builddir)/src/lib/util/libgnunetutil.la
123
124
125test_plugin_datastore_postgres_SOURCES = \
126 test_plugin_datastore.c
127test_plugin_datastore_postgres_LDADD = \
128 $(top_builddir)/src/lib/util/libgnunetutil.la
129
130perf_plugin_datastore_postgres_SOURCES = \
131 perf_plugin_datastore.c
132perf_plugin_datastore_postgres_LDADD = \
133 $(top_builddir)/src/lib/util/libgnunetutil.la
134
135
136EXTRA_DIST = \
137 test_defaults.conf \
138 perf_plugin_datastore_data_sqlite.conf \
139 test_plugin_datastore_data_sqlite.conf \
140 perf_plugin_datastore_data_heap.conf \
141 test_plugin_datastore_data_heap.conf \
142 perf_plugin_datastore_data_postgres.conf \
143 test_plugin_datastore_data_postgres.conf \
144 $(sql_DATA)