-fixed missing link to library
[oweals/gnunet.git] / src / rps / 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   rps.conf
19
20 bin_PROGRAMS = gnunet-rps
21
22 gnunet_rps_SOURCES = gnunet-rps.c
23 gnunet_rps_LDADD = \
24   libgnunetrps.la \
25   $(top_builddir)/src/util/libgnunetutil.la \
26   $(XLIB) $(GN_LIBINTL)
27
28 lib_LTLIBRARIES = libgnunetrps.la
29
30 libgnunetrps_la_SOURCES = \
31   rps_api.c rps.h
32 libgnunetrps_la_LIBADD = \
33   $(top_builddir)/src/util/libgnunetutil.la \
34   $(GN_LIBINTL) $(XLIB)
35 libgnunetrps_la_LDFLAGS = \
36   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
37   -version-info 0:0:0
38
39
40 libexec_PROGRAMS = \
41  gnunet-service-rps
42
43 if HAVE_TESTING
44 noinst_PROGRAMS = \
45  gnunet-rps-profiler
46 endif
47
48
49 gnunet_service_rps_SOURCES = \
50  gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
51  rps-test_util.h rps-test_util.c \
52  gnunet-service-rps.c
53
54
55 gnunet_service_rps_LDADD = \
56   libgnunetrps.la \
57   $(top_builddir)/src/util/libgnunetutil.la \
58   $(top_builddir)/src/cadet/libgnunetcadet.la \
59   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
60   $(top_builddir)/src/nse/libgnunetnse.la \
61   $(top_builddir)/src/statistics/libgnunetstatistics.la \
62   $(LIBGCRYPT_LIBS) \
63   -lm -lgcrypt \
64   $(GN_LIBINTL)
65
66
67 if HAVE_TESTING
68 check_PROGRAMS = \
69  test_rps_malicious_1 \
70  test_rps_malicious_2 \
71  test_rps_malicious_3 \
72  test_rps_seed_request \
73  test_rps_single_req
74 endif
75
76 ld_rps_test_lib = \
77         libgnunetrps.la \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(top_builddir)/src/testbed/libgnunettestbed.la \
80   -lm
81
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_rps_malicious_1_SOURCES = \
89         test_rps.c
90 test_rps_malicious_1_LDADD = $(ld_rps_test_lib)
91
92 test_rps_malicious_2_SOURCES = \
93         test_rps.c
94 test_rps_malicious_2_LDADD = $(ld_rps_test_lib)
95
96 test_rps_malicious_3_SOURCES = \
97         test_rps.c
98 test_rps_malicious_3_LDADD = $(ld_rps_test_lib)
99
100 test_rps_single_req_SOURCES = \
101  test_rps.c
102 test_rps_single_req_LDADD = $(ld_rps_test_lib)
103
104 test_rps_seed_request_SOURCES = \
105  test_rps.c
106 test_rps_seed_request_LDADD = $(ld_rps_test_lib)
107
108 gnunet_rps_profiler_SOURCES = \
109  test_rps.c
110 gnunet_rps_profiler_LDADD = $(ld_rps_test_lib)
111
112 EXTRA_DIST = \
113   test_rps.conf
114