-reducing testing peers and links
[oweals/gnunet.git] / src / testbed / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9   XLIB = -lgcov
10 endif
11
12 libexecdir= $(pkglibdir)/libexec/
13
14 pkgcfgdir= $(pkgdatadir)/config.d/
15
16 pkgcfg_DATA = \
17   testbed.conf
18
19 libexec_PROGRAMS = \
20   gnunet-service-testbed \
21   gnunet-helper-testbed
22
23 noinst_PROGRAMS = \
24   gnunet-testbed-profiler
25
26 gnunet_service_testbed_SOURCES = \
27   gnunet-service-testbed.c
28 gnunet_service_testbed_LDADD = $(XLIB) \
29  $(top_builddir)/src/util/libgnunetutil.la \
30  $(top_builddir)/src/core/libgnunetcore.la \
31  $(top_builddir)/src/hello/libgnunethello.la \
32  $(top_builddir)/src/transport/libgnunettransport.la \
33  $(top_builddir)/src/testing/libgnunettesting.la \
34  $(top_builddir)/src/testbed/libgnunettestbed.la \
35  $(LTLIBINTL) -lz
36 gnunet_service_testbed_DEPENDENCIES = \
37   libgnunettestbed.la
38
39 gnunet_testbed_profiler_SOURCES = \
40   gnunet-testbed-profiler.c
41 gnunet_testbed_profiler_LDADD = $(XLIB) \
42  $(top_builddir)/src/util/libgnunetutil.la \
43  libgnunettestbed.la
44
45 gnunet_helper_testbed_SOURCES = \
46   gnunet-helper-testbed.c
47 gnunet_helper_testbed_LDADD = $(XLIB) \
48  $(top_builddir)/src/util/libgnunetutil.la \
49  $(top_builddir)/src/testing/libgnunettesting.la \
50  libgnunettestbed.la \
51  $(LTLIBINTL) -lz
52 gnunet_helper_testbed_DEPENDENCIES = \
53   gnunet-service-testbed.$(OBJEXT) \
54   libgnunettestbed.la
55
56 lib_LTLIBRARIES = \
57   libgnunettestbed.la
58
59 libgnunettestbed_la_SOURCES = \
60   testbed_api.c testbed_api.h testbed.h \
61   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
62   testbed_api_operations.c testbed_api_operations.h \
63   testbed_api_peers.c testbed_api_peers.h \
64   testbed_api_services.c \
65   testbed_api_statistics.c \
66   testbed_api_testbed.c \
67   testbed_api_test.c \
68   testbed_api_topology.c
69 libgnunettestbed_la_LIBADD = $(XLIB) \
70  $(top_builddir)/src/core/libgnunetcore.la \
71  $(top_builddir)/src/statistics/libgnunetstatistics.la \
72  $(top_builddir)/src/transport/libgnunettransport.la \
73  $(top_builddir)/src/hello/libgnunethello.la \
74  -lm \
75  $(top_builddir)/src/util/libgnunetutil.la \
76  $(top_builddir)/src/testing/libgnunettesting.la \
77  $(LTLIBINTL)
78 libgnunettestbed_la_LDFLAGS = \
79  $(GN_LIB_LDFLAGS) \
80  -version-info 0:0:0
81
82 check_PROGRAMS = \
83  test_testbed_api_hosts \
84  test_testbed_api_controllerlink \
85  test_testbed_api_2peers_1controller \
86  test_testbed_api_3peers_3controllers \
87  test_testbed_api \
88  test_testbed_api_operations \
89  test_testbed_api_testbed_run \
90  test_testbed_api_test \
91  test_gnunet_helper_testbed \
92  test_testbed_api_topology \
93  test_testbed_api_topology_clique \
94  test_testbed_api_testbed_run_topologyrandom \
95  test_testbed_api_testbed_run_topologyline \
96  test_testbed_api_testbed_run_topologyclique \
97  test_testbed_api_testbed_run_topologyring \
98  test_testbed_api_testbed_run_topologysmallworldring
99
100 if ENABLE_TEST_RUN
101  TESTS = \
102   test_testbed_api \
103   test_testbed_api_hosts \
104   test_testbed_api_2peers_1controller \
105   test_testbed_api_3peers_3controllers \
106   test_testbed_api_operations \
107   test_gnunet_helper_testbed \
108   test_testbed_api_controllerlink \
109   test_testbed_api_testbed_run \
110   test_testbed_api_test \
111   test_testbed_api_topology \
112   test_testbed_api_topology_clique \
113  test_testbed_api_testbed_run_topologyrandom \
114  test_testbed_api_testbed_run_topologyline \
115  test_testbed_api_testbed_run_topologyclique \
116  test_testbed_api_testbed_run_topologyring \
117  test_testbed_api_testbed_run_topologysmallworldring
118 endif
119
120 test_testbed_api_hosts_SOURCES = \
121  test_testbed_api_hosts.c
122 test_testbed_api_hosts_LDADD = \
123  $(top_builddir)/src/util/libgnunetutil.la \
124  libgnunettestbed.la
125
126 test_testbed_api_SOURCES = \
127  test_testbed_api.c
128 test_testbed_api_LDADD = \
129  $(top_builddir)/src/util/libgnunetutil.la \
130  $(top_builddir)/src/testing/libgnunettesting.la \
131  $(top_builddir)/src/dht/libgnunetdht.la \
132  libgnunettestbed.la
133
134 test_testbed_api_2peers_1controller_SOURCES = \
135  test_testbed_api_2peers_1controller.c
136 test_testbed_api_2peers_1controller_LDADD = \
137  $(top_builddir)/src/util/libgnunetutil.la \
138  $(top_builddir)/src/testing/libgnunettesting.la \
139  libgnunettestbed.la
140
141 test_testbed_api_3peers_3controllers_SOURCES = \
142  test_testbed_api_3peers_3controllers.c
143 test_testbed_api_3peers_3controllers_LDADD = \
144  $(top_builddir)/src/util/libgnunetutil.la \
145  $(top_builddir)/src/testing/libgnunettesting.la \
146  libgnunettestbed.la
147
148 test_testbed_api_operations_SOURCES = \
149  test_testbed_api_operations.c
150 test_testbed_api_operations_LDADD = \
151  $(top_builddir)/src/util/libgnunetutil.la \
152  libgnunettestbed.la
153
154 test_testbed_api_controllerlink_SOURCES = \
155  test_testbed_api_controllerlink.c
156 test_testbed_api_controllerlink_LDADD = \
157  $(top_builddir)/src/util/libgnunetutil.la \
158  libgnunettestbed.la
159
160 test_testbed_api_testbed_run_SOURCES = \
161  test_testbed_api_testbed_run.c
162 test_testbed_api_testbed_run_LDADD = \
163  $(top_builddir)/src/util/libgnunetutil.la \
164  libgnunettestbed.la
165
166 test_testbed_api_test_SOURCES = \
167  test_testbed_api_test.c
168 test_testbed_api_test_LDADD = \
169  $(top_builddir)/src/util/libgnunetutil.la \
170  libgnunettestbed.la
171
172 test_testbed_api_topology_SOURCES = \
173  test_testbed_api_topology.c
174 test_testbed_api_topology_LDADD = \
175  $(top_builddir)/src/util/libgnunetutil.la \
176  libgnunettestbed.la
177
178 test_testbed_api_topology_clique_SOURCES = \
179  test_testbed_api_topology_clique.c
180 test_testbed_api_topology_clique_LDADD = \
181  $(top_builddir)/src/util/libgnunetutil.la \
182  libgnunettestbed.la
183
184 test_gnunet_helper_testbed_SOURCES = \
185  test_gnunet_helper_testbed.c
186 test_gnunet_helper_testbed_LDADD = \
187  $(top_builddir)/src/util/libgnunetutil.la \
188  libgnunettestbed.la \
189  -lz
190
191 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
192  test_testbed_api_testbed_run.c
193 test_testbed_api_testbed_run_topologyrandom_LDADD = \
194  $(top_builddir)/src/util/libgnunetutil.la \
195  libgnunettestbed.la
196
197 test_testbed_api_testbed_run_topologyline_SOURCES = \
198  test_testbed_api_testbed_run.c
199 test_testbed_api_testbed_run_topologyline_LDADD = \
200  $(top_builddir)/src/util/libgnunetutil.la \
201  libgnunettestbed.la
202
203 test_testbed_api_testbed_run_topologyclique_SOURCES = \
204  test_testbed_api_testbed_run.c
205 test_testbed_api_testbed_run_topologyclique_LDADD = \
206  $(top_builddir)/src/util/libgnunetutil.la \
207  libgnunettestbed.la
208
209 test_testbed_api_testbed_run_topologyring_SOURCES = \
210  test_testbed_api_testbed_run.c
211 test_testbed_api_testbed_run_topologyring_LDADD = \
212  $(top_builddir)/src/util/libgnunetutil.la \
213  libgnunettestbed.la
214
215 test_testbed_api_testbed_run_topologysmallworldring_SOURCES = \
216  test_testbed_api_testbed_run.c
217 test_testbed_api_testbed_run_topologysmallworldring_LDADD = \
218  $(top_builddir)/src/util/libgnunetutil.la \
219  libgnunettestbed.la
220
221 EXTRA_DIST = \
222   test_testbed_api.conf \
223   test_testbed_api_testbed_run_topologyring.conf \
224   test_testbed_api_testbed_run_topologyclique.conf \
225   test_testbed_api_testbed_run_topologyline.conf \
226   test_testbed_api_testbed_run_topologyrandom.conf \
227   test_testbed_api_testbed_run_topologysmallworldring.conf \
228   sample_hosts.txt