change from udp_nat to only udp, altered testcases and configs to suit
[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 \
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_http \
138 # TODO: add tests for http, nat, etc.
139
140 TESTS = $(check_PROGRAMS)
141
142 test_transport_api_tcp_SOURCES = \
143  test_transport_api.c
144 test_transport_api_tcp_LDADD = \
145  $(top_builddir)/src/transport/libgnunettransport.la \
146  $(top_builddir)/src/util/libgnunetutil.la  
147
148 test_transport_api_reliability_tcp_SOURCES = \
149  test_transport_api_reliability.c
150 test_transport_api_reliability_tcp_LDADD = \
151  $(top_builddir)/src/transport/libgnunettransport.la \
152  $(top_builddir)/src/util/libgnunetutil.la  
153
154 test_transport_api_udp_SOURCES = \
155  test_transport_api.c
156 test_transport_api_udp_LDADD = \
157  $(top_builddir)/src/transport/libgnunettransport.la \
158  $(top_builddir)/src/util/libgnunetutil.la  
159
160 test_transport_api_udp_nat_SOURCES = \
161  test_transport_api.c
162 test_transport_api_udp_nat_LDADD = \
163  $(top_builddir)/src/transport/libgnunettransport.la \
164  $(top_builddir)/src/util/libgnunetutil.la  
165
166 #test_transport_api_http_SOURCES = \
167 # test_transport_api.c
168 #test_transport_api_http_LDADD = \
169 # $(top_builddir)/src/transport/libgnunettransport.la \
170 # $(top_builddir)/src/util/libgnunetutil.la  
171
172 test_plugin_transport_http_SOURCES = \
173  test_plugin_transport_http.c
174 test_plugin_transport_http_LDADD = \
175  $(top_builddir)/src/transport/libgnunettransport.la \
176  $(top_builddir)/src/statistics/libgnunetstatistics.la \
177  @LIBCURL@ \
178  $(top_builddir)/src/util/libgnunetutil.la  
179
180
181 EXTRA_DIST = \
182   test_transport_api_data.conf \
183   test_transport_api_tcp_peer1.conf \
184   test_transport_api_tcp_peer2.conf \
185   test_transport_api_udp_peer1.conf \
186   test_transport_api_udp_peer2.conf \
187   test_transport_api_udp_nat_peer1.conf \
188   test_transport_api_udp_nat_peer2.conf \
189   test_plugin_transport_data.conf \
190   test_plugin_transport_data_http.conf