-test now working
[oweals/gnunet.git] / src / vpn / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9 endif
10
11 pkgcfgdir= $(pkgdatadir)/config.d/
12
13 plugindir = $(libdir)/gnunet
14
15 pkgcfg_DATA = \
16   vpn.conf
17
18 if LINUX
19 VPNBIN = gnunet-helper-vpn
20 install-exec-hook:
21         $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-vpn || true
22         $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-vpn || true
23 if HAVE_MHD
24  VPN_TEST = \
25  test_gnunet_vpn-4_to_6 \
26  test_gnunet_vpn-6_to_4 \
27  test_gnunet_vpn-6_over \
28  test_gnunet_vpn-4_over \
29  test_gns_vpn
30 endif
31 else
32 install-exec-hook:
33 endif
34
35
36 lib_LTLIBRARIES = \
37   libgnunetvpn.la
38
39
40 bin_PROGRAMS = \
41   $(VPNBIN) gnunet-service-vpn gnunet-vpn
42
43
44
45 check_PROGRAMS = $(VPN_TEST)
46
47 if ENABLE_TEST_RUN
48 TESTS = $(check_PROGRAMS)
49 endif
50
51 EXTRA_DIST = \
52   test_gnunet_vpn.conf \
53         test_gns_vpn.conf
54
55 gnunet_helper_vpn_SOURCES = \
56  gnunet-helper-vpn.c
57
58 gnunet_service_vpn_SOURCES = \
59  gnunet-service-vpn.c 
60 gnunet_service_vpn_LDADD = \
61   $(top_builddir)/src/statistics/libgnunetstatistics.la \
62   $(top_builddir)/src/tun/libgnunettun.la \
63   $(top_builddir)/src/util/libgnunetutil.la \
64   $(top_builddir)/src/mesh/libgnunetmesh.la \
65   $(GN_LIBINTL)
66 gnunet_service_vpn_CFLAGS = \
67   -I$(top_srcdir)/src/exit $(CFLAGS)
68
69 gnunet_vpn_SOURCES = \
70  gnunet-vpn.c
71 gnunet_vpn_LDADD = \
72   $(top_builddir)/src/vpn/libgnunetvpn.la \
73   $(top_builddir)/src/util/libgnunetutil.la \
74   $(GN_LIBINTL)
75 gnunet_vpn_DEPENDENCIES = \
76   libgnunetvpn.la
77
78 libgnunetvpn_la_SOURCES = \
79  vpn_api.c vpn.h
80 libgnunetvpn_la_LIBADD = \
81  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
82 libgnunetvpn_la_LDFLAGS = \
83   $(GN_LIB_LDFLAGS)
84
85 test_gns_vpn_SOURCES = \
86  test_gns_vpn.c
87 test_gns_vpn_LDADD = -lmicrohttpd @LIBCURL@ \
88  $(top_builddir)/src/namestore/libgnunetnamestore.la \
89  $(top_builddir)/src/testing/libgnunettesting.la \
90  $(top_builddir)/src/util/libgnunetutil.la
91 test_gnunet_vpn_4_over_CPPFLAGS = \
92  @LIBCURL_CPPFLAGS@
93
94 test_gnunet_vpn_4_over_SOURCES = \
95  test_gnunet_vpn.c
96 test_gnunet_vpn_4_over_LDADD = -lmicrohttpd @LIBCURL@ \
97  $(top_builddir)/src/vpn/libgnunetvpn.la \
98  $(top_builddir)/src/testing/libgnunettesting.la \
99  $(top_builddir)/src/util/libgnunetutil.la 
100 test_gnunet_vpn_4_over_CPPFLAGS = \
101  @LIBCURL_CPPFLAGS@
102
103 test_gnunet_vpn_6_over_SOURCES = \
104  test_gnunet_vpn.c
105 test_gnunet_vpn_6_over_LDADD = -lmicrohttpd @LIBCURL@ \
106  $(top_builddir)/src/vpn/libgnunetvpn.la \
107  $(top_builddir)/src/testing/libgnunettesting.la \
108  $(top_builddir)/src/util/libgnunetutil.la 
109 test_gnunet_vpn_6_over_CPPFLAGS = \
110  @LIBCURL_CPPFLAGS@
111
112 test_gnunet_vpn_4_to_6_SOURCES = \
113  test_gnunet_vpn.c
114 test_gnunet_vpn_4_to_6_LDADD = -lmicrohttpd @LIBCURL@ \
115  $(top_builddir)/src/vpn/libgnunetvpn.la \
116  $(top_builddir)/src/testing/libgnunettesting.la \
117  $(top_builddir)/src/util/libgnunetutil.la 
118 test_gnunet_vpn_4_to_6_CPPFLAGS = \
119  @LIBCURL_CPPFLAGS@
120
121 test_gnunet_vpn_6_to_4_SOURCES = \
122  test_gnunet_vpn.c
123 test_gnunet_vpn_6_to_4_LDADD = -lmicrohttpd @LIBCURL@ \
124  $(top_builddir)/src/vpn/libgnunetvpn.la \
125  $(top_builddir)/src/testing/libgnunettesting.la \
126  $(top_builddir)/src/util/libgnunetutil.la 
127 test_gnunet_vpn_6_to_4_CPPFLAGS = \
128  @LIBCURL_CPPFLAGS@