e8d865c465e5afdf6050d30b23013ae0852f1eb5
[oweals/gnunet.git] / src / peerstore / Makefile.am
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 dist_pkgcfg_DATA = \
11   peerstore.conf
12
13 if MINGW
14  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = -fprofile-arcs -ftest-coverage
19 endif
20
21 bin_PROGRAMS = \
22  gnunet-peerstore
23
24 libexec_PROGRAMS = \
25  gnunet-service-peerstore
26
27 lib_LTLIBRARIES = \
28  libgnunetpeerstore.la
29
30 gnunet_peerstore_SOURCES = \
31  gnunet-peerstore.c
32 gnunet_peerstore_LDADD = \
33   $(top_builddir)/src/util/libgnunetutil.la \
34   libgnunetpeerstore.la \
35   $(GN_LIBINTL)
36
37 gnunet_service_peerstore_SOURCES = \
38  gnunet-service-peerstore.c \
39  peerstore_common.c peerstore_common.h \
40  peerstore.h
41 gnunet_service_peerstore_CFLAGS = $(AM_CFLAGS)
42 gnunet_service_peerstore_LDADD = \
43   $(top_builddir)/src/util/libgnunetutil.la \
44   $(GN_LIBINTL)
45
46 libgnunetpeerstore_la_SOURCES = \
47   peerstore_api.c \
48   peerstore_common.c
49 libgnunetpeerstore_la_LIBADD = \
50   $(top_builddir)/src/util/libgnunetutil.la
51 libgnunetpeerstore_la_LDFLAGS = \
52   $(GN_LIB_LDFLAGS)
53
54 if HAVE_SQLITE
55
56 plugin_LTLIBRARIES = \
57   libgnunet_plugin_peerstore_sqlite.la
58
59 libgnunet_plugin_peerstore_sqlite_la_SOURCES = \
60   plugin_peerstore_sqlite.c
61 libgnunet_plugin_peerstore_sqlite_la_LIBADD = \
62   libgnunetpeerstore.la  \
63   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
64   $(LTLIBINTL)
65 libgnunet_plugin_peerstore_sqlite_la_LDFLAGS = \
66  $(GN_PLUGIN_LDFLAGS)
67 end
68
69 endif
70
71 check_PROGRAMS = \
72  test_peerstore_api_store \
73  test_peerstore_api_iterate \
74  test_peerstore_api_watch \
75  test_peerstore_api_sync \
76  perf_peerstore_store
77
78 EXTRA_DIST = \
79  test_peerstore_api_data.conf
80
81 if ENABLE_TEST_RUN
82 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
83 TESTS = $(check_PROGRAMS)
84 endif
85
86 test_peerstore_api_store_SOURCES = \
87  test_peerstore_api_store.c
88 test_peerstore_api_store_LDADD = \
89   libgnunetpeerstore.la  \
90   $(top_builddir)/src/testing/libgnunettesting.la \
91   $(top_builddir)/src/util/libgnunetutil.la
92
93 test_peerstore_api_iterate_SOURCES = \
94  test_peerstore_api_iterate.c
95 test_peerstore_api_iterate_LDADD = \
96   libgnunetpeerstore.la  \
97   $(top_builddir)/src/testing/libgnunettesting.la \
98   $(top_builddir)/src/util/libgnunetutil.la
99
100 test_peerstore_api_watch_SOURCES = \
101  test_peerstore_api_watch.c
102 test_peerstore_api_watch_LDADD = \
103   libgnunetpeerstore.la  \
104   $(top_builddir)/src/testing/libgnunettesting.la \
105   $(top_builddir)/src/util/libgnunetutil.la
106
107 test_peerstore_api_sync_SOURCES = \
108  test_peerstore_api_sync.c
109 test_peerstore_api_sync_LDADD = \
110   libgnunetpeerstore.la  \
111   $(top_builddir)/src/testing/libgnunettesting.la \
112   $(top_builddir)/src/util/libgnunetutil.la
113
114 perf_peerstore_store_SOURCES = \
115  perf_peerstore_store.c
116 perf_peerstore_store_LDADD = \
117   libgnunetpeerstore.la  \
118   $(top_builddir)/src/testing/libgnunettesting.la \
119   $(top_builddir)/src/util/libgnunetutil.la