working TCP PWNAT implementation (at least on my machine), also base testcase and...
[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 endif
8
9 if HAVE_MHD 
10  GN_LIBMHD = -lmicrohttpd
11  HTTP_PLUGIN_LA = libgnunet_plugin_transport_http.la
12  HTTP_PLUGIN_CHECK = test_plugin_transport_http
13 endif
14
15 if USE_COVERAGE
16   AM_CFLAGS = --coverage -O0
17 endif
18
19 if LINUX
20 NATBIN = gnunet-nat-server gnunet-nat-client
21 install-exec-hook:
22         chown root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client || true
23         chmod u+s $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client || true
24 else
25 install-exec-hook:
26 endif
27
28
29 lib_LTLIBRARIES = \
30   libgnunettransport.la
31
32 libgnunettransport_la_SOURCES = \
33   transport_api.c transport.h \
34   transport_api_blacklist.c \
35   transport_api_address_lookup.c 
36 libgnunettransport_la_LIBADD = \
37   $(top_builddir)/src/hello/libgnunethello.la \
38   $(top_builddir)/src/util/libgnunetutil.la \
39   $(GN_LIBINTL) 
40 libgnunettransport_la_LDFLAGS = \
41   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
42   -version-info 0:0:0
43
44
45 bin_PROGRAMS = \
46  gnunet-transport \
47  gnunet-service-transport $(NATBIN)
48
49
50 gnunet_nat_server_SOURCES = \
51  gnunet-nat-server.c         
52
53 gnunet_nat_client_SOURCES = \
54  gnunet-nat-client.c         
55
56 gnunet_transport_SOURCES = \
57  gnunet-transport.c         
58 gnunet_transport_LDADD = \
59   $(top_builddir)/src/transport/libgnunettransport.la \
60   $(top_builddir)/src/util/libgnunetutil.la \
61   $(GN_LIBINTL)
62
63 gnunet_service_transport_SOURCES = \
64  gnunet-service-transport.c plugin_transport.h 
65 gnunet_service_transport_LDADD = \
66   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
67   $(top_builddir)/src/statistics/libgnunetstatistics.la \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   $(GN_LIBINTL)
70
71
72 plugin_LTLIBRARIES = \
73   libgnunet_plugin_transport_tcp.la \
74   libgnunet_plugin_transport_udp.la \
75   $(HTTP_PLUGIN_LA) \
76   libgnunet_plugin_transport_template.la
77 # TODO: add http, nat, etc.
78
79 libgnunet_plugin_transport_tcp_la_SOURCES = \
80   plugin_transport_tcp.c
81 libgnunet_plugin_transport_tcp_la_LIBADD = \
82   $(top_builddir)/src/hello/libgnunethello.la \
83   $(top_builddir)/src/statistics/libgnunetstatistics.la \
84   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
85   $(top_builddir)/src/util/libgnunetutil.la 
86 libgnunet_plugin_transport_tcp_la_LDFLAGS = \
87  $(GN_PLUGIN_LDFLAGS)
88
89 libgnunet_plugin_transport_template_la_SOURCES = \
90   plugin_transport_template.c
91 libgnunet_plugin_transport_template_la_LIBADD = \
92   $(top_builddir)/src/util/libgnunetutil.la 
93 libgnunet_plugin_transport_template_la_LDFLAGS = \
94  $(GN_PLUGIN_LDFLAGS)
95
96 libgnunet_plugin_transport_udp_la_SOURCES = \
97   plugin_transport_udp.c
98 libgnunet_plugin_transport_udp_la_LIBADD = \
99   $(top_builddir)/src/hello/libgnunethello.la \
100   $(top_builddir)/src/statistics/libgnunetstatistics.la \
101   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
102   $(top_builddir)/src/util/libgnunetutil.la 
103 libgnunet_plugin_transport_udp_la_LDFLAGS = \
104  $(GN_PLUGIN_LDFLAGS)
105
106 #libgnunet_plugin_transport_udp_nat_la_SOURCES = \
107 #  plugin_transport_udp_nat.c
108 #libgnunet_plugin_transport_udp_nat_la_LIBADD = \
109 #  $(top_builddir)/src/hello/libgnunethello.la \
110 #  $(top_builddir)/src/statistics/libgnunetstatistics.la \
111 #  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
112 #  $(top_builddir)/src/util/libgnunetutil.la 
113 #libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
114 # $(GN_PLUGIN_LDFLAGS)
115
116 if HAVE_MHD 
117 libgnunet_plugin_transport_http_la_SOURCES = \
118   plugin_transport_http.c
119 libgnunet_plugin_transport_http_la_LIBADD = \
120   $(top_builddir)/src/hello/libgnunethello.la \
121   $(top_builddir)/src/statistics/libgnunetstatistics.la \
122   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
123   @LIBCURL@ \
124   $(top_builddir)/src/util/libgnunetutil.la 
125 libgnunet_plugin_transport_http_la_LDFLAGS = \
126  $(GN_LIBMHD) \
127  $(GN_PLUGIN_LDFLAGS)
128 endif
129
130 check_PROGRAMS = \
131  test_transport_api_tcp \
132  test_transport_api_tcp_nat \
133  test_transport_api_udp \
134  $(HTTP_PLUGIN_CHECK) \
135  test_transport_api_udp_nat \
136  test_transport_api_reliability_tcp \
137  test_transport_api_reliability_tcp_nat 
138 # test_transport_api_http \
139 # TODO: add tests for http, nat, etc.
140
141 TESTS = $(check_PROGRAMS)
142
143 test_transport_api_tcp_SOURCES = \
144  test_transport_api.c
145 test_transport_api_tcp_LDADD = \
146  $(top_builddir)/src/transport/libgnunettransport.la \
147  $(top_builddir)/src/util/libgnunetutil.la  
148
149 test_transport_api_tcp_nat_SOURCES = \
150  test_transport_api.c
151 test_transport_api_tcp_nat_LDADD = \
152  $(top_builddir)/src/transport/libgnunettransport.la \
153  $(top_builddir)/src/util/libgnunetutil.la  
154  
155 test_transport_api_reliability_tcp_SOURCES = \
156  test_transport_api_reliability.c
157 test_transport_api_reliability_tcp_LDADD = \
158  $(top_builddir)/src/transport/libgnunettransport.la \
159  $(top_builddir)/src/util/libgnunetutil.la  
160
161 test_transport_api_reliability_tcp_nat_SOURCES = \
162  test_transport_api_reliability.c
163 test_transport_api_reliability_tcp_nat_LDADD = \
164  $(top_builddir)/src/transport/libgnunettransport.la \
165  $(top_builddir)/src/util/libgnunetutil.la 
166  
167 test_transport_api_udp_SOURCES = \
168  test_transport_api.c
169 test_transport_api_udp_LDADD = \
170  $(top_builddir)/src/transport/libgnunettransport.la \
171  $(top_builddir)/src/util/libgnunetutil.la  
172
173 test_transport_api_udp_nat_SOURCES = \
174  test_transport_api.c
175 test_transport_api_udp_nat_LDADD = \
176  $(top_builddir)/src/transport/libgnunettransport.la \
177  $(top_builddir)/src/util/libgnunetutil.la  
178
179 #test_transport_api_http_SOURCES = \
180 # test_transport_api.c
181 #test_transport_api_http_LDADD = \
182 # $(top_builddir)/src/transport/libgnunettransport.la \
183 # $(top_builddir)/src/util/libgnunetutil.la  
184
185 test_plugin_transport_http_SOURCES = \
186  test_plugin_transport_http.c
187 test_plugin_transport_http_LDADD = \
188  $(top_builddir)/src/transport/libgnunettransport.la \
189  $(top_builddir)/src/statistics/libgnunetstatistics.la \
190  @LIBCURL@ \
191  $(top_builddir)/src/util/libgnunetutil.la  
192
193
194 EXTRA_DIST = \
195   test_transport_api_data.conf \
196   test_transport_api_tcp_peer1.conf \
197   test_transport_api_tcp_peer2.conf \
198   test_transport_api_udp_peer1.conf \
199   test_transport_api_udp_peer2.conf \
200   test_transport_api_udp_nat_peer1.conf \
201   test_transport_api_udp_nat_peer2.conf \
202   test_transport_api_tcp_nat_peer1.conf \
203   test_transport_api_tcp_nat_peer2.conf \
204   test_plugin_transport_data.conf \
205   test_plugin_transport_data_http.conf