aboutsummaryrefslogtreecommitdiff
path: root/src/service/datastore/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/datastore/Makefile.am')
-rw-r--r--src/service/datastore/Makefile.am142
1 files changed, 142 insertions, 0 deletions
diff --git a/src/service/datastore/Makefile.am b/src/service/datastore/Makefile.am
new file mode 100644
index 000000000..22f98482a
--- /dev/null
+++ b/src/service/datastore/Makefile.am
@@ -0,0 +1,142 @@
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
10pkgcfg_DATA = \
11 datastore.conf
12
13if USE_COVERAGE
14 AM_CFLAGS = --coverage -O0
15 XLIBS = -lgcov
16endif
17
18
19lib_LTLIBRARIES = \
20 libgnunetdatastore.la
21
22libgnunetdatastore_la_SOURCES = \
23 datastore_api.c datastore.h
24libgnunetdatastore_la_LIBADD = \
25 $(top_builddir)/src/service/statistics/libgnunetstatistics.la \
26 $(top_builddir)/src/lib/util/libgnunetutil.la \
27 $(GN_LIBINTL)
28libgnunetdatastore_la_LDFLAGS = \
29 $(GN_LIB_LDFLAGS) \
30 -version-info 1:0:0
31
32libexec_PROGRAMS = \
33 gnunet-service-datastore
34
35gnunet_service_datastore_SOURCES = \
36 gnunet-service-datastore.c
37gnunet_service_datastore_LDADD = \
38 $(top_builddir)/src/service/statistics/libgnunetstatistics.la \
39 $(top_builddir)/src/lib/util/libgnunetutil.la \
40 $(GN_LIBINTL)
41
42if HAVE_SQLITE
43if HAVE_BENCHMARKS
44 SQLITE_BENCHMARKS = \
45 perf_datastore_api_sqlite
46endif
47 SQLITE_TESTS = \
48 test_datastore_api_sqlite \
49 test_datastore_api_management_sqlite \
50 $(SQLITE_BENCHMARKS)
51endif
52if HAVE_POSTGRESQL
53if HAVE_BENCHMARKS
54 POSTGRES_BENCHMARKS = \
55 perf_datastore_api_postgres
56endif
57 POSTGRES_TESTS = \
58 test_datastore_api_postgres \
59 test_datastore_api_management_postgres \
60 $(POSTGRES_BENCHMARKS)
61endif
62
63check_PROGRAMS = \
64 test_datastore_api_heap \
65 test_datastore_api_management_heap \
66 perf_datastore_api_heap \
67 $(SQLITE_TESTS) \
68 $(POSTGRES_TESTS)
69
70if ENABLE_TEST_RUN
71AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
72TESTS = $(check_PROGRAMS)
73endif
74
75test_datastore_api_heap_SOURCES = \
76 test_datastore_api.c
77test_datastore_api_heap_LDADD = \
78 $(top_builddir)/src/service/testing/libgnunettesting.la \
79 libgnunetdatastore.la \
80 $(top_builddir)/src/lib/util/libgnunetutil.la
81
82test_datastore_api_management_heap_SOURCES = \
83 test_datastore_api_management.c
84test_datastore_api_management_heap_LDADD = \
85 $(top_builddir)/src/service/testing/libgnunettesting.la \
86 libgnunetdatastore.la \
87 $(top_builddir)/src/lib/util/libgnunetutil.la
88
89perf_datastore_api_heap_SOURCES = \
90 perf_datastore_api.c
91perf_datastore_api_heap_LDADD = \
92 $(top_builddir)/src/service/testing/libgnunettesting.la \
93 libgnunetdatastore.la \
94 $(top_builddir)/src/lib/util/libgnunetutil.la
95
96test_datastore_api_sqlite_SOURCES = \
97 test_datastore_api.c
98test_datastore_api_sqlite_LDADD = \
99 $(top_builddir)/src/service/testing/libgnunettesting.la \
100 libgnunetdatastore.la \
101 $(top_builddir)/src/lib/util/libgnunetutil.la
102
103test_datastore_api_management_sqlite_SOURCES = \
104 test_datastore_api_management.c
105test_datastore_api_management_sqlite_LDADD = \
106 $(top_builddir)/src/service/testing/libgnunettesting.la \
107 libgnunetdatastore.la \
108 $(top_builddir)/src/lib/util/libgnunetutil.la
109
110perf_datastore_api_sqlite_SOURCES = \
111 perf_datastore_api.c
112perf_datastore_api_sqlite_LDADD = \
113 $(top_builddir)/src/service/testing/libgnunettesting.la \
114 libgnunetdatastore.la \
115 $(top_builddir)/src/lib/util/libgnunetutil.la
116
117test_datastore_api_postgres_SOURCES = \
118 test_datastore_api.c
119test_datastore_api_postgres_LDADD = \
120 $(top_builddir)/src/service/testing/libgnunettesting.la \
121 libgnunetdatastore.la \
122 $(top_builddir)/src/lib/util/libgnunetutil.la
123
124test_datastore_api_management_postgres_SOURCES = \
125 test_datastore_api_management.c
126test_datastore_api_management_postgres_LDADD = \
127 $(top_builddir)/src/service/testing/libgnunettesting.la \
128 libgnunetdatastore.la \
129 $(top_builddir)/src/lib/util/libgnunetutil.la
130
131perf_datastore_api_postgres_SOURCES = \
132 perf_datastore_api.c
133perf_datastore_api_postgres_LDADD = \
134 $(top_builddir)/src/service/testing/libgnunettesting.la \
135 libgnunetdatastore.la \
136 $(top_builddir)/src/lib/util/libgnunetutil.la
137
138EXTRA_DIST = \
139 test_defaults.conf \
140 test_datastore_api_data_sqlite.conf \
141 test_datastore_api_data_heap.conf \
142 test_datastore_api_data_postgres.conf