missing fi
[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
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 if HAVE_TESTING
36 noinst_PROGRAMS = \
37  gnunet-nse-profiler
38 endif
39
40 gnunet_nse_profiler_SOURCES = \
41  gnunet-nse-profiler.c
42 gnunet_nse_profiler_LDADD = -lm \
43   $(top_builddir)/src/nse/libgnunetnse.la \
44   $(top_builddir)/src/util/libgnunetutil.la \
45   $(top_builddir)/src/statistics/libgnunetstatistics.la \
46   $(top_builddir)/src/testbed/libgnunettestbed.la \
47   $(GN_LIBINTL)
48 gnunet_nse_profiler_DEPENDENCIES = \
49   libgnunetnse.la                                
50
51 gnunet_service_nse_SOURCES = \
52  gnunet-service-nse.c         
53 gnunet_service_nse_LDADD = \
54   $(top_builddir)/src/nse/libgnunetnse.la \
55   $(top_builddir)/src/util/libgnunetutil.la \
56   $(top_builddir)/src/core/libgnunetcore.la \
57   $(top_builddir)/src/statistics/libgnunetstatistics.la \
58   -lm -lgcrypt \
59   $(GN_LIBINTL)
60 gnunet_service_nse_DEPENDENCIES = \
61   libgnunetnse.la                                
62 if ENABLE_NSE_HISTOGRAM
63   gnunet_service_nse_LDADD += \
64     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
65   gnunet_service_nse_DEPENDENCIES += \
66     $(top_builddir)/src/testbed/libgnunettestbedlogger.la
67 endif
68
69
70 if HAVE_BENCHMARKS
71   MULTIPEER_TEST = test_nse_multipeer
72 endif
73
74 if HAVE_TESTING
75 check_PROGRAMS = \
76  test_nse_api \
77  perf_kdf \
78  $(MULTIPEER_TEST)
79 endif
80
81 if ENABLE_TEST_RUN
82 TESTS = $(check_PROGRAMS) 
83 endif
84
85 test_nse_api_SOURCES = \
86  test_nse_api.c
87 test_nse_api_LDADD = \
88   $(top_builddir)/src/nse/libgnunetnse.la \
89   $(top_builddir)/src/testing/libgnunettesting.la \
90   $(top_builddir)/src/util/libgnunetutil.la 
91
92 test_nse_multipeer_SOURCES = \
93  test_nse_multipeer.c
94 test_nse_multipeer_LDADD = \
95   $(top_builddir)/src/nse/libgnunetnse.la \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/testbed/libgnunettestbed.la \
98   -lm
99
100 perf_kdf_SOURCES = \
101  perf_kdf.c
102 perf_kdf_LDADD = \
103   $(top_builddir)/src/util/libgnunetutil.la \
104   -lgcrypt 
105
106 EXTRA_DIST = \
107   test_nse.conf \
108   nse_profiler_test.conf
109
110