Add support for doas.
[oweals/gnunet.git] / src / vpn / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
3
4 if USE_COVERAGE
5   AM_CFLAGS = --coverage -O0
6 endif
7
8 pkgcfgdir= $(pkgdatadir)/config.d/
9
10 libexecdir= $(pkglibdir)/libexec/
11
12 plugindir = $(libdir)/gnunet
13
14 pkgcfg_DATA = \
15   vpn.conf
16
17 if HAVE_SUDO
18 SUDO_OR_DOAS_BINARY= $(SUDO_BINARY)
19 else
20 if HAVE_DOAS_BINARY
21 SUDO_OR_DOAS_BINARY= $(DOAS_BINARY)
22 endif
23 endif
24
25 if LINUX
26 VPNBIN = gnunet-helper-vpn
27 install-exec-hook:
28         $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true
29 else
30 install-exec-hook:
31 endif
32
33
34 lib_LTLIBRARIES = \
35   libgnunetvpn.la
36
37
38 libexec_PROGRAMS = \
39   $(VPNBIN) \
40   gnunet-service-vpn
41
42 bin_PROGRAMS = \
43   gnunet-vpn
44
45 gnunet_helper_vpn_SOURCES = \
46 gnunet-helper-vpn.c
47
48 gnunet_service_vpn_SOURCES = \
49  gnunet-service-vpn.c
50 gnunet_service_vpn_LDADD = \
51   $(top_builddir)/src/statistics/libgnunetstatistics.la \
52   $(top_builddir)/src/util/libgnunetutil.la \
53   $(top_builddir)/src/cadet/libgnunetcadet.la \
54   $(top_builddir)/src/regex/libgnunetregex.la \
55   $(GN_LIBINTL)
56 gnunet_service_vpn_CFLAGS = \
57   -I$(top_srcdir)/src/exit $(CFLAGS)
58
59 gnunet_vpn_SOURCES = \
60  gnunet-vpn.c
61 gnunet_vpn_LDADD = \
62   libgnunetvpn.la \
63   $(top_builddir)/src/util/libgnunetutil.la \
64   $(GN_LIBINTL)
65
66 libgnunetvpn_la_SOURCES = \
67  vpn_api.c vpn.h
68 libgnunetvpn_la_LIBADD = \
69  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
70 libgnunetvpn_la_LDFLAGS = \
71   $(GN_LIB_LDFLAGS)