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 = 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_elem.h gnunet-service-rps_sampler_elem.c \
51  gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
52  gnunet-service-rps_peers.h gnunet-service-rps_peers.c \
53  gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
54  gnunet-service-rps_view.h gnunet-service-rps_view.c \
55  rps-test_util.h rps-test_util.c \
56  gnunet-service-rps.c
57
58
59 gnunet_service_rps_LDADD = \
60   libgnunetrps.la \
61   $(top_builddir)/src/util/libgnunetutil.la \
62   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
63   $(top_builddir)/src/cadet/libgnunetcadet.la \
64   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
65   $(top_builddir)/src/nse/libgnunetnse.la \
66   $(top_builddir)/src/statistics/libgnunetstatistics.la \
67   $(LIBGCRYPT_LIBS) \
68   -lm -lgcrypt \
69   $(GN_LIBINTL)
70
71
72 if HAVE_TESTING
73 check_PROGRAMS = \
74  test_service_rps_view \
75  test_service_rps_custommap \
76  test_service_rps_peers \
77  test_service_rps_sampler_elem \
78  test_rps_malicious_1 \
79  test_rps_malicious_2 \
80  test_rps_malicious_3 \
81  test_rps_seed_request \
82  test_rps_single_req \
83  test_rps_req_cancel \
84  test_rps_seed_big
85 endif
86
87 ld_rps_test_lib = \
88         libgnunetrps.la \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   $(top_builddir)/src/testbed/libgnunettestbed.la \
91   -lm
92
93 rps_test_src = \
94         test_rps.c \
95         rps-test_util.h rps-test_util.c \
96  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c
97
98 if ENABLE_TEST_RUN
99 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
100 TESTS = $(check_PROGRAMS)
101 endif
102
103 test_service_rps_view_SOURCES = \
104   gnunet-service-rps_view.h gnunet-service-rps_view.c \
105   test_service_rps_view.c
106 test_service_rps_view_LDADD = $(top_builddir)/src/util/libgnunetutil.la
107
108 test_service_rps_peers_SOURCES = \
109   gnunet-service-rps_peers.h gnunet-service-rps_peers.c \
110   test_service_rps_peers.c
111 test_service_rps_peers_LDADD = \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   $(top_builddir)/src/cadet/libgnunetcadet.la
114
115 test_service_rps_custommap_SOURCES = \
116   gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
117   test_service_rps_custommap.c
118 test_service_rps_custommap_LDADD = \
119   $(top_builddir)/src/util/libgnunetutil.la
120
121 test_service_rps_sampler_elem_SOURCES = \
122   gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
123   rps-test_util.h rps-test_util.c \
124   test_service_rps_sampler_elem.c
125 test_service_rps_sampler_elem_LDADD = $(top_builddir)/src/util/libgnunetutil.la
126
127 test_rps_malicious_1_SOURCES = $(rps_test_src)
128 test_rps_malicious_1_LDADD = $(ld_rps_test_lib)
129
130 test_rps_malicious_2_SOURCES = $(rps_test_src)
131 test_rps_malicious_2_LDADD = $(ld_rps_test_lib)
132
133 test_rps_malicious_3_SOURCES = $(rps_test_src)
134 test_rps_malicious_3_LDADD = $(ld_rps_test_lib)
135
136 test_rps_single_req_SOURCES = $(rps_test_src)
137 test_rps_single_req_LDADD = $(ld_rps_test_lib)
138
139 test_rps_seed_request_SOURCES = $(rps_test_src)
140 test_rps_seed_request_LDADD = $(ld_rps_test_lib)
141
142 test_rps_req_cancel_SOURCES = $(rps_test_src)
143 test_rps_req_cancel_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 gnunet_rps_profiler_SOURCES = $(rps_test_src)
149 gnunet_rps_profiler_LDADD = $(ld_rps_test_lib)
150
151 EXTRA_DIST = \
152   test_rps.conf