error handling
[oweals/gnunet.git] / src / peerinfo / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 pkgcfgdir= $(pkgdatadir)/config.d/
5
6 libexecdir= $(pkglibdir)/libexec/
7
8 plugindir = $(libdir)/gnunet
9
10 pkgcfg_DATA = \
11   peerinfo.conf
12
13 if USE_COVERAGE
14   AM_CFLAGS = --coverage -O0
15   XLIB = -lgcov
16 endif
17
18 lib_LTLIBRARIES = libgnunetpeerinfo.la
19
20
21 libgnunetpeerinfo_la_SOURCES = \
22   peerinfo_api.c peerinfo.h \
23   peerinfo_api_notify.c
24 libgnunetpeerinfo_la_LIBADD = \
25   $(top_builddir)/src/hello/libgnunethello.la \
26   $(top_builddir)/src/util/libgnunetutil.la \
27   $(XLIB) \
28   $(LTLIBINTL)
29 libgnunetpeerinfo_la_LDFLAGS = \
30   $(GN_LIB_LDFLAGS)  \
31   -version-info 0:0:0
32
33
34 libexec_PROGRAMS = \
35  gnunet-service-peerinfo
36
37 gnunet_service_peerinfo_SOURCES = \
38   gnunet-service-peerinfo.c
39 gnunet_service_peerinfo_LDADD = \
40   $(top_builddir)/src/hello/libgnunethello.la \
41   $(top_builddir)/src/statistics/libgnunetstatistics.la \
42   $(top_builddir)/src/util/libgnunetutil.la
43 gnunet_service_peerinfo_LDFLAGS = \
44   $(GN_LIBINTL)
45
46 if HAVE_BENCHMARKS
47  PEERINFO_BENCHMARKS = \
48  perf_peerinfo_api
49 endif
50
51 if HAVE_TESTING
52 check_PROGRAMS = \
53  test_peerinfo_shipped_hellos \
54  test_peerinfo_api \
55  test_peerinfo_api_friend_only \
56  test_peerinfo_api_notify_friend_only \
57  $(PEERINFO_BENCHMARKS)
58 endif
59
60
61 if ENABLE_TEST_RUN
62 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
63 TESTS = $(check_PROGRAMS)
64 endif
65
66 test_peerinfo_shipped_hellos_SOURCES = \
67  test_peerinfo_shipped_hellos.c
68 test_peerinfo_shipped_hellos_LDADD = \
69  $(top_builddir)/src/hello/libgnunethello.la \
70  libgnunetpeerinfo.la \
71  $(top_builddir)/src/testing/libgnunettesting.la \
72  $(top_builddir)/src/util/libgnunetutil.la
73
74 test_peerinfo_api_SOURCES = \
75  test_peerinfo_api.c
76 test_peerinfo_api_LDADD = \
77  $(top_builddir)/src/hello/libgnunethello.la \
78  libgnunetpeerinfo.la \
79  $(top_builddir)/src/testing/libgnunettesting.la \
80  $(top_builddir)/src/util/libgnunetutil.la
81
82 test_peerinfo_api_friend_only_SOURCES = \
83  test_peerinfo_api_friend_only.c
84 test_peerinfo_api_friend_only_LDADD = \
85  $(top_builddir)/src/hello/libgnunethello.la \
86  libgnunetpeerinfo.la \
87  $(top_builddir)/src/testing/libgnunettesting.la \
88  $(top_builddir)/src/util/libgnunetutil.la
89
90 test_peerinfo_api_notify_friend_only_SOURCES = \
91  test_peerinfo_api_notify_friend_only.c
92 test_peerinfo_api_notify_friend_only_LDADD = \
93  $(top_builddir)/src/hello/libgnunethello.la \
94  libgnunetpeerinfo.la \
95  $(top_builddir)/src/testing/libgnunettesting.la \
96  $(top_builddir)/src/util/libgnunetutil.la
97
98 perf_peerinfo_api_SOURCES = \
99  perf_peerinfo_api.c
100 perf_peerinfo_api_LDADD = \
101  $(top_builddir)/src/hello/libgnunethello.la \
102  libgnunetpeerinfo.la \
103  $(top_builddir)/src/testing/libgnunettesting.la \
104  $(top_builddir)/src/util/libgnunetutil.la
105
106 EXTRA_DIST = \
107   test_peerinfo_api_data.conf