8cc546b361ee9b49c6ebcb81e37ee5a7da9b3695
[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 endif
30 else
31 install-exec-hook:
32 endif
33
34
35 lib_LTLIBRARIES = \
36   libgnunetvpn.la
37
38
39 bin_PROGRAMS = \
40   $(VPNBIN) gnunet-service-vpn gnunet-vpn
41
42
43
44 check_PROGRAMS = $(VPN_TEST)
45
46 if ENABLE_TEST_RUN
47 TESTS = $(check_PROGRAMS)
48 endif
49
50 EXTRA_DIST = \
51   test_gnunet_vpn.conf
52
53 gnunet_helper_vpn_SOURCES = \
54  gnunet-helper-vpn.c
55
56 gnunet_service_vpn_SOURCES = \
57  gnunet-service-vpn.c 
58 gnunet_service_vpn_LDADD = \
59   $(top_builddir)/src/statistics/libgnunetstatistics.la \
60   $(top_builddir)/src/tun/libgnunettun.la \
61   $(top_builddir)/src/util/libgnunetutil.la \
62   $(top_builddir)/src/mesh/libgnunetmesh.la \
63   $(GN_LIBINTL)
64 gnunet_service_vpn_CFLAGS = \
65   -I$(top_srcdir)/src/exit $(CFLAGS)
66
67 gnunet_vpn_SOURCES = \
68  gnunet-vpn.c
69 gnunet_vpn_LDADD = \
70   $(top_builddir)/src/vpn/libgnunetvpn.la \
71   $(top_builddir)/src/util/libgnunetutil.la \
72   $(GN_LIBINTL)
73 gnunet_vpn_DEPENDENCIES = \
74   libgnunetvpn.la
75
76 libgnunetvpn_la_SOURCES = \
77  vpn_api.c vpn.h
78 libgnunetvpn_la_LIBADD = \
79  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
80 libgnunetvpn_la_LDFLAGS = \
81   $(GN_LIB_LDFLAGS)
82
83
84 test_gnunet_vpn_4_over_SOURCES = \
85  test_gnunet_vpn.c
86 test_gnunet_vpn_4_over_LDADD = -lmicrohttpd @LIBCURL@ \
87  $(top_builddir)/src/vpn/libgnunetvpn.la \
88  $(top_builddir)/src/testing/libgnunettesting.la \
89  $(top_builddir)/src/util/libgnunetutil.la 
90 test_gnunet_vpn_4_over_CPPFLAGS = \
91  @LIBCURL_CPPFLAGS@
92
93 test_gnunet_vpn_6_over_SOURCES = \
94  test_gnunet_vpn.c
95 test_gnunet_vpn_6_over_LDADD = -lmicrohttpd @LIBCURL@ \
96  $(top_builddir)/src/vpn/libgnunetvpn.la \
97  $(top_builddir)/src/testing/libgnunettesting.la \
98  $(top_builddir)/src/util/libgnunetutil.la 
99 test_gnunet_vpn_6_over_CPPFLAGS = \
100  @LIBCURL_CPPFLAGS@
101
102 test_gnunet_vpn_4_to_6_SOURCES = \
103  test_gnunet_vpn.c
104 test_gnunet_vpn_4_to_6_LDADD = -lmicrohttpd @LIBCURL@ \
105  $(top_builddir)/src/vpn/libgnunetvpn.la \
106  $(top_builddir)/src/testing/libgnunettesting.la \
107  $(top_builddir)/src/util/libgnunetutil.la 
108 test_gnunet_vpn_4_to_6_CPPFLAGS = \
109  @LIBCURL_CPPFLAGS@
110
111 test_gnunet_vpn_6_to_4_SOURCES = \
112  test_gnunet_vpn.c
113 test_gnunet_vpn_6_to_4_LDADD = -lmicrohttpd @LIBCURL@ \
114  $(top_builddir)/src/vpn/libgnunetvpn.la \
115  $(top_builddir)/src/testing/libgnunettesting.la \
116  $(top_builddir)/src/util/libgnunetutil.la 
117 test_gnunet_vpn_6_to_4_CPPFLAGS = \
118  @LIBCURL_CPPFLAGS@