no need to link against libgnunetarm
[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_PLGUIN_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
57 gnunet_transport_SOURCES = \
58  gnunet-transport.c         
59 gnunet_transport_LDADD = \
60   $(top_builddir)/src/transport/libgnunettransport.la \
61   $(top_builddir)/src/util/libgnunetutil.la \
62   $(GN_LIBINTL)
63
64 gnunet_service_transport_SOURCES = \
65  gnunet-service-transport.c plugin_transport.h 
66 gnunet_service_transport_LDADD = \
67   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
68   $(top_builddir)/src/statistics/libgnunetstatistics.la \
69   $(top_builddir)/src/util/libgnunetutil.la \
70   $(GN_LIBINTL)
71
72
73 plugin_LTLIBRARIES = \
74   libgnunet_plugin_transport_tcp.la \
75   libgnunet_plugin_transport_udp.la \
76   libgnunet_plugin_transport_udp_nat.la \
77   $(HTTP_PLUGIN_LA) \
78   libgnunet_plugin_transport_template.la
79 # TODO: add http, nat, etc.
80
81 libgnunet_plugin_transport_tcp_la_SOURCES = \
82   plugin_transport_tcp.c
83 libgnunet_plugin_transport_tcp_la_LIBADD = \
84   $(top_builddir)/src/hello/libgnunethello.la \
85   $(top_builddir)/src/statistics/libgnunetstatistics.la \
86   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
87   $(top_builddir)/src/util/libgnunetutil.la 
88 libgnunet_plugin_transport_tcp_la_LDFLAGS = \
89  $(GN_PLUGIN_LDFLAGS)
90
91 libgnunet_plugin_transport_template_la_SOURCES = \
92   plugin_transport_template.c
93 libgnunet_plugin_transport_template_la_LIBADD = \
94   $(top_builddir)/src/util/libgnunetutil.la 
95 libgnunet_plugin_transport_template_la_LDFLAGS = \
96  $(GN_PLUGIN_LDFLAGS)
97
98 libgnunet_plugin_transport_udp_la_SOURCES = \
99   plugin_transport_udp.c
100 libgnunet_plugin_transport_udp_la_LIBADD = \
101   $(top_builddir)/src/hello/libgnunethello.la \
102   $(top_builddir)/src/statistics/libgnunetstatistics.la \
103   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
104   $(top_builddir)/src/util/libgnunetutil.la 
105 libgnunet_plugin_transport_udp_la_LDFLAGS = \
106  $(GN_PLUGIN_LDFLAGS)
107
108 libgnunet_plugin_transport_udp_nat_la_SOURCES = \
109   plugin_transport_udp_nat.c
110 libgnunet_plugin_transport_udp_nat_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_nat_la_LDFLAGS = \
116  $(GN_PLUGIN_LDFLAGS)
117
118 if HAVE_MHD 
119 libgnunet_plugin_transport_http_la_SOURCES = \
120   plugin_transport_http.c
121 libgnunet_plugin_transport_http_la_LIBADD = \
122   $(top_builddir)/src/hello/libgnunethello.la \
123   $(top_builddir)/src/statistics/libgnunetstatistics.la \
124   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
125   @LIBCURL@ \
126   $(top_builddir)/src/util/libgnunetutil.la 
127 libgnunet_plugin_transport_http_la_LDFLAGS = \
128  $(GN_LIBMHD) \
129  $(GN_PLUGIN_LDFLAGS)
130 endif
131
132 check_PROGRAMS = \
133  test_transport_api_tcp \
134  test_transport_api_udp \
135  $(HTTP_PLGUIN_CHECK) \
136  test_transport_api_udp_nat
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_udp_SOURCES = \
149  test_transport_api.c
150 test_transport_api_udp_LDADD = \
151  $(top_builddir)/src/transport/libgnunettransport.la \
152  $(top_builddir)/src/util/libgnunetutil.la  
153
154 test_transport_api_udp_nat_SOURCES = \
155  test_transport_api.c
156 test_transport_api_udp_nat_LDADD = \
157  $(top_builddir)/src/transport/libgnunettransport.la \
158  $(top_builddir)/src/util/libgnunetutil.la  
159  
160 #test_transport_api_http_SOURCES = \
161 # test_transport_api.c
162 #test_transport_api_http_LDADD = \
163 # $(top_builddir)/src/transport/libgnunettransport.la \
164 # $(top_builddir)/src/util/libgnunetutil.la  
165
166 test_plugin_transport_http_SOURCES = \
167  test_plugin_transport_http.c
168 test_plugin_transport_http_LDADD = \
169  $(top_builddir)/src/transport/libgnunettransport.la \
170  $(top_builddir)/src/statistics/libgnunetstatistics.la \
171  @LIBCURL@ \
172  $(top_builddir)/src/util/libgnunetutil.la  
173
174
175 EXTRA_DIST = \
176   test_transport_api_data.conf \
177   test_transport_api_tcp_peer1.conf \
178   test_transport_api_tcp_peer2.conf \
179   test_transport_api_udp_peer1.conf \
180   test_transport_api_udp_peer2.conf \
181   test_transport_api_udp_nat_peer1.conf \
182   test_transport_api_udp_nat_peer2.conf \
183   test_plugin_transport_data.conf \
184   test_plugin_transport_data_http.conf