-use blocking wait as the pipe might be faster than the process cleanup
[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 gnunet_service_testbed_SOURCES = \
22   gnunet-service-testbed.c
23 gnunet_service_testbed_LDADD = $(XLIB) \
24  $(top_builddir)/src/util/libgnunetutil.la \
25  $(top_builddir)/src/core/libgnunetcore.la \
26  $(top_builddir)/src/hello/libgnunethello.la \
27  $(top_builddir)/src/transport/libgnunettransport.la \
28  $(top_builddir)/src/testing/libgnunettesting.la \
29  $(top_builddir)/src/testbed/libgnunettestbed.la \
30  $(LTLIBINTL) -lz
31 gnunet_service_testbed_DEPENDENCIES = \
32   libgnunettestbed.la
33
34 gnunet_helper_testbed_SOURCES = \
35   gnunet-helper-testbed.c
36 gnunet_helper_testbed_LDADD = $(XLIB) \
37  $(top_builddir)/src/util/libgnunetutil.la \
38  $(top_builddir)/src/testing/libgnunettesting.la \
39  libgnunettestbed.la \
40  $(LTLIBINTL) -lz
41 gnunet_helper_testbed_DEPENDENCIES = \
42   gnunet-service-testbed.$(OBJEXT) \
43   libgnunettestbed.la
44
45 lib_LTLIBRARIES = \
46   libgnunettestbed.la
47
48 libgnunettestbed_la_SOURCES = \
49   testbed_api.c testbed_api.h testbed.h \
50   testbed_api_hosts.c testbed_api_hosts.h testbed_helper.h \
51   testbed_api_operations.c testbed_api_operations.h \
52   testbed_api_peers.c testbed_api_peers.h \
53   testbed_api_services.c \
54   testbed_api_statistics.c \
55   testbed_api_testbed.c \
56   testbed_api_test.c \
57   testbed_api_topology.c
58 libgnunettestbed_la_LIBADD = $(XLIB) \
59  $(top_builddir)/src/core/libgnunetcore.la \
60  $(top_builddir)/src/statistics/libgnunetstatistics.la \
61  $(top_builddir)/src/transport/libgnunettransport.la \
62  $(top_builddir)/src/hello/libgnunethello.la \
63  -lm \
64  $(top_builddir)/src/util/libgnunetutil.la \
65  $(top_builddir)/src/testing/libgnunettesting.la \
66  $(LTLIBINTL)
67 libgnunettestbed_la_LDFLAGS = \
68  $(GN_LIB_LDFLAGS) \
69  -version-info 0:0:0
70
71 check_PROGRAMS = \
72  test_testbed_api_hosts \
73  test_testbed_api_controllerlink \
74  test_testbed_api_2peers_1controller \
75  test_testbed_api_2peers_2controllers \
76  test_testbed_api \
77  test_testbed_api_operations \
78  test_testbed_api_testbed_run \
79  test_testbed_api_test \
80  test_gnunet_helper_testbed
81
82 if ENABLE_TEST_RUN
83  TESTS = \
84   test_testbed_api \
85   test_testbed_api_hosts \
86   test_testbed_api_2peers_1controller \
87   test_testbed_api_2peers_2controllers \
88   test_testbed_api_operations \
89   test_gnunet_helper_testbed \
90   test_testbed_api_controllerlink \
91   test_testbed_api_testbed_run \
92   test_testbed_api_test
93 endif
94
95 test_testbed_api_hosts_SOURCES = \
96  test_testbed_api_hosts.c
97 test_testbed_api_hosts_LDADD = \
98  $(top_builddir)/src/util/libgnunetutil.la \
99  libgnunettestbed.la
100
101 test_testbed_api_SOURCES = \
102  test_testbed_api.c
103 test_testbed_api_LDADD = \
104  $(top_builddir)/src/util/libgnunetutil.la \
105  $(top_builddir)/src/testing/libgnunettesting.la \
106  $(top_builddir)/src/dht/libgnunetdht.la \
107  libgnunettestbed.la
108
109 test_testbed_api_2peers_1controller_SOURCES = \
110  test_testbed_api_2peers_1controller.c
111 test_testbed_api_2peers_1controller_LDADD = \
112  $(top_builddir)/src/util/libgnunetutil.la \
113  $(top_builddir)/src/testing/libgnunettesting.la \
114  libgnunettestbed.la
115
116 test_testbed_api_2peers_2controllers_SOURCES = \
117  test_testbed_api_2peers_2controllers.c
118 test_testbed_api_2peers_2controllers_LDADD = \
119  $(top_builddir)/src/util/libgnunetutil.la \
120  $(top_builddir)/src/testing/libgnunettesting.la \
121  libgnunettestbed.la
122
123 test_testbed_api_operations_SOURCES = \
124  test_testbed_api_operations.c
125 test_testbed_api_operations_LDADD = \
126  $(top_builddir)/src/util/libgnunetutil.la \
127  libgnunettestbed.la
128
129 test_testbed_api_controllerlink_SOURCES = \
130  test_testbed_api_controllerlink.c
131 test_testbed_api_controllerlink_LDADD = \
132  $(top_builddir)/src/util/libgnunetutil.la \
133  libgnunettestbed.la
134
135 test_testbed_api_testbed_run_SOURCES = \
136  test_testbed_api_testbed_run.c
137 test_testbed_api_testbed_run_LDADD = \
138  $(top_builddir)/src/util/libgnunetutil.la \
139  libgnunettestbed.la
140
141 test_testbed_api_test_SOURCES = \
142  test_testbed_api_test.c
143 test_testbed_api_test_LDADD = \
144  $(top_builddir)/src/util/libgnunetutil.la \
145  libgnunettestbed.la
146
147 test_gnunet_helper_testbed_SOURCES = \
148  test_gnunet_helper_testbed.c
149 test_gnunet_helper_testbed_LDADD = \
150  $(top_builddir)/src/util/libgnunetutil.la \
151  libgnunettestbed.la \
152  -lz