fea89724d0de47a53e18805459cb5bf44e8f6610
[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 else
24 install-exec-hook:
25 endif
26
27
28 lib_LTLIBRARIES = \
29   libgnunetvpn.la
30
31
32 bin_PROGRAMS = \
33   $(VPNBIN) gnunet-service-vpn gnunet-vpn
34
35
36 if HAVE_MHD
37  VPN_TEST = test_gnunet_vpn
38 endif
39
40 check_PROGRAMS = $(VPN_TEST)
41
42 if ENABLE_TEST_RUN
43 TESTS = $(check_PROGRAMS)
44 endif
45
46
47 gnunet_helper_vpn_SOURCES = \
48  gnunet-helper-vpn.c
49
50 gnunet_service_vpn_SOURCES = \
51  gnunet-service-vpn.c 
52 gnunet_service_vpn_LDADD = \
53   $(top_builddir)/src/statistics/libgnunetstatistics.la \
54   $(top_builddir)/src/tun/libgnunettun.la \
55   $(top_builddir)/src/util/libgnunetutil.la \
56   $(top_builddir)/src/mesh/libgnunetmesh.la \
57   $(GN_LIBINTL)
58 gnunet_service_vpn_CFLAGS = \
59   -I$(top_srcdir)/src/exit $(CFLAGS)
60
61 gnunet_vpn_SOURCES = \
62  gnunet-vpn.c
63 gnunet_vpn_LDADD = \
64   $(top_builddir)/src/vpn/libgnunetvpn.la \
65   $(top_builddir)/src/util/libgnunetutil.la \
66   $(GN_LIBINTL)
67 gnunet_vpn_DEPENDENCIES = \
68   libgnunetvpn.la
69
70 libgnunetvpn_la_SOURCES = \
71  vpn_api.c vpn.h
72 libgnunetvpn_la_LIBADD = \
73  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
74 libgnunetvpn_la_LDFLAGS = \
75   $(GN_LIB_LDFLAGS)
76
77
78 test_gnunet_vpn_SOURCES = \
79  test_gnunet_vpn.c
80 test_gnunet_vpn_LDADD = -lmicrohttpd @LIBCURL@ \
81  $(top_builddir)/src/vpn/libgnunetvpn.la \
82  $(top_builddir)/src/arm/libgnunetarm.la \
83  $(top_builddir)/src/util/libgnunetutil.la