diff options
Diffstat (limited to 'src/plugin/datastore/Makefile.am')
-rw-r--r-- | src/plugin/datastore/Makefile.am | 144 |
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 | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | ||
3 | |||
4 | plugindir = $(libdir)/gnunet | ||
5 | |||
6 | pkgcfgdir= $(pkgdatadir)/config.d/ | ||
7 | |||
8 | libexecdir= $(pkglibdir)/libexec/ | ||
9 | |||
10 | sqldir = $(prefix)/share/gnunet/sql/ | ||
11 | |||
12 | sql_DATA = \ | ||
13 | datastore-0001.sql \ | ||
14 | datastore-drop.sql | ||
15 | |||
16 | if USE_COVERAGE | ||
17 | AM_CFLAGS = --coverage -O0 | ||
18 | XLIBS = -lgcov | ||
19 | endif | ||
20 | |||
21 | |||
22 | if HAVE_SQLITE | ||
23 | SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la | ||
24 | if HAVE_BENCHMARKS | ||
25 | SQLITE_BENCHMARKS = \ | ||
26 | perf_plugin_datastore_sqlite | ||
27 | endif | ||
28 | SQLITE_TESTS = \ | ||
29 | test_plugin_datastore_sqlite \ | ||
30 | $(SQLITE_BENCHMARKS) | ||
31 | endif | ||
32 | if HAVE_POSTGRESQL | ||
33 | POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la | ||
34 | if HAVE_BENCHMARKS | ||
35 | POSTGRES_BENCHMARKS = \ | ||
36 | perf_plugin_datastore_postgres | ||
37 | endif | ||
38 | POSTGRES_TESTS = \ | ||
39 | test_plugin_datastore_postgres \ | ||
40 | $(POSTGRES_BENCHMARKS) | ||
41 | endif | ||
42 | |||
43 | plugin_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 | ||
50 | noinst_LTLIBRARIES = \ | ||
51 | libgnunet_plugin_datastore_template.la | ||
52 | |||
53 | |||
54 | libgnunet_plugin_datastore_sqlite_la_SOURCES = \ | ||
55 | plugin_datastore_sqlite.c | ||
56 | libgnunet_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) | ||
60 | libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \ | ||
61 | $(GN_PLUGIN_LDFLAGS) | ||
62 | |||
63 | |||
64 | libgnunet_plugin_datastore_heap_la_SOURCES = \ | ||
65 | plugin_datastore_heap.c | ||
66 | libgnunet_plugin_datastore_heap_la_LIBADD = \ | ||
67 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
68 | $(LTLIBINTL) | ||
69 | libgnunet_plugin_datastore_heap_la_LDFLAGS = \ | ||
70 | $(GN_PLUGIN_LDFLAGS) | ||
71 | |||
72 | |||
73 | libgnunet_plugin_datastore_postgres_la_SOURCES = \ | ||
74 | plugin_datastore_postgres.c | ||
75 | libgnunet_plugin_datastore_postgres_la_LIBADD = \ | ||
76 | $(top_builddir)/src/lib/pq/libgnunetpq.la \ | ||
77 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lpq | ||
78 | libgnunet_plugin_datastore_postgres_la_LDFLAGS = \ | ||
79 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) | ||
80 | libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \ | ||
81 | $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS) | ||
82 | |||
83 | |||
84 | libgnunet_plugin_datastore_template_la_SOURCES = \ | ||
85 | plugin_datastore_template.c | ||
86 | libgnunet_plugin_datastore_template_la_LIBADD = \ | ||
87 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
88 | $(LTLIBINTL) | ||
89 | libgnunet_plugin_datastore_template_la_LDFLAGS = \ | ||
90 | $(GN_PLUGIN_LDFLAGS) | ||
91 | |||
92 | check_PROGRAMS = \ | ||
93 | perf_plugin_datastore_heap \ | ||
94 | test_plugin_datastore_heap \ | ||
95 | $(SQLITE_TESTS) \ | ||
96 | $(POSTGRES_TESTS) | ||
97 | |||
98 | if ENABLE_TEST_RUN | ||
99 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; | ||
100 | TESTS = $(check_PROGRAMS) | ||
101 | endif | ||
102 | |||
103 | perf_plugin_datastore_heap_SOURCES = \ | ||
104 | perf_plugin_datastore.c | ||
105 | perf_plugin_datastore_heap_LDADD = \ | ||
106 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
107 | |||
108 | test_plugin_datastore_heap_SOURCES = \ | ||
109 | test_plugin_datastore.c | ||
110 | test_plugin_datastore_heap_LDADD = \ | ||
111 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
112 | |||
113 | |||
114 | perf_plugin_datastore_sqlite_SOURCES = \ | ||
115 | perf_plugin_datastore.c | ||
116 | perf_plugin_datastore_sqlite_LDADD = \ | ||
117 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
118 | |||
119 | test_plugin_datastore_sqlite_SOURCES = \ | ||
120 | test_plugin_datastore.c | ||
121 | test_plugin_datastore_sqlite_LDADD = \ | ||
122 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
123 | |||
124 | |||
125 | test_plugin_datastore_postgres_SOURCES = \ | ||
126 | test_plugin_datastore.c | ||
127 | test_plugin_datastore_postgres_LDADD = \ | ||
128 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
129 | |||
130 | perf_plugin_datastore_postgres_SOURCES = \ | ||
131 | perf_plugin_datastore.c | ||
132 | perf_plugin_datastore_postgres_LDADD = \ | ||
133 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
134 | |||
135 | |||
136 | EXTRA_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) | ||