aboutsummaryrefslogtreecommitdiff
path: root/src/service/peerstore/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/peerstore/Makefile.am')
-rw-r--r--src/service/peerstore/Makefile.am150
1 files changed, 150 insertions, 0 deletions
diff --git a/src/service/peerstore/Makefile.am b/src/service/peerstore/Makefile.am
new file mode 100644
index 000000000..28948b7db
--- /dev/null
+++ b/src/service/peerstore/Makefile.am
@@ -0,0 +1,150 @@
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
10dist_pkgcfg_DATA = \
11 peerstore.conf
12
13if USE_COVERAGE
14 AM_CFLAGS = -fprofile-arcs -ftest-coverage
15endif
16
17# This program does not do anything.
18noinst_PROGRAMS = \
19 gnunet-peerstore
20
21libexec_PROGRAMS = \
22 gnunet-service-peerstore
23
24lib_LTLIBRARIES = \
25 libgnunetpeerstore.la
26
27gnunet_peerstore_SOURCES = \
28 gnunet-peerstore.c
29gnunet_peerstore_LDADD = \
30 $(top_builddir)/src/lib/util/libgnunetutil.la \
31 libgnunetpeerstore.la \
32 $(GN_LIBINTL)
33
34gnunet_service_peerstore_SOURCES = \
35 gnunet-service-peerstore.c \
36 peerstore_common.c peerstore_common.h \
37 peerstore.h
38gnunet_service_peerstore_CFLAGS = $(AM_CFLAGS)
39gnunet_service_peerstore_LDADD = \
40 $(top_builddir)/src/lib/util/libgnunetutil.la \
41 $(top_builddir)/src/lib/hello/libgnunethello.la \
42 $(GN_LIBINTL)
43
44libgnunetpeerstore_la_SOURCES = \
45 peerstore_api.c \
46 peerstore_common.c
47libgnunetpeerstore_la_LIBADD = \
48 $(top_builddir)/src/lib/util/libgnunetutil.la \
49 $(top_builddir)/src/lib/hello/libgnunethello.la
50libgnunetpeerstore_la_LDFLAGS = \
51 $(GN_LIBINTL) \
52 $(GN_LIB_LDFLAGS)
53
54if HAVE_EXPERIMENTAL
55FLAT_PLUGIN = libgnunet_plugin_peerstore_flat.la
56FLAT_TESTS = test_plugin_peerstore_flat
57libgnunet_plugin_peerstore_flat_la_SOURCES = \
58 plugin_peerstore_flat.c
59libgnunet_plugin_peerstore_flat_la_LIBADD = \
60 libgnunetpeerstore.la \
61 $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \
62 $(LTLIBINTL)
63libgnunet_plugin_peerstore_flat_la_LDFLAGS = \
64 $(GN_PLUGIN_LDFLAGS)
65endif
66
67if HAVE_SQLITE
68SQLITE_PLUGIN = libgnunet_plugin_peerstore_sqlite.la
69SQLITE_TESTS = test_plugin_peerstore_sqlite
70libgnunet_plugin_peerstore_sqlite_la_SOURCES = \
71 plugin_peerstore_sqlite.c
72libgnunet_plugin_peerstore_sqlite_la_LIBADD = \
73 libgnunetpeerstore.la \
74 $(top_builddir)/src/lib/sq/libgnunetsq.la \
75 $(top_builddir)/src/lib/util/libgnunetutil.la \
76 $(XLIBS) -lsqlite3 \
77 $(LTLIBINTL)
78libgnunet_plugin_peerstore_sqlite_la_LDFLAGS = \
79 $(GN_PLUGIN_LDFLAGS)
80endif
81
82plugin_LTLIBRARIES = \
83 $(SQLITE_PLUGIN) \
84 $(FLAT_PLUGIN)
85
86test_plugin_peerstore_sqlite_SOURCES = \
87 test_plugin_peerstore.c
88test_plugin_peerstore_sqlite_LDADD = \
89 $(top_builddir)/src/service/testing/libgnunettesting.la \
90 $(top_builddir)/src/lib/util/libgnunetutil.la
91
92test_plugin_peerstore_flat_SOURCES = \
93 test_plugin_peerstore.c
94test_plugin_peerstore_flat_LDADD = \
95 $(top_builddir)/src/service/testing/libgnunettesting.la \
96 $(top_builddir)/src/lib/util/libgnunetutil.la
97
98check_PROGRAMS = \
99 test_peerstore_api_store \
100 test_peerstore_api_iterate \
101 test_peerstore_api_watch \
102 test_peerstore_api_sync \
103 perf_peerstore_store \
104 $(SQLITE_TESTS) \
105 $(FLAT_TESTS)
106
107EXTRA_DIST = \
108 test_peerstore_api_data.conf \
109 test_plugin_peerstore_flat.conf \
110 test_plugin_peerstore_sqlite.conf
111
112if ENABLE_TEST_RUN
113AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
114TESTS = $(check_PROGRAMS)
115endif
116
117test_peerstore_api_store_SOURCES = \
118 test_peerstore_api_store.c
119test_peerstore_api_store_LDADD = \
120 libgnunetpeerstore.la \
121 $(top_builddir)/src/service/testing/libgnunettesting.la \
122 $(top_builddir)/src/lib/util/libgnunetutil.la
123
124test_peerstore_api_iterate_SOURCES = \
125 test_peerstore_api_iterate.c
126test_peerstore_api_iterate_LDADD = \
127 libgnunetpeerstore.la \
128 $(top_builddir)/src/service/testing/libgnunettesting.la \
129 $(top_builddir)/src/lib/util/libgnunetutil.la
130
131test_peerstore_api_watch_SOURCES = \
132 test_peerstore_api_watch.c
133test_peerstore_api_watch_LDADD = \
134 libgnunetpeerstore.la \
135 $(top_builddir)/src/service/testing/libgnunettesting.la \
136 $(top_builddir)/src/lib/util/libgnunetutil.la
137
138test_peerstore_api_sync_SOURCES = \
139 test_peerstore_api_sync.c
140test_peerstore_api_sync_LDADD = \
141 libgnunetpeerstore.la \
142 $(top_builddir)/src/service/testing/libgnunettesting.la \
143 $(top_builddir)/src/lib/util/libgnunetutil.la
144
145perf_peerstore_store_SOURCES = \
146 perf_peerstore_store.c
147perf_peerstore_store_LDADD = \
148 libgnunetpeerstore.la \
149 $(top_builddir)/src/service/testing/libgnunettesting.la \
150 $(top_builddir)/src/lib/util/libgnunetutil.la