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