- generate histograms based on configure option --enable-nse-histogram
[oweals/gnunet.git] / src / nse / Makefile.am
1 INCLUDES = -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
20 lib_LTLIBRARIES = libgnunetnse.la
21
22 libgnunetnse_la_SOURCES = \
23   nse_api.c nse.h
24 libgnunetnse_la_LIBADD = \
25   $(top_builddir)/src/util/libgnunetutil.la \
26   $(GN_LIBINTL) $(XLIB)
27 libgnunetnse_la_LDFLAGS = \
28   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
29   -version-info 0:0:0
30
31
32 libexec_PROGRAMS = \
33  gnunet-service-nse 
34
35 noinst_PROGRAMS = \
36  gnunet-nse-profiler
37
38 gnunet_nse_profiler_SOURCES = \
39  gnunet-nse-profiler.c
40 gnunet_nse_profiler_LDADD = -lm \
41   $(top_builddir)/src/nse/libgnunetnse.la \
42   $(top_builddir)/src/util/libgnunetutil.la \
43   $(top_builddir)/src/statistics/libgnunetstatistics.la \
44   $(top_builddir)/src/testbed/libgnunettestbed.la \
45   $(GN_LIBINTL)
46 gnunet_nse_profiler_DEPENDENCIES = \
47   libgnunetnse.la                                
48
49 gnunet_service_nse_SOURCES = \
50  gnunet-service-nse.c         
51 gnunet_service_nse_LDADD = \
52   $(top_builddir)/src/nse/libgnunetnse.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   $(top_builddir)/src/core/libgnunetcore.la \
55   $(top_builddir)/src/statistics/libgnunetstatistics.la \
56   -lm -lgcrypt \
57   $(GN_LIBINTL)
58 gnunet_service_nse_DEPENDENCIES = \
59   libgnunetnse.la                                
60 if ENABLE_NSE_HISTOGRAM
61   gnunet_service_nse_LDADD += \
62     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
63   gnunet_service_nse_DEPENDENCIES += \
64     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
65 endif
66
67
68 if HAVE_BENCHMARKS
69   MULTIPEER_TEST = test_nse_multipeer
70 endif
71
72 check_PROGRAMS = \
73  test_nse_api \
74  perf_kdf \
75  $(MULTIPEER_TEST)
76
77
78 if ENABLE_TEST_RUN
79 TESTS = $(check_PROGRAMS) 
80 endif
81
82 test_nse_api_SOURCES = \
83  test_nse_api.c
84 test_nse_api_LDADD = \
85   $(top_builddir)/src/nse/libgnunetnse.la \
86   $(top_builddir)/src/testing/libgnunettesting.la \
87   $(top_builddir)/src/util/libgnunetutil.la 
88
89 test_nse_multipeer_SOURCES = \
90  test_nse_multipeer.c
91 test_nse_multipeer_LDADD = \
92   $(top_builddir)/src/nse/libgnunetnse.la \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/testbed/libgnunettestbed.la \
95   -lm
96
97 perf_kdf_SOURCES = \
98  perf_kdf.c
99 perf_kdf_LDADD = \
100   $(top_builddir)/src/util/libgnunetutil.la \
101   -lgcrypt 
102
103 EXTRA_DIST = \
104   test_nse.conf \
105   nse_profiler_test.conf
106
107