168051572f217ff09db090e931443b49418f0d42
[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
40 gnunet_service_peerstore_CFLAGS = $(AM_CFLAGS)
41 gnunet_service_peerstore_LDADD = \
42   $(top_builddir)/src/util/libgnunetutil.la \
43   $(GN_LIBINTL)
44
45 libgnunetpeerstore_la_SOURCES = \
46   peerstore_api.c \
47   peerstore_common.c
48 libgnunetpeerstore_la_LIBADD = \
49   $(top_builddir)/src/util/libgnunetutil.la
50 libgnunetpeerstore_la_LDFLAGS = \
51   $(GN_LIB_LDFLAGS)
52
53 plugin_LTLIBRARIES = \
54   libgnunet_plugin_peerstore_sqlite.la
55
56 libgnunet_plugin_peerstore_sqlite_la_SOURCES = \
57   plugin_peerstore_sqlite.c
58 libgnunet_plugin_peerstore_sqlite_la_LIBADD = \
59   libgnunetpeerstore.la  \
60   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
61   $(LTLIBINTL)
62 libgnunet_plugin_peerstore_sqlite_la_LDFLAGS = \
63  $(GN_PLUGIN_LDFLAGS)
64
65 check_PROGRAMS = \
66  test_peerstore_api_store \
67  test_peerstore_api_iterate \
68  test_peerstore_api_watch \
69  test_peerstore_api_sync \
70  perf_peerstore_store
71
72 if ENABLE_TEST_RUN
73 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
74 TESTS = $(check_PROGRAMS)
75 endif
76
77 test_peerstore_api_store_SOURCES = \
78  test_peerstore_api_store.c
79 test_peerstore_api_store_LDADD = \
80   libgnunetpeerstore.la  \
81   $(top_builddir)/src/testing/libgnunettesting.la \
82   $(top_builddir)/src/util/libgnunetutil.la
83
84 test_peerstore_api_iterate_SOURCES = \
85  test_peerstore_api_iterate.c
86 test_peerstore_api_iterate_LDADD = \
87   libgnunetpeerstore.la  \
88   $(top_builddir)/src/testing/libgnunettesting.la \
89   $(top_builddir)/src/util/libgnunetutil.la
90
91 test_peerstore_api_watch_SOURCES = \
92  test_peerstore_api_watch.c
93 test_peerstore_api_watch_LDADD = \
94   libgnunetpeerstore.la  \
95   $(top_builddir)/src/testing/libgnunettesting.la \
96   $(top_builddir)/src/util/libgnunetutil.la
97
98 test_peerstore_api_sync_SOURCES = \
99  test_peerstore_api_sync.c
100 test_peerstore_api_sync_LDADD = \
101   libgnunetpeerstore.la  \
102   $(top_builddir)/src/testing/libgnunettesting.la \
103   $(top_builddir)/src/util/libgnunetutil.la
104
105 perf_peerstore_store_SOURCES = \
106  perf_peerstore_store.c
107 perf_peerstore_store_LDADD = \
108   libgnunetpeerstore.la  \
109   $(top_builddir)/src/testing/libgnunettesting.la \
110   $(top_builddir)/src/util/libgnunetutil.la