skeleton for list_updateable testcase
[oweals/gnunet.git] / src / transport / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 if MINGW
6   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
7   NATBIN = gnunet-nat-server gnunet-nat-client
8   NATSERVER = gnunet-nat-server-windows.c
9   NATCLIENT = gnunet-nat-client-windows.c
10 else
11   NATSERVER = gnunet-nat-server.c
12   NATCLIENT = gnunet-nat-client.c
13 endif
14
15 if HAVE_MHD
16  GN_LIBMHD = -lmicrohttpd
17  HTTP_PLUGIN_LA = libgnunet_plugin_transport_http.la
18  HTTP_PLUGIN_TEST = test_plugin_transport_http
19  HTTP_API_TEST = test_transport_api_http
20  HTTP_REL_TEST = test_transport_api_reliability_http
21
22  HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la
23  HTTPS_PLUGIN_TEST = test_plugin_transport_https
24  HTTPS_API_TEST = test_transport_api_https
25  HTTPS_REL_TEST = test_transport_api_reliability_https                     
26 endif
27
28 if USE_COVERAGE
29   AM_CFLAGS = --coverage -O0
30 endif
31
32 if HAVE_PCAP
33 if LINUX
34 WANBIN = gnunet-transport-wlan-helper
35 WLAN_PLUGIN_LA = libgnunet_plugin_transport_wlan.la
36 endif
37 endif
38
39 if LINUX
40 NATBIN = gnunet-nat-server gnunet-nat-client
41 install-exec-hook:
42         chown root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-wlan || true
43         chmod u+s $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-wlan || true
44 else
45 install-exec-hook:
46 endif
47
48 #noinst_PROGRAMS = ${check_PROGRAMS}
49
50 lib_LTLIBRARIES = \
51   libgnunettransport.la
52
53 libgnunettransport_la_SOURCES = \
54   transport_api.c transport.h \
55   transport_api_blacklist.c \
56   transport_api_address_lookup.c 
57 libgnunettransport_la_LIBADD = \
58   $(top_builddir)/src/hello/libgnunethello.la \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(GN_LIBINTL) 
61 libgnunettransport_la_LDFLAGS = \
62   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
63   -version-info 0:0:0
64
65
66 bin_PROGRAMS = \
67  gnunet-transport \
68  $(WANBIN) \
69  gnunet-service-transport $(NATBIN)
70
71 bin_SCRIPTS = \
72  gnunet-transport-certificate-creation
73
74 gnunet_nat_server_SOURCES = \
75  $(NATSERVER)
76  
77 gnunet_transport_wlan_helper_SOURCES = \
78  gnunet-transport-wlan-helper.c         
79 gnunet_transport_wlan_helper_LDADD = \
80  -lpcap
81
82 gnunet_nat_client_SOURCES = \
83  $(NATCLIENT)         
84
85 gnunet_transport_SOURCES = \
86  gnunet-transport.c         
87 gnunet_transport_LDADD = \
88   $(top_builddir)/src/transport/libgnunettransport.la \
89   $(top_builddir)/src/util/libgnunetutil.la \
90   $(GN_LIBINTL)
91
92 gnunet_service_transport_SOURCES = \
93  gnunet-service-transport.c plugin_transport.h 
94 gnunet_service_transport_LDADD = \
95   $(top_builddir)/src/hello/libgnunethello.la \
96   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
97   $(top_builddir)/src/statistics/libgnunetstatistics.la \
98   $(top_builddir)/src/util/libgnunetutil.la \
99   $(GN_LIBINTL)
100
101
102 plugin_LTLIBRARIES = \
103   libgnunet_plugin_transport_tcp.la \
104   libgnunet_plugin_transport_udp.la \
105   $(HTTP_PLUGIN_LA) \
106   $(HTTPS_PLUGIN_LA) \
107   $(WLAN_PLUGIN_LA) \
108   libgnunet_plugin_transport_template.la
109 # TODO: add nat, etc.
110
111 libgnunet_plugin_transport_tcp_la_SOURCES = \
112   plugin_transport_tcp.c
113 libgnunet_plugin_transport_tcp_la_LIBADD = \
114   $(top_builddir)/src/hello/libgnunethello.la \
115   $(top_builddir)/src/statistics/libgnunetstatistics.la \
116   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
117   $(top_builddir)/src/util/libgnunetutil.la 
118 libgnunet_plugin_transport_tcp_la_LDFLAGS = \
119  $(GN_PLUGIN_LDFLAGS)
120
121 libgnunet_plugin_transport_template_la_SOURCES = \
122   plugin_transport_template.c
123 libgnunet_plugin_transport_template_la_LIBADD = \
124   $(top_builddir)/src/util/libgnunetutil.la 
125 libgnunet_plugin_transport_template_la_LDFLAGS = \
126  $(GN_PLUGIN_LDFLAGS)
127
128 if HAVE_PCAP
129 if LINUX
130 libgnunet_plugin_transport_wlan_la_SOURCES = \
131         plugin_transport_wlan.c
132 libgnunet_plugin_transport_wlan_la_LIBADD = \
133         $(top_builddir)/src/hello/libgnunethello.la \
134         $(top_builddir)/src/statistics/libgnunetstatistics.la \
135         $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
136         $(top_builddir)/src/util/libgnunetutil.la 
137 libgnunet_plugin_transport_wlan_la_LDFLAGS = \
138         $(GN_PLUGIN_LDFLAGS)
139 endif
140 endif
141
142 libgnunet_plugin_transport_udp_la_SOURCES = \
143   plugin_transport_udp.c
144 libgnunet_plugin_transport_udp_la_LIBADD = \
145   $(top_builddir)/src/hello/libgnunethello.la \
146   $(top_builddir)/src/statistics/libgnunetstatistics.la \
147   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
148   $(top_builddir)/src/util/libgnunetutil.la 
149 libgnunet_plugin_transport_udp_la_LDFLAGS = \
150  $(GN_PLUGIN_LDFLAGS)
151
152 #libgnunet_plugin_transport_udp_nat_la_SOURCES = \
153 #  plugin_transport_udp_nat.c
154 #libgnunet_plugin_transport_udp_nat_la_LIBADD = \
155 #  $(top_builddir)/src/hello/libgnunethello.la \
156 #  $(top_builddir)/src/statistics/libgnunetstatistics.la \
157 #  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
158 #  $(top_builddir)/src/util/libgnunetutil.la 
159 #libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
160 # $(GN_PLUGIN_LDFLAGS)
161
162 if HAVE_MHD 
163 libgnunet_plugin_transport_http_la_SOURCES = \
164   plugin_transport_http.c
165 libgnunet_plugin_transport_http_la_LIBADD = \
166   $(top_builddir)/src/hello/libgnunethello.la \
167   $(top_builddir)/src/statistics/libgnunetstatistics.la \
168   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
169   @LIBCURL@ \
170   $(top_builddir)/src/util/libgnunetutil.la 
171 libgnunet_plugin_transport_http_la_LDFLAGS = \
172  $(GN_LIBMHD) \
173  $(GN_PLUGIN_LDFLAGS)
174  
175 libgnunet_plugin_transport_https_la_SOURCES = \
176   plugin_transport_https.c
177 libgnunet_plugin_transport_https_la_LIBADD = \
178   $(top_builddir)/src/hello/libgnunethello.la \
179   $(top_builddir)/src/statistics/libgnunetstatistics.la \
180   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
181   @LIBCURL@ \
182   $(top_builddir)/src/util/libgnunetutil.la 
183 libgnunet_plugin_transport_https_la_LDFLAGS = \
184  $(GN_LIBMHD) \
185  $(GN_PLUGIN_LDFLAGS) 
186 endif
187
188 check_PROGRAMS = \
189  test_transport_api_tcp \
190  test_transport_api_tcp_nat \
191  test_transport_api_udp \
192  test_transport_api_udp_nat \
193  $(HTTP_PLUGIN_TEST) \
194  $(HTTP_API_TEST) \
195  $(HTTPS_PLUGIN_TEST) \
196  $(HTTPS_API_TEST) \
197  test_transport_api_reliability_tcp \
198  test_transport_api_reliability_tcp_nat \
199  test_transport_api_reliability_udp \
200  $(HTTP_REL_TEST) \
201  $(HTTPS_REL_TEST)
202 # TODO: add tests for nat, etc.
203
204 if !DISABLE_TEST_RUN
205 TESTS = \
206  test_transport_api_tcp \
207  test_transport_api_tcp_nat \
208  test_transport_api_udp \
209  test_transport_api_udp_nat \
210  $(HTTP_PLUGIN_TEST) \
211  $(HTTP_API_TEST) \
212  $(HTTPS_PLUGIN_TEST) \
213  $(HTTPS_API_TEST) \
214  test_transport_api_reliability_tcp \
215  test_transport_api_reliability_tcp_nat \
216  $(HTTP_REL_TEST) \
217  $(HTTPS_REL_TEST)
218 endif
219
220 test_transport_api_tcp_SOURCES = \
221  test_transport_api.c
222 test_transport_api_tcp_LDADD = \
223  $(top_builddir)/src/transport/libgnunettransport.la \
224  $(top_builddir)/src/util/libgnunetutil.la  
225
226 test_transport_api_tcp_nat_SOURCES = \
227  test_transport_api.c
228 test_transport_api_tcp_nat_LDADD = \
229  $(top_builddir)/src/transport/libgnunettransport.la \
230  $(top_builddir)/src/util/libgnunetutil.la  
231
232 test_transport_api_reliability_tcp_SOURCES = \
233  test_transport_api_reliability.c
234 test_transport_api_reliability_tcp_LDADD = \
235  $(top_builddir)/src/transport/libgnunettransport.la \
236  $(top_builddir)/src/util/libgnunetutil.la  
237
238 test_transport_api_reliability_tcp_nat_SOURCES = \
239  test_transport_api_reliability.c
240 test_transport_api_reliability_tcp_nat_LDADD = \
241  $(top_builddir)/src/transport/libgnunettransport.la \
242  $(top_builddir)/src/util/libgnunetutil.la 
243
244 test_transport_api_reliability_udp_SOURCES = \
245  test_transport_api_reliability.c
246 test_transport_api_reliability_udp_LDADD = \
247  $(top_builddir)/src/transport/libgnunettransport.la \
248  $(top_builddir)/src/util/libgnunetutil.la   
249
250 test_transport_api_udp_SOURCES = \
251  test_transport_api.c
252 test_transport_api_udp_LDADD = \
253  $(top_builddir)/src/transport/libgnunettransport.la \
254  $(top_builddir)/src/util/libgnunetutil.la  
255
256 test_transport_api_udp_nat_SOURCES = \
257  test_transport_api.c
258 test_transport_api_udp_nat_LDADD = \
259  $(top_builddir)/src/transport/libgnunettransport.la \
260  $(top_builddir)/src/util/libgnunetutil.la  
261
262 if HAVE_MHD
263
264 test_plugin_transport_http_SOURCES = \
265  test_plugin_transport_http.c
266 test_plugin_transport_http_LDADD = \
267  $(top_builddir)/src/transport/libgnunettransport.la \
268  $(top_builddir)/src/statistics/libgnunetstatistics.la \
269  @LIBCURL@ \
270  $(top_builddir)/src/util/libgnunetutil.la  
271
272 test_transport_api_http_SOURCES = \
273  test_transport_api.c
274 test_transport_api_http_LDADD = \
275  $(top_builddir)/src/transport/libgnunettransport.la \
276  $(top_builddir)/src/util/libgnunetutil.la  
277
278 test_transport_api_reliability_http_SOURCES = \
279  test_transport_api_reliability.c
280 test_transport_api_reliability_http_LDADD = \
281  $(top_builddir)/src/transport/libgnunettransport.la \
282  $(top_builddir)/src/util/libgnunetutil.la
283  
284 test_plugin_transport_https_SOURCES = \
285  test_plugin_transport_https.c
286 test_plugin_transport_https_LDADD = \
287  $(top_builddir)/src/transport/libgnunettransport.la \
288  $(top_builddir)/src/statistics/libgnunetstatistics.la \
289  @LIBCURL@ \
290  $(top_builddir)/src/util/libgnunetutil.la  
291
292 test_transport_api_https_SOURCES = \
293  test_transport_api.c
294 test_transport_api_https_LDADD = \
295  $(top_builddir)/src/transport/libgnunettransport.la \
296  $(top_builddir)/src/util/libgnunetutil.la  
297  
298 test_transport_api_reliability_https_SOURCES = \
299  test_transport_api_reliability.c
300 test_transport_api_reliability_https_LDADD = \
301  $(top_builddir)/src/transport/libgnunettransport.la \
302  $(top_builddir)/src/util/libgnunetutil.la
303      
304 endif
305
306 EXTRA_DIST = \
307   test_transport_api_data.conf \
308   test_transport_api_tcp_peer1.conf \
309   test_transport_api_tcp_peer2.conf \
310   test_transport_api_udp_peer1.conf \
311   test_transport_api_udp_peer2.conf \
312   test_transport_api_udp_nat_peer1.conf \
313   test_transport_api_udp_nat_peer2.conf \
314   test_transport_api_tcp_nat_peer1.conf \
315   test_transport_api_tcp_nat_peer2.conf \
316   test_plugin_transport_data.conf \
317   test_transport_api_http_peer1.conf \
318   test_transport_api_http_peer2.conf \
319   test_transport_api_https_peer1.conf \
320   test_transport_api_https_peer2.conf \
321   test_transport_api_rel_http_peer1.conf \
322   test_transport_api_rel_http_peer2.conf \
323   test_transport_api_rel_https_peer1.conf \
324   test_transport_api_rel_https_peer2.conf \
325   test_plugin_transport_data_http.conf