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