added testing configuration files
[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
98 if ENABLE_TEST_RUN
99  TESTS = \
100   test_testbed_api \
101   test_testbed_api_hosts \
102   test_testbed_api_2peers_1controller \
103   test_testbed_api_3peers_3controllers \
104   test_testbed_api_operations \
105   test_gnunet_helper_testbed \
106   test_testbed_api_controllerlink \
107   test_testbed_api_testbed_run \
108   test_testbed_api_test \
109   test_testbed_api_topology \
110   test_testbed_api_topology_clique \
111  test_testbed_api_testbed_run_topologyrandom \
112  test_testbed_api_testbed_run_topologyline \
113  test_testbed_api_testbed_run_topologyclique
114 endif
115
116 test_testbed_api_hosts_SOURCES = \
117  test_testbed_api_hosts.c
118 test_testbed_api_hosts_LDADD = \
119  $(top_builddir)/src/util/libgnunetutil.la \
120  libgnunettestbed.la
121
122 test_testbed_api_SOURCES = \
123  test_testbed_api.c
124 test_testbed_api_LDADD = \
125  $(top_builddir)/src/util/libgnunetutil.la \
126  $(top_builddir)/src/testing/libgnunettesting.la \
127  $(top_builddir)/src/dht/libgnunetdht.la \
128  libgnunettestbed.la
129
130 test_testbed_api_2peers_1controller_SOURCES = \
131  test_testbed_api_2peers_1controller.c
132 test_testbed_api_2peers_1controller_LDADD = \
133  $(top_builddir)/src/util/libgnunetutil.la \
134  $(top_builddir)/src/testing/libgnunettesting.la \
135  libgnunettestbed.la
136
137 test_testbed_api_3peers_3controllers_SOURCES = \
138  test_testbed_api_3peers_3controllers.c
139 test_testbed_api_3peers_3controllers_LDADD = \
140  $(top_builddir)/src/util/libgnunetutil.la \
141  $(top_builddir)/src/testing/libgnunettesting.la \
142  libgnunettestbed.la
143
144 test_testbed_api_operations_SOURCES = \
145  test_testbed_api_operations.c
146 test_testbed_api_operations_LDADD = \
147  $(top_builddir)/src/util/libgnunetutil.la \
148  libgnunettestbed.la
149
150 test_testbed_api_controllerlink_SOURCES = \
151  test_testbed_api_controllerlink.c
152 test_testbed_api_controllerlink_LDADD = \
153  $(top_builddir)/src/util/libgnunetutil.la \
154  libgnunettestbed.la
155
156 test_testbed_api_testbed_run_SOURCES = \
157  test_testbed_api_testbed_run.c
158 test_testbed_api_testbed_run_LDADD = \
159  $(top_builddir)/src/util/libgnunetutil.la \
160  libgnunettestbed.la
161
162 test_testbed_api_test_SOURCES = \
163  test_testbed_api_test.c
164 test_testbed_api_test_LDADD = \
165  $(top_builddir)/src/util/libgnunetutil.la \
166  libgnunettestbed.la
167
168 test_testbed_api_topology_SOURCES = \
169  test_testbed_api_topology.c
170 test_testbed_api_topology_LDADD = \
171  $(top_builddir)/src/util/libgnunetutil.la \
172  libgnunettestbed.la
173
174 test_testbed_api_topology_clique_SOURCES = \
175  test_testbed_api_topology_clique.c
176 test_testbed_api_topology_clique_LDADD = \
177  $(top_builddir)/src/util/libgnunetutil.la \
178  libgnunettestbed.la
179
180 test_gnunet_helper_testbed_SOURCES = \
181  test_gnunet_helper_testbed.c
182 test_gnunet_helper_testbed_LDADD = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  libgnunettestbed.la \
185  -lz
186
187 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
188  test_testbed_api_testbed_run.c
189 test_testbed_api_testbed_run_topologyrandom_LDADD = \
190  $(top_builddir)/src/util/libgnunetutil.la \
191  libgnunettestbed.la
192
193 test_testbed_api_testbed_run_topologyline_SOURCES = \
194  test_testbed_api_testbed_run.c
195 test_testbed_api_testbed_run_topologyline_LDADD = \
196  $(top_builddir)/src/util/libgnunetutil.la \
197  libgnunettestbed.la
198
199 test_testbed_api_testbed_run_topologyclique_SOURCES = \
200  test_testbed_api_testbed_run.c
201 test_testbed_api_testbed_run_topologyclique_LDADD = \
202  $(top_builddir)/src/util/libgnunetutil.la \
203  libgnunettestbed.la
204
205
206 EXTRA_DIST = \
207   test_testbed_api.conf \
208   test_testbed_api_testbed_run_topologyclique.conf \
209   test_testbed_api_testbed_run_topologyline.conf \
210   test_testbed_api_testbed_run_topologyrandom.conf