Add gnunet-nse program to show network size estimates.
[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_LDFLAGS = \
23   libgnunetnse.la \
24   $(top_builddir)/src/util/libgnunetutil.la \
25   $(XLIB) $(GN_LIBINTL)
26 gnunet_nse_DEPENDENCIES = \
27   $(top_builddir)/src/util/libgnunetutil.la
28
29 lib_LTLIBRARIES = libgnunetnse.la
30
31 libgnunetnse_la_SOURCES = \
32   nse_api.c nse.h
33 libgnunetnse_la_LIBADD = \
34   $(top_builddir)/src/util/libgnunetutil.la \
35   $(GN_LIBINTL) $(XLIB)
36 libgnunetnse_la_LDFLAGS = \
37   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
38   -version-info 0:0:0
39
40
41 libexec_PROGRAMS = \
42  gnunet-service-nse
43
44 if HAVE_TESTING
45 noinst_PROGRAMS = \
46  gnunet-nse-profiler
47 endif
48
49 gnunet_nse_profiler_SOURCES = \
50  gnunet-nse-profiler.c
51 gnunet_nse_profiler_LDADD = -lm \
52   $(top_builddir)/src/nse/libgnunetnse.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   $(top_builddir)/src/statistics/libgnunetstatistics.la \
55   $(top_builddir)/src/testbed/libgnunettestbed.la \
56   $(GN_LIBINTL)
57 gnunet_nse_profiler_DEPENDENCIES = \
58   libgnunetnse.la
59
60 gnunet_service_nse_SOURCES = \
61  gnunet-service-nse.c
62 gnunet_service_nse_LDADD = \
63   $(top_builddir)/src/nse/libgnunetnse.la \
64   $(top_builddir)/src/util/libgnunetutil.la \
65   $(top_builddir)/src/core/libgnunetcore.la \
66   $(top_builddir)/src/statistics/libgnunetstatistics.la \
67   $(LIBGCRYPT_LIBS) \
68   -lm -lgcrypt \
69   $(GN_LIBINTL)
70 gnunet_service_nse_DEPENDENCIES = \
71   libgnunetnse.la
72 if ENABLE_NSE_HISTOGRAM
73   gnunet_service_nse_LDADD += \
74     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
75   gnunet_service_nse_DEPENDENCIES += \
76     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
77 endif
78
79
80 if HAVE_BENCHMARKS
81   MULTIPEER_TEST = test_nse_multipeer
82 endif
83
84 if HAVE_TESTING
85 check_PROGRAMS = \
86  test_nse_api \
87  perf_kdf \
88  $(MULTIPEER_TEST)
89 endif
90
91 if ENABLE_TEST_RUN
92 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
93 TESTS = $(check_PROGRAMS)
94 endif
95
96 test_nse_api_SOURCES = \
97  test_nse_api.c
98 test_nse_api_LDADD = \
99   $(top_builddir)/src/nse/libgnunetnse.la \
100   $(top_builddir)/src/testing/libgnunettesting.la \
101   $(top_builddir)/src/util/libgnunetutil.la
102
103 test_nse_multipeer_SOURCES = \
104  test_nse_multipeer.c
105 test_nse_multipeer_LDADD = \
106   $(top_builddir)/src/nse/libgnunetnse.la \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   $(top_builddir)/src/testbed/libgnunettestbed.la \
109   -lm
110
111 perf_kdf_SOURCES = \
112  perf_kdf.c
113 perf_kdf_LDADD = \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(LIBGCRYPT_LIBS) \
116   -lgcrypt
117
118 EXTRA_DIST = \
119   test_nse.conf \
120   nse_profiler_test.conf
121
122