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