e37d0ce11d3c52ab060f46b93e4f702c45b962d5
[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 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 pkgcfg_DATA = \
15   testbed.conf
16
17 bin_PROGRAMS = \
18   gnunet-service-testbed \
19   gnunet-helper-testbed
20
21 noinst_PROGRAMS = \
22   gnunet-testbed-profiler
23
24 gnunet_service_testbed_SOURCES = \
25   gnunet-service-testbed.c
26 gnunet_service_testbed_LDADD = $(XLIB) \
27  $(top_builddir)/src/util/libgnunetutil.la \
28  $(top_builddir)/src/core/libgnunetcore.la \
29  $(top_builddir)/src/hello/libgnunethello.la \
30  $(top_builddir)/src/transport/libgnunettransport.la \
31  $(top_builddir)/src/testing/libgnunettesting.la \
32  $(top_builddir)/src/testbed/libgnunettestbed.la \
33  $(LTLIBINTL) -lz
34 gnunet_service_testbed_DEPENDENCIES = \
35   libgnunettestbed.la
36
37 gnunet_testbed_profiler_SOURCES = \
38   gnunet-testbed-profiler.c
39 gnunet_testbed_profiler_LDADD = $(XLIB) \
40  $(top_builddir)/src/util/libgnunetutil.la \
41  libgnunettestbed.la
42
43 gnunet_helper_testbed_SOURCES = \
44   gnunet-helper-testbed.c
45 gnunet_helper_testbed_LDADD = $(XLIB) \
46  $(top_builddir)/src/util/libgnunetutil.la \
47  $(top_builddir)/src/testing/libgnunettesting.la \
48  libgnunettestbed.la \
49  $(LTLIBINTL) -lz
50 gnunet_helper_testbed_DEPENDENCIES = \
51   gnunet-service-testbed.$(OBJEXT) \
52   libgnunettestbed.la
53
54 lib_LTLIBRARIES = \
55   libgnunettestbed.la
56
57 libgnunettestbed_la_SOURCES = \
58   testbed_api.c testbed_api.h testbed.h \
59   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
60   testbed_api_operations.c testbed_api_operations.h \
61   testbed_api_peers.c testbed_api_peers.h \
62   testbed_api_services.c \
63   testbed_api_statistics.c \
64   testbed_api_testbed.c \
65   testbed_api_test.c \
66   testbed_api_topology.c
67 libgnunettestbed_la_LIBADD = $(XLIB) \
68  $(top_builddir)/src/core/libgnunetcore.la \
69  $(top_builddir)/src/statistics/libgnunetstatistics.la \
70  $(top_builddir)/src/transport/libgnunettransport.la \
71  $(top_builddir)/src/hello/libgnunethello.la \
72  -lm \
73  $(top_builddir)/src/util/libgnunetutil.la \
74  $(top_builddir)/src/testing/libgnunettesting.la \
75  $(LTLIBINTL)
76 libgnunettestbed_la_LDFLAGS = \
77  $(GN_LIB_LDFLAGS) \
78  -version-info 0:0:0
79
80 check_PROGRAMS = \
81  test_testbed_api_hosts \
82  test_testbed_api_controllerlink \
83  test_testbed_api_2peers_1controller \
84  test_testbed_api_3peers_3controllers \
85  test_testbed_api \
86  test_testbed_api_operations \
87  test_testbed_api_testbed_run \
88  test_testbed_api_test \
89  test_gnunet_helper_testbed \
90  test_testbed_api_topology \
91  test_testbed_api_topology_clique
92
93 if ENABLE_TEST_RUN
94  TESTS = \
95   test_testbed_api \
96   test_testbed_api_hosts \
97   test_testbed_api_2peers_1controller \
98   test_testbed_api_3peers_3controllers \
99   test_testbed_api_operations \
100   test_gnunet_helper_testbed \
101   test_testbed_api_controllerlink \
102   test_testbed_api_testbed_run \
103   test_testbed_api_test \
104   test_testbed_api_topology \
105   test_testbed_api_topology_clique
106 endif
107
108 test_testbed_api_hosts_SOURCES = \
109  test_testbed_api_hosts.c
110 test_testbed_api_hosts_LDADD = \
111  $(top_builddir)/src/util/libgnunetutil.la \
112  libgnunettestbed.la
113
114 test_testbed_api_SOURCES = \
115  test_testbed_api.c
116 test_testbed_api_LDADD = \
117  $(top_builddir)/src/util/libgnunetutil.la \
118  $(top_builddir)/src/testing/libgnunettesting.la \
119  $(top_builddir)/src/dht/libgnunetdht.la \
120  libgnunettestbed.la
121
122 test_testbed_api_2peers_1controller_SOURCES = \
123  test_testbed_api_2peers_1controller.c
124 test_testbed_api_2peers_1controller_LDADD = \
125  $(top_builddir)/src/util/libgnunetutil.la \
126  $(top_builddir)/src/testing/libgnunettesting.la \
127  libgnunettestbed.la
128
129 test_testbed_api_3peers_3controllers_SOURCES = \
130  test_testbed_api_3peers_3controllers.c
131 test_testbed_api_3peers_3controllers_LDADD = \
132  $(top_builddir)/src/util/libgnunetutil.la \
133  $(top_builddir)/src/testing/libgnunettesting.la \
134  libgnunettestbed.la
135
136 test_testbed_api_operations_SOURCES = \
137  test_testbed_api_operations.c
138 test_testbed_api_operations_LDADD = \
139  $(top_builddir)/src/util/libgnunetutil.la \
140  libgnunettestbed.la
141
142 test_testbed_api_controllerlink_SOURCES = \
143  test_testbed_api_controllerlink.c
144 test_testbed_api_controllerlink_LDADD = \
145  $(top_builddir)/src/util/libgnunetutil.la \
146  libgnunettestbed.la
147
148 test_testbed_api_testbed_run_SOURCES = \
149  test_testbed_api_testbed_run.c
150 test_testbed_api_testbed_run_LDADD = \
151  $(top_builddir)/src/util/libgnunetutil.la \
152  libgnunettestbed.la
153
154 test_testbed_api_test_SOURCES = \
155  test_testbed_api_test.c
156 test_testbed_api_test_LDADD = \
157  $(top_builddir)/src/util/libgnunetutil.la \
158  libgnunettestbed.la
159
160 test_testbed_api_topology_SOURCES = \
161  test_testbed_api_topology.c
162 test_testbed_api_topology_LDADD = \
163  $(top_builddir)/src/util/libgnunetutil.la \
164  libgnunettestbed.la
165
166 test_testbed_api_topology_clique_SOURCES = \
167  test_testbed_api_topology_clique.c
168 test_testbed_api_topology_clique_LDADD = \
169  $(top_builddir)/src/util/libgnunetutil.la \
170  libgnunettestbed.la
171
172 test_gnunet_helper_testbed_SOURCES = \
173  test_gnunet_helper_testbed.c
174 test_gnunet_helper_testbed_LDADD = \
175  $(top_builddir)/src/util/libgnunetutil.la \
176  libgnunettestbed.la \
177  -lz