move
[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 USE_COVERAGE
10   AM_CFLAGS = --coverage -O0
11 endif
12
13 if LINUX
14 NATBIN = gnunet-nat-server gnunet-nat-client
15 install-exec-hook:
16         chown root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client || true
17         chmod u+s $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client || true
18 endif
19
20
21 lib_LTLIBRARIES = \
22   libgnunettransport.la
23
24 libgnunettransport_la_SOURCES = \
25   transport_api.c transport.h \
26   transport_api_blacklist.c
27 libgnunettransport_la_LIBADD = \
28   $(top_builddir)/src/arm/libgnunetarm.la \
29   $(top_builddir)/src/hello/libgnunethello.la \
30   $(top_builddir)/src/util/libgnunetutil.la \
31   $(GN_LIBINTL) 
32 libgnunettransport_la_LDFLAGS = \
33   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
34   -version-info 0:0:0
35
36
37 bin_PROGRAMS = \
38  gnunet-transport \
39  gnunet-service-transport $(NATBIN)
40
41
42 gnunet_nat_server_SOURCES = \
43  gnunet-nat-server.c         
44
45 gnunet_nat_client_SOURCES = \
46  gnunet-nat-client.c         
47
48
49 gnunet_transport_SOURCES = \
50  gnunet-transport.c         
51 gnunet_transport_LDADD = \
52   $(top_builddir)/src/transport/libgnunettransport.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   $(GN_LIBINTL)
55
56 gnunet_service_transport_SOURCES = \
57  gnunet-service-transport.c plugin_transport.h \
58  gnunet-service-transport_blacklist.c gnunet-service-transport_blacklist.h
59 gnunet_service_transport_LDADD = \
60   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
61   $(top_builddir)/src/statistics/libgnunetstatistics.la \
62   $(top_builddir)/src/util/libgnunetutil.la \
63   $(GN_LIBINTL)
64
65
66 plugin_LTLIBRARIES = \
67   libgnunet_plugin_transport_tcp.la \
68   libgnunet_plugin_transport_udp.la \
69     libgnunet_plugin_transport_udp_nat.la \
70   libgnunet_plugin_transport_template.la 
71 # TODO: add http, nat, etc.
72
73 libgnunet_plugin_transport_tcp_la_SOURCES = \
74   plugin_transport_tcp.c
75 libgnunet_plugin_transport_tcp_la_LIBADD = \
76   $(top_builddir)/src/hello/libgnunethello.la \
77   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
78   $(top_builddir)/src/util/libgnunetutil.la 
79 libgnunet_plugin_transport_tcp_la_LDFLAGS = \
80  $(GN_PLUGIN_LDFLAGS)
81
82 libgnunet_plugin_transport_template_la_SOURCES = \
83   plugin_transport_template.c
84 libgnunet_plugin_transport_template_la_LIBADD = \
85   $(top_builddir)/src/util/libgnunetutil.la 
86 libgnunet_plugin_transport_template_la_LDFLAGS = \
87  $(GN_PLUGIN_LDFLAGS)
88
89 libgnunet_plugin_transport_udp_la_SOURCES = \
90   plugin_transport_udp.c
91 libgnunet_plugin_transport_udp_la_LIBADD = \
92   $(top_builddir)/src/hello/libgnunethello.la \
93   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
94   $(top_builddir)/src/util/libgnunetutil.la 
95 libgnunet_plugin_transport_udp_la_LDFLAGS = \
96  $(GN_PLUGIN_LDFLAGS)
97
98 libgnunet_plugin_transport_udp_nat_la_SOURCES = \
99   plugin_transport_udp_nat.c
100 libgnunet_plugin_transport_udp_nat_la_LIBADD = \
101   $(top_builddir)/src/hello/libgnunethello.la \
102   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
103   $(top_builddir)/src/util/libgnunetutil.la 
104 libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
105  $(GN_PLUGIN_LDFLAGS)
106
107 check_PROGRAMS = \
108  test_transport_api_tcp \
109  test_transport_api_udp \
110  test_transport_api_udp_nat
111 # TODO: add tests for http, nat, etc.
112
113 TESTS = $(check_PROGRAMS)
114
115 test_transport_api_tcp_SOURCES = \
116  test_transport_api.c
117 test_transport_api_tcp_LDADD = \
118  $(top_builddir)/src/transport/libgnunettransport.la \
119  $(top_builddir)/src/util/libgnunetutil.la  
120
121 test_transport_api_udp_SOURCES = \
122  test_transport_api.c
123 test_transport_api_udp_LDADD = \
124  $(top_builddir)/src/transport/libgnunettransport.la \
125  $(top_builddir)/src/util/libgnunetutil.la  
126
127 test_transport_api_udp_nat_SOURCES = \
128  test_transport_api.c
129 test_transport_api_udp_nat_LDADD = \
130  $(top_builddir)/src/transport/libgnunettransport.la \
131  $(top_builddir)/src/util/libgnunetutil.la  
132
133 EXTRA_DIST = \
134   test_transport_api_data.conf \
135   test_transport_api_peer1.conf \
136   test_transport_api_peer2.conf \
137   test_plugin_transport_data.conf