initial checkin of https transport
[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                      test_transport_api_http \
14                      test_transport_api_reliability_http
15                      
16  HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la
17  HTTPS_PLUGIN_CHECK = test_plugin_transport_https \
18                       test_transport_api_https \
19                       test_transport_api_reliability_https                     
20 endif
21
22 if USE_COVERAGE
23   AM_CFLAGS = --coverage -O0
24 endif
25
26 if LINUX
27 NATBIN = gnunet-nat-server gnunet-nat-client
28 install-exec-hook:
29         chown root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client || true
30         chmod u+s $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client || true
31 else
32 install-exec-hook:
33         gnunet-transport-plugin-certificate-creation
34 endif
35
36
37 lib_LTLIBRARIES = \
38   libgnunettransport.la
39
40 libgnunettransport_la_SOURCES = \
41   transport_api.c transport.h \
42   transport_api_blacklist.c \
43   transport_api_address_lookup.c 
44 libgnunettransport_la_LIBADD = \
45   $(top_builddir)/src/hello/libgnunethello.la \
46   $(top_builddir)/src/util/libgnunetutil.la \
47   $(GN_LIBINTL) 
48 libgnunettransport_la_LDFLAGS = \
49   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
50   -version-info 0:0:0
51
52
53 bin_PROGRAMS = \
54  gnunet-transport \
55  gnunet-service-transport $(NATBIN)
56  
57 bin_SCRIPTS = \
58  gnunet-transport-certificate-creation
59
60 gnunet_nat_server_SOURCES = \
61  gnunet-nat-server.c         
62
63 gnunet_nat_client_SOURCES = \
64  gnunet-nat-client.c         
65
66 gnunet_transport_SOURCES = \
67  gnunet-transport.c         
68 gnunet_transport_LDADD = \
69   $(top_builddir)/src/transport/libgnunettransport.la \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(GN_LIBINTL)
72
73 gnunet_service_transport_SOURCES = \
74  gnunet-service-transport.c plugin_transport.h 
75 gnunet_service_transport_LDADD = \
76   $(top_builddir)/src/hello/libgnunethello.la \
77   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
78   $(top_builddir)/src/statistics/libgnunetstatistics.la \
79   $(top_builddir)/src/util/libgnunetutil.la \
80   $(GN_LIBINTL)
81
82
83 plugin_LTLIBRARIES = \
84   libgnunet_plugin_transport_tcp.la \
85   libgnunet_plugin_transport_udp.la \
86   $(HTTP_PLUGIN_LA) \
87   $(HTTPS_PLUGIN_LA) \
88   libgnunet_plugin_transport_template.la
89 # TODO: add nat, etc.
90
91 libgnunet_plugin_transport_tcp_la_SOURCES = \
92   plugin_transport_tcp.c
93 libgnunet_plugin_transport_tcp_la_LIBADD = \
94   $(top_builddir)/src/hello/libgnunethello.la \
95   $(top_builddir)/src/statistics/libgnunetstatistics.la \
96   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
97   $(top_builddir)/src/util/libgnunetutil.la 
98 libgnunet_plugin_transport_tcp_la_LDFLAGS = \
99  $(GN_PLUGIN_LDFLAGS)
100
101 libgnunet_plugin_transport_template_la_SOURCES = \
102   plugin_transport_template.c
103 libgnunet_plugin_transport_template_la_LIBADD = \
104   $(top_builddir)/src/util/libgnunetutil.la 
105 libgnunet_plugin_transport_template_la_LDFLAGS = \
106  $(GN_PLUGIN_LDFLAGS)
107
108 libgnunet_plugin_transport_udp_la_SOURCES = \
109   plugin_transport_udp.c
110 libgnunet_plugin_transport_udp_la_LIBADD = \
111   $(top_builddir)/src/hello/libgnunethello.la \
112   $(top_builddir)/src/statistics/libgnunetstatistics.la \
113   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
114   $(top_builddir)/src/util/libgnunetutil.la 
115 libgnunet_plugin_transport_udp_la_LDFLAGS = \
116  $(GN_PLUGIN_LDFLAGS)
117
118 #libgnunet_plugin_transport_udp_nat_la_SOURCES = \
119 #  plugin_transport_udp_nat.c
120 #libgnunet_plugin_transport_udp_nat_la_LIBADD = \
121 #  $(top_builddir)/src/hello/libgnunethello.la \
122 #  $(top_builddir)/src/statistics/libgnunetstatistics.la \
123 #  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
124 #  $(top_builddir)/src/util/libgnunetutil.la 
125 #libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
126 # $(GN_PLUGIN_LDFLAGS)
127
128 if HAVE_MHD 
129 libgnunet_plugin_transport_http_la_SOURCES = \
130   plugin_transport_http.c
131 libgnunet_plugin_transport_http_la_LIBADD = \
132   $(top_builddir)/src/hello/libgnunethello.la \
133   $(top_builddir)/src/statistics/libgnunetstatistics.la \
134   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
135   @LIBCURL@ \
136   $(top_builddir)/src/util/libgnunetutil.la 
137 libgnunet_plugin_transport_http_la_LDFLAGS = \
138  $(GN_LIBMHD) \
139  $(GN_PLUGIN_LDFLAGS)
140  
141 libgnunet_plugin_transport_https_la_SOURCES = \
142   plugin_transport_https.c
143 libgnunet_plugin_transport_https_la_LIBADD = \
144   $(top_builddir)/src/hello/libgnunethello.la \
145   $(top_builddir)/src/statistics/libgnunetstatistics.la \
146   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
147   @LIBCURL@ \
148   $(top_builddir)/src/util/libgnunetutil.la 
149 libgnunet_plugin_transport_https_la_LDFLAGS = \
150  $(GN_LIBMHD) \
151  $(GN_PLUGIN_LDFLAGS) 
152 endif
153
154 check_PROGRAMS = \
155  test_transport_api_tcp \
156  test_transport_api_tcp_nat \
157  test_transport_api_udp \
158  $(HTTP_PLUGIN_CHECK) \
159  $(HTTPS_PLUGIN_CHECK) \
160  test_transport_api_udp_nat \
161  test_transport_api_reliability_tcp \
162  test_transport_api_reliability_tcp_nat \
163  test_transport_api_reliability_udp
164 # TODO: add tests for nat, etc.
165
166 TESTS = \
167  test_transport_api_tcp \
168  test_transport_api_tcp_nat \
169  test_transport_api_udp \
170  test_transport_api_udp_nat \
171  $(HTTP_PLUGIN_CHECK) \
172  $(HTTPS_PLUGIN_CHECK) \
173  test_transport_api_reliability_tcp \
174  test_transport_api_reliability_tcp_nat
175
176 test_transport_api_tcp_SOURCES = \
177  test_transport_api.c
178 test_transport_api_tcp_LDADD = \
179  $(top_builddir)/src/transport/libgnunettransport.la \
180  $(top_builddir)/src/util/libgnunetutil.la  
181
182 test_transport_api_tcp_nat_SOURCES = \
183  test_transport_api.c
184 test_transport_api_tcp_nat_LDADD = \
185  $(top_builddir)/src/transport/libgnunettransport.la \
186  $(top_builddir)/src/util/libgnunetutil.la  
187
188 test_transport_api_reliability_tcp_SOURCES = \
189  test_transport_api_reliability.c
190 test_transport_api_reliability_tcp_LDADD = \
191  $(top_builddir)/src/transport/libgnunettransport.la \
192  $(top_builddir)/src/util/libgnunetutil.la  
193
194 test_transport_api_reliability_tcp_nat_SOURCES = \
195  test_transport_api_reliability.c
196 test_transport_api_reliability_tcp_nat_LDADD = \
197  $(top_builddir)/src/transport/libgnunettransport.la \
198  $(top_builddir)/src/util/libgnunetutil.la 
199
200 test_transport_api_reliability_udp_SOURCES = \
201  test_transport_api_reliability.c
202 test_transport_api_reliability_udp_LDADD = \
203  $(top_builddir)/src/transport/libgnunettransport.la \
204  $(top_builddir)/src/util/libgnunetutil.la   
205
206 test_transport_api_udp_SOURCES = \
207  test_transport_api.c
208 test_transport_api_udp_LDADD = \
209  $(top_builddir)/src/transport/libgnunettransport.la \
210  $(top_builddir)/src/util/libgnunetutil.la  
211
212 test_transport_api_udp_nat_SOURCES = \
213  test_transport_api.c
214 test_transport_api_udp_nat_LDADD = \
215  $(top_builddir)/src/transport/libgnunettransport.la \
216  $(top_builddir)/src/util/libgnunetutil.la  
217
218 if HAVE_MHD
219
220 test_plugin_transport_http_SOURCES = \
221  test_plugin_transport_http.c
222 test_plugin_transport_http_LDADD = \
223  $(top_builddir)/src/transport/libgnunettransport.la \
224  $(top_builddir)/src/statistics/libgnunetstatistics.la \
225  @LIBCURL@ \
226  $(top_builddir)/src/util/libgnunetutil.la  
227
228 test_transport_api_http_SOURCES = \
229  test_transport_api.c
230 test_transport_api_http_LDADD = \
231  $(top_builddir)/src/transport/libgnunettransport.la \
232  $(top_builddir)/src/util/libgnunetutil.la  
233
234 test_transport_api_reliability_http_SOURCES = \
235  test_transport_api_reliability.c
236 test_transport_api_reliability_http_LDADD = \
237  $(top_builddir)/src/transport/libgnunettransport.la \
238  $(top_builddir)/src/util/libgnunetutil.la
239  
240 test_plugin_transport_https_SOURCES = \
241  test_plugin_transport_https.c
242 test_plugin_transport_https_LDADD = \
243  $(top_builddir)/src/transport/libgnunettransport.la \
244  $(top_builddir)/src/statistics/libgnunetstatistics.la \
245  @LIBCURL@ \
246  $(top_builddir)/src/util/libgnunetutil.la  
247
248 test_transport_api_https_SOURCES = \
249  test_transport_api.c
250 test_transport_api_https_LDADD = \
251  $(top_builddir)/src/transport/libgnunettransport.la \
252  $(top_builddir)/src/util/libgnunetutil.la  
253  
254 test_transport_api_reliability_https_SOURCES = \
255  test_transport_api_reliability.c
256 test_transport_api_reliability_https_LDADD = \
257  $(top_builddir)/src/transport/libgnunettransport.la \
258  $(top_builddir)/src/util/libgnunetutil.la    
259 endif
260
261 EXTRA_DIST = \
262   test_transport_api_data.conf \
263   test_transport_api_tcp_peer1.conf \
264   test_transport_api_tcp_peer2.conf \
265   test_transport_api_udp_peer1.conf \
266   test_transport_api_udp_peer2.conf \
267   test_transport_api_udp_nat_peer1.conf \
268   test_transport_api_udp_nat_peer2.conf \
269   test_transport_api_tcp_nat_peer1.conf \
270   test_transport_api_tcp_nat_peer2.conf \
271   test_plugin_transport_data.conf \
272   test_transport_api_http_peer1.conf \
273   test_transport_api_http_peer2.conf \
274   test_transport_api_https_peer1.conf \
275   test_transport_api_https_peer2.conf \
276   test_transport_api_rel_http_peer1.conf \
277   test_transport_api_rel_http_peer2.conf \
278   test_transport_api_rel_https_peer1.conf \
279   test_transport_api_rel_https_peer2.conf \
280   test_plugin_transport_data_http.conf