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