Merge branch 'master' of gnunet.org:gnunet
[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 = \
23   gnunet-rps.c
24
25 gnunet_rps_LDADD = \
26   libgnunetrps.la \
27   $(top_builddir)/src/util/libgnunetutil.la \
28   $(XLIB) $(GN_LIBINTL)
29
30 lib_LTLIBRARIES = libgnunetrps.la
31
32 libgnunetrps_la_SOURCES = \
33  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
34   rps-test_util.h rps-test_util.c \
35   rps-sampler_common.h rps-sampler_common.c \
36   rps-sampler_client.h rps-sampler_client.c \
37   rps_api.c rps.h
38 libgnunetrps_la_LIBADD = \
39   $(top_builddir)/src/util/libgnunetutil.la \
40   $(GN_LIBINTL) $(XLIB)
41 libgnunetrps_la_LDFLAGS = \
42   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
43   -version-info 0:0:0
44 # Fix 'created both with libtool and without' error:
45 libgnunetrps_la_CFLAGS = $(AM_CFLAGS)
46
47
48 libexec_PROGRAMS = \
49  gnunet-service-rps
50
51 if HAVE_TESTING
52 noinst_PROGRAMS = \
53  gnunet-rps-profiler
54 endif
55
56
57 gnunet_service_rps_SOURCES = \
58  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
59  rps-sampler_common.h rps-sampler_common.c \
60  gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
61  gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
62  gnunet-service-rps_view.h gnunet-service-rps_view.c \
63  rps-test_util.h rps-test_util.c \
64  gnunet-service-rps.c
65
66
67 gnunet_service_rps_LDADD = \
68   libgnunetrps.la \
69   $(top_builddir)/src/util/libgnunetutil.la \
70   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
71   $(top_builddir)/src/cadet/libgnunetcadet.la \
72   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
73   $(top_builddir)/src/nse/libgnunetnse.la \
74   $(top_builddir)/src/statistics/libgnunetstatistics.la \
75   $(top_builddir)/src/core/libgnunetcore.la \
76   $(LIBGCRYPT_LIBS) \
77   -lm -lgcrypt \
78   $(GN_LIBINTL)
79
80
81 if HAVE_TESTING
82 check_PROGRAMS = \
83  test_service_rps_view \
84  test_service_rps_custommap \
85  test_service_rps_sampler_elem \
86  test_rps_single_req \
87  test_rps_req_cancel \
88  test_rps_sub \
89  test_rps_seed_request \
90  test_rps_seed_big \
91  test_rps_churn \
92  test_rps_malicious_1 \
93  test_rps_malicious_2 \
94  test_rps_malicious_3
95 endif
96
97 rps_test_src = \
98         test_rps.c \
99         rps-test_util.h rps-test_util.c \
100  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
101  rps-sampler_common.h rps-sampler_common.c \
102  gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c
103
104 ld_rps_test_lib = \
105         libgnunetrps.la \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/statistics/libgnunetstatistics.la \
108   $(top_builddir)/src/testbed/libgnunettestbed.la \
109   -lm
110
111 if ENABLE_TEST_RUN
112 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
113 TESTS = $(check_PROGRAMS)
114 endif
115
116 test_service_rps_view_SOURCES = \
117   gnunet-service-rps_view.h gnunet-service-rps_view.c \
118   test_service_rps_view.c
119 test_service_rps_view_LDADD = $(top_builddir)/src/util/libgnunetutil.la
120
121 test_service_rps_custommap_SOURCES = \
122   gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
123   test_service_rps_custommap.c
124 test_service_rps_custommap_LDADD = \
125   $(top_builddir)/src/util/libgnunetutil.la
126
127 test_service_rps_sampler_elem_SOURCES = \
128   gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
129   rps-test_util.h rps-test_util.c \
130   test_service_rps_sampler_elem.c
131 test_service_rps_sampler_elem_LDADD = $(top_builddir)/src/util/libgnunetutil.la
132
133 test_rps_single_req_SOURCES = $(rps_test_src)
134 test_rps_single_req_LDADD = $(ld_rps_test_lib)
135
136 test_rps_seed_request_SOURCES = $(rps_test_src)
137 test_rps_seed_request_LDADD = $(ld_rps_test_lib)
138
139 test_rps_req_cancel_SOURCES = $(rps_test_src)
140 test_rps_req_cancel_LDADD = $(ld_rps_test_lib)
141
142 test_rps_sub_SOURCES = $(rps_test_src)
143 test_rps_sub_LDADD = $(ld_rps_test_lib)
144
145 test_rps_seed_big_SOURCES = $(rps_test_src)
146 test_rps_seed_big_LDADD = $(ld_rps_test_lib)
147
148 test_rps_churn_SOURCES = $(rps_test_src)
149 test_rps_churn_LDADD = $(ld_rps_test_lib)
150
151 test_rps_malicious_1_SOURCES = $(rps_test_src)
152 test_rps_malicious_1_LDADD = $(ld_rps_test_lib)
153
154 test_rps_malicious_2_SOURCES = $(rps_test_src)
155 test_rps_malicious_2_LDADD = $(ld_rps_test_lib)
156
157 test_rps_malicious_3_SOURCES = $(rps_test_src)
158 test_rps_malicious_3_LDADD = $(ld_rps_test_lib)
159
160 gnunet_rps_profiler_SOURCES = \
161  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
162  rps-sampler_common.h rps-sampler_common.c \
163  gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
164  rps-test_util.h rps-test_util.c \
165  gnunet-rps-profiler.c
166
167
168 gnunet_rps_profiler_LDADD = \
169   $(top_builddir)/src/statistics/libgnunetstatistics.la \
170   libgnunetrps.la \
171   $(top_builddir)/src/util/libgnunetutil.la \
172   $(top_builddir)/src/testbed/libgnunettestbed.la \
173   -lm
174
175
176 EXTRA_DIST = \
177   test_rps.conf