-substitute array-structures push_list, pull_list with custom list structure
[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  rps-test_util.h rps-test_util.c \
54  gnunet-service-rps.c
55
56
57 gnunet_service_rps_LDADD = \
58   libgnunetrps.la \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
61   $(top_builddir)/src/cadet/libgnunetcadet.la \
62   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
63   $(top_builddir)/src/nse/libgnunetnse.la \
64   $(top_builddir)/src/statistics/libgnunetstatistics.la \
65   $(LIBGCRYPT_LIBS) \
66   -lm -lgcrypt \
67   $(GN_LIBINTL)
68
69
70 if HAVE_TESTING
71 check_PROGRAMS = \
72  test_service_rps_peers \
73  test_rps_malicious_1 \
74  test_rps_malicious_2 \
75  test_rps_malicious_3 \
76  test_rps_seed_request \
77  test_rps_single_req \
78  test_rps_req_cancel \
79  test_rps_seed_big
80 endif
81
82 ld_rps_test_lib = \
83         libgnunetrps.la \
84   $(top_builddir)/src/util/libgnunetutil.la \
85   $(top_builddir)/src/testbed/libgnunettestbed.la \
86   -lm
87
88 rps_test_src = \
89         test_rps.c \
90         rps-test_util.h rps-test_util.c \
91  gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c
92
93 if ENABLE_TEST_RUN
94 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
95 TESTS = $(check_PROGRAMS)
96 endif
97
98 test_service_rps_peers_SOURCES = gnunet-service-rps_peers.h gnunet-service-rps_peers.c \
99                                                                                                                                  test_service_rps_peers.c
100 test_service_rps_peers_LDADD = $(top_builddir)/src/util/libgnunetutil.la
101
102 test_rps_malicious_1_SOURCES = $(rps_test_src)
103 test_rps_malicious_1_LDADD = $(ld_rps_test_lib)
104
105 test_rps_malicious_2_SOURCES = $(rps_test_src)
106 test_rps_malicious_2_LDADD = $(ld_rps_test_lib)
107
108 test_rps_malicious_3_SOURCES = $(rps_test_src)
109 test_rps_malicious_3_LDADD = $(ld_rps_test_lib)
110
111 test_rps_single_req_SOURCES = $(rps_test_src)
112 test_rps_single_req_LDADD = $(ld_rps_test_lib)
113
114 test_rps_seed_request_SOURCES = $(rps_test_src)
115 test_rps_seed_request_LDADD = $(ld_rps_test_lib)
116
117 test_rps_req_cancel_SOURCES = $(rps_test_src)
118 test_rps_req_cancel_LDADD = $(ld_rps_test_lib)
119
120 test_rps_seed_big_SOURCES = $(rps_test_src)
121 test_rps_seed_big_LDADD = $(ld_rps_test_lib)
122
123 gnunet_rps_profiler_SOURCES = $(rps_test_src)
124 gnunet_rps_profiler_LDADD = $(ld_rps_test_lib)
125
126 EXTRA_DIST = \
127   test_rps.conf