nat stuff... works on my machine
[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/util/libgnunetutil.la \
62   $(GN_LIBINTL)
63
64
65 plugin_LTLIBRARIES = \
66   libgnunet_plugin_transport_tcp.la \
67   libgnunet_plugin_transport_udp.la \
68     libgnunet_plugin_transport_udp_nat.la \
69   libgnunet_plugin_transport_template.la 
70 # TODO: add http, nat, etc.
71
72 libgnunet_plugin_transport_tcp_la_SOURCES = \
73   plugin_transport_tcp.c
74 libgnunet_plugin_transport_tcp_la_LIBADD = \
75   $(top_builddir)/src/hello/libgnunethello.la \
76   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
77   $(top_builddir)/src/util/libgnunetutil.la 
78 libgnunet_plugin_transport_tcp_la_LDFLAGS = \
79  $(GN_PLUGIN_LDFLAGS)
80
81 libgnunet_plugin_transport_template_la_SOURCES = \
82   plugin_transport_template.c
83 libgnunet_plugin_transport_template_la_LIBADD = \
84   $(top_builddir)/src/util/libgnunetutil.la 
85 libgnunet_plugin_transport_template_la_LDFLAGS = \
86  $(GN_PLUGIN_LDFLAGS)
87
88 libgnunet_plugin_transport_udp_la_SOURCES = \
89   plugin_transport_udp.c
90 libgnunet_plugin_transport_udp_la_LIBADD = \
91   $(top_builddir)/src/hello/libgnunethello.la \
92   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
93   $(top_builddir)/src/util/libgnunetutil.la 
94 libgnunet_plugin_transport_udp_la_LDFLAGS = \
95  $(GN_PLUGIN_LDFLAGS)
96
97 libgnunet_plugin_transport_udp_nat_la_SOURCES = \
98   plugin_transport_udp_nat.c
99 libgnunet_plugin_transport_udp_nat_la_LIBADD = \
100   $(top_builddir)/src/hello/libgnunethello.la \
101   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
102   $(top_builddir)/src/util/libgnunetutil.la 
103 libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
104  $(GN_PLUGIN_LDFLAGS)
105
106 check_PROGRAMS = \
107  test_transport_api_tcp \
108  test_transport_api_udp \
109  test_transport_api_udp_nat
110 # TODO: add tests for http, nat, etc.
111
112 TESTS = $(check_PROGRAMS)
113
114 test_transport_api_tcp_SOURCES = \
115  test_transport_api.c
116 test_transport_api_tcp_LDADD = \
117  $(top_builddir)/src/transport/libgnunettransport.la \
118  $(top_builddir)/src/util/libgnunetutil.la  
119
120 test_transport_api_udp_SOURCES = \
121  test_transport_api.c
122 test_transport_api_udp_LDADD = \
123  $(top_builddir)/src/transport/libgnunettransport.la \
124  $(top_builddir)/src/util/libgnunetutil.la  
125  
126 test_transport_api_udp_nat_SOURCES = \
127  test_transport_api.c
128 test_transport_api_udp_nat_LDADD = \
129  $(top_builddir)/src/transport/libgnunettransport.la \
130  $(top_builddir)/src/util/libgnunetutil.la  
131
132 EXTRA_DIST = \
133   test_transport_api_data.conf \
134   test_transport_api_peer1.conf \
135   test_transport_api_peer2.conf \
136   test_plugin_transport_data.conf