summaryrefslogtreecommitdiff
path: root/src/rps/Makefile.am
blob: 1fffe6be0031f8367e834fc976853ed35e278f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include

if MINGW
 WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
endif

if USE_COVERAGE
  AM_CFLAGS = --coverage -O0
  XLIB = -lgcov
endif

pkgcfgdir= $(pkgdatadir)/config.d/

libexecdir= $(pkglibdir)/libexec/

pkgcfg_DATA = \
  rps.conf

bin_PROGRAMS = gnunet-rps

gnunet_rps_SOURCES = \
  gnunet-rps.c

gnunet_rps_LDADD = \
  libgnunetrps.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(XLIB) $(GN_LIBINTL)

lib_LTLIBRARIES = libgnunetrps.la

libgnunetrps_la_SOURCES = \
 gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  rps-test_util.h rps-test_util.c \
  rps-sampler_common.h rps-sampler_common.c \
  rps-sampler_client.h rps-sampler_client.c \
  rps_api.c rps.h
libgnunetrps_la_LIBADD = \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(GN_LIBINTL) $(XLIB)
libgnunetrps_la_LDFLAGS = \
  $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
  -version-info 0:0:0
# Fix 'created both with libtool and without' error:
libgnunetrps_la_CFLAGS = $(AM_CFLAGS)


libexec_PROGRAMS = \
 gnunet-service-rps

if HAVE_TESTING
noinst_PROGRAMS = \
 gnunet-rps-profiler
endif


gnunet_service_rps_SOURCES = \
 gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
 rps-sampler_common.h rps-sampler_common.c \
 gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
 gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
 gnunet-service-rps_view.h gnunet-service-rps_view.c \
 gnunet-service-rps.c


gnunet_service_rps_LDADD = \
  libgnunetrps.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  $(top_builddir)/src/cadet/libgnunetcadet.la \
  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  $(top_builddir)/src/nse/libgnunetnse.la \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/core/libgnunetcore.la \
  $(LIBGCRYPT_LIBS) \
  -lm -lgcrypt \
  $(GN_LIBINTL)


if HAVE_TESTING
check_PROGRAMS = \
 test_service_rps_view \
 test_service_rps_custommap \
 test_service_rps_sampler_elem \
 test_rps_single_req \
 test_rps_req_cancel \
 test_rps_sub \
 test_rps_seed_request \
 test_rps_seed_big \
 test_rps_churn
if ENABLE_MALICIOUS
check_PROGRAMS += \
 test_rps_malicious_1 \
 test_rps_malicious_2 \
 test_rps_malicious_3
endif
endif

rps_test_src = \
	test_rps.c \
	rps-test_util.h rps-test_util.c \
 gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
 rps-sampler_common.h rps-sampler_common.c \
 gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c

ld_rps_test_lib = \
	libgnunetrps.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/testbed/libgnunettestbed.la \
  -lm

if ENABLE_TEST_RUN
AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
TESTS = $(check_PROGRAMS)
endif

test_service_rps_view_SOURCES = \
  gnunet-service-rps_view.h gnunet-service-rps_view.c \
  test_service_rps_view.c
test_service_rps_view_LDADD = $(top_builddir)/src/util/libgnunetutil.la

test_service_rps_custommap_SOURCES = \
  gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
  test_service_rps_custommap.c
test_service_rps_custommap_LDADD = \
  $(top_builddir)/src/util/libgnunetutil.la

test_service_rps_sampler_elem_SOURCES = \
  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  rps-test_util.h rps-test_util.c \
  test_service_rps_sampler_elem.c
test_service_rps_sampler_elem_LDADD = $(top_builddir)/src/util/libgnunetutil.la

test_rps_single_req_SOURCES = $(rps_test_src)
test_rps_single_req_LDADD = $(ld_rps_test_lib)

test_rps_seed_request_SOURCES = $(rps_test_src)
test_rps_seed_request_LDADD = $(ld_rps_test_lib)

test_rps_req_cancel_SOURCES = $(rps_test_src)
test_rps_req_cancel_LDADD = $(ld_rps_test_lib)

test_rps_sub_SOURCES = $(rps_test_src)
test_rps_sub_LDADD = $(ld_rps_test_lib)

test_rps_seed_big_SOURCES = $(rps_test_src)
test_rps_seed_big_LDADD = $(ld_rps_test_lib)

test_rps_churn_SOURCES = $(rps_test_src)
test_rps_churn_LDADD = $(ld_rps_test_lib)

test_rps_malicious_1_SOURCES = $(rps_test_src)
test_rps_malicious_1_LDADD = $(ld_rps_test_lib)

test_rps_malicious_2_SOURCES = $(rps_test_src)
test_rps_malicious_2_LDADD = $(ld_rps_test_lib)

test_rps_malicious_3_SOURCES = $(rps_test_src)
test_rps_malicious_3_LDADD = $(ld_rps_test_lib)

gnunet_rps_profiler_SOURCES = \
 gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
 rps-sampler_common.h rps-sampler_common.c \
 gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
 rps-test_util.h rps-test_util.c \
 gnunet-rps-profiler.c


gnunet_rps_profiler_LDADD = \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  libgnunetrps.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(top_builddir)/src/testbed/libgnunettestbed.la \
  -lm


EXTRA_DIST = \
  test_rps.conf