Check return value of GNUNET_STATISTICS_get
[oweals/gnunet.git] / src / nse / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 if MINGW
4  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9   XLIB = -lgcov
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 pkgcfg_DATA = \
17   nse.conf
18
19 bin_PROGRAMS = gnunet-nse
20
21 gnunet_nse_SOURCES = gnunet-nse.c
22 gnunet_nse_LDADD = \
23   libgnunetnse.la \
24   $(top_builddir)/src/util/libgnunetutil.la \
25   $(XLIB) $(GN_LIBINTL)
26
27 lib_LTLIBRARIES = libgnunetnse.la
28
29 libgnunetnse_la_SOURCES = \
30   nse_api.c nse.h
31 libgnunetnse_la_LIBADD = \
32   $(top_builddir)/src/util/libgnunetutil.la \
33   $(GN_LIBINTL) $(XLIB)
34 libgnunetnse_la_LDFLAGS = \
35   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
36   -version-info 0:0:0
37
38
39 libexec_PROGRAMS = \
40  gnunet-service-nse
41
42 if HAVE_TESTING
43 noinst_PROGRAMS = \
44  gnunet-nse-profiler
45 endif
46
47 gnunet_nse_profiler_SOURCES = \
48  gnunet-nse-profiler.c
49 gnunet_nse_profiler_LDADD = -lm \
50   libgnunetnse.la \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(top_builddir)/src/statistics/libgnunetstatistics.la \
53   $(top_builddir)/src/testbed/libgnunettestbed.la \
54   $(GN_LIBINTL)
55
56 gnunet_service_nse_SOURCES = \
57  gnunet-service-nse.c
58 gnunet_service_nse_LDADD = \
59   libgnunetnse.la \
60   $(top_builddir)/src/util/libgnunetutil.la \
61   $(top_builddir)/src/core/libgnunetcore.la \
62   $(top_builddir)/src/statistics/libgnunetstatistics.la \
63   $(LIBGCRYPT_LIBS) \
64   -lm -lgcrypt \
65   $(GN_LIBINTL)
66 if ENABLE_NSE_HISTOGRAM
67   gnunet_service_nse_LDADD += \
68     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
69 endif
70
71
72 if HAVE_BENCHMARKS
73   MULTIPEER_TEST = test_nse_multipeer
74 endif
75
76 if HAVE_TESTING
77 check_PROGRAMS = \
78  test_nse_api \
79  perf_kdf \
80  $(MULTIPEER_TEST)
81 endif
82
83 if ENABLE_TEST_RUN
84 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
85 TESTS = $(check_PROGRAMS)
86 endif
87
88 test_nse_api_SOURCES = \
89  test_nse_api.c
90 test_nse_api_LDADD = \
91   libgnunetnse.la \
92   $(top_builddir)/src/testing/libgnunettesting.la \
93   $(top_builddir)/src/util/libgnunetutil.la
94
95 test_nse_multipeer_SOURCES = \
96  test_nse_multipeer.c
97 test_nse_multipeer_LDADD = \
98   libgnunetnse.la \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(top_builddir)/src/testbed/libgnunettestbed.la \
101   -lm
102
103 perf_kdf_SOURCES = \
104  perf_kdf.c
105 perf_kdf_LDADD = \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(LIBGCRYPT_LIBS) \
108   -lgcrypt
109
110 EXTRA_DIST = \
111   test_nse.conf \
112   nse_profiler_test.conf
113
114