973efd0ec082b5f66dc8fea92c52dabbf46c9dab
[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
51 gnunet_helper_vpn_SOURCES = \
52  gnunet-helper-vpn.c
53
54 gnunet_service_vpn_SOURCES = \
55  gnunet-service-vpn.c 
56 gnunet_service_vpn_LDADD = \
57   $(top_builddir)/src/statistics/libgnunetstatistics.la \
58   $(top_builddir)/src/tun/libgnunettun.la \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(top_builddir)/src/mesh/libgnunetmesh.la \
61   $(GN_LIBINTL)
62 gnunet_service_vpn_CFLAGS = \
63   -I$(top_srcdir)/src/exit $(CFLAGS)
64
65 gnunet_vpn_SOURCES = \
66  gnunet-vpn.c
67 gnunet_vpn_LDADD = \
68   $(top_builddir)/src/vpn/libgnunetvpn.la \
69   $(top_builddir)/src/util/libgnunetutil.la \
70   $(GN_LIBINTL)
71 gnunet_vpn_DEPENDENCIES = \
72   libgnunetvpn.la
73
74 libgnunetvpn_la_SOURCES = \
75  vpn_api.c vpn.h
76 libgnunetvpn_la_LIBADD = \
77  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
78 libgnunetvpn_la_LDFLAGS = \
79   $(GN_LIB_LDFLAGS)
80
81
82 test_gnunet_vpn_4_over_SOURCES = \
83  test_gnunet_vpn.c
84 test_gnunet_vpn_4_over_LDADD = -lmicrohttpd @LIBCURL@ \
85  $(top_builddir)/src/vpn/libgnunetvpn.la \
86  $(top_builddir)/src/arm/libgnunetarm.la \
87  $(top_builddir)/src/util/libgnunetutil.la 
88
89 test_gnunet_vpn_6_over_SOURCES = \
90  test_gnunet_vpn.c
91 test_gnunet_vpn_6_over_LDADD = -lmicrohttpd @LIBCURL@ \
92  $(top_builddir)/src/vpn/libgnunetvpn.la \
93  $(top_builddir)/src/arm/libgnunetarm.la \
94  $(top_builddir)/src/util/libgnunetutil.la 
95
96 test_gnunet_vpn_4_to_6_SOURCES = \
97  test_gnunet_vpn.c
98 test_gnunet_vpn_4_to_6_LDADD = -lmicrohttpd @LIBCURL@ \
99  $(top_builddir)/src/vpn/libgnunetvpn.la \
100  $(top_builddir)/src/arm/libgnunetarm.la \
101  $(top_builddir)/src/util/libgnunetutil.la 
102
103 test_gnunet_vpn_6_to_4_SOURCES = \
104  test_gnunet_vpn.c
105 test_gnunet_vpn_6_to_4_LDADD = -lmicrohttpd @LIBCURL@ \
106  $(top_builddir)/src/vpn/libgnunetvpn.la \
107  $(top_builddir)/src/arm/libgnunetarm.la \
108  $(top_builddir)/src/util/libgnunetutil.la