fixes
[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
92 if ENABLE_TEST_RUN
93  TESTS = \
94   test_testbed_api \
95   test_testbed_api_hosts \
96   test_testbed_api_2peers_1controller \
97   test_testbed_api_3peers_3controllers \
98   test_testbed_api_operations \
99   test_gnunet_helper_testbed \
100   test_testbed_api_controllerlink \
101   test_testbed_api_testbed_run \
102   test_testbed_api_test \
103   test_testbed_api_topology
104 endif
105
106 test_testbed_api_hosts_SOURCES = \
107  test_testbed_api_hosts.c
108 test_testbed_api_hosts_LDADD = \
109  $(top_builddir)/src/util/libgnunetutil.la \
110  libgnunettestbed.la
111
112 test_testbed_api_SOURCES = \
113  test_testbed_api.c
114 test_testbed_api_LDADD = \
115  $(top_builddir)/src/util/libgnunetutil.la \
116  $(top_builddir)/src/testing/libgnunettesting.la \
117  $(top_builddir)/src/dht/libgnunetdht.la \
118  libgnunettestbed.la
119
120 test_testbed_api_2peers_1controller_SOURCES = \
121  test_testbed_api_2peers_1controller.c
122 test_testbed_api_2peers_1controller_LDADD = \
123  $(top_builddir)/src/util/libgnunetutil.la \
124  $(top_builddir)/src/testing/libgnunettesting.la \
125  libgnunettestbed.la
126
127 test_testbed_api_3peers_3controllers_SOURCES = \
128  test_testbed_api_3peers_3controllers.c
129 test_testbed_api_3peers_3controllers_LDADD = \
130  $(top_builddir)/src/util/libgnunetutil.la \
131  $(top_builddir)/src/testing/libgnunettesting.la \
132  libgnunettestbed.la
133
134 test_testbed_api_operations_SOURCES = \
135  test_testbed_api_operations.c
136 test_testbed_api_operations_LDADD = \
137  $(top_builddir)/src/util/libgnunetutil.la \
138  libgnunettestbed.la
139
140 test_testbed_api_controllerlink_SOURCES = \
141  test_testbed_api_controllerlink.c
142 test_testbed_api_controllerlink_LDADD = \
143  $(top_builddir)/src/util/libgnunetutil.la \
144  libgnunettestbed.la
145
146 test_testbed_api_testbed_run_SOURCES = \
147  test_testbed_api_testbed_run.c
148 test_testbed_api_testbed_run_LDADD = \
149  $(top_builddir)/src/util/libgnunetutil.la \
150  libgnunettestbed.la
151
152 test_testbed_api_test_SOURCES = \
153  test_testbed_api_test.c
154 test_testbed_api_test_LDADD = \
155  $(top_builddir)/src/util/libgnunetutil.la \
156  libgnunettestbed.la
157
158 test_testbed_api_topology_SOURCES = \
159  test_testbed_api_topology.c
160 test_testbed_api_topology_LDADD = \
161  $(top_builddir)/src/util/libgnunetutil.la \
162  libgnunettestbed.la
163
164 test_gnunet_helper_testbed_SOURCES = \
165  test_gnunet_helper_testbed.c
166 test_gnunet_helper_testbed_LDADD = \
167  $(top_builddir)/src/util/libgnunetutil.la \
168  libgnunettestbed.la \
169  -lz