5517a45e322050f662125d52258068533f0a353a
[oweals/gnunet.git] / 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 MINGW
5   WINFLAGS = -Wl,--no-undefined,--export-all-symbols
6   VPNBIN = gnunet-helper-vpn
7 endif
8
9 if USE_COVERAGE
10   AM_CFLAGS = --coverage -O0
11 endif
12
13 pkgcfgdir= $(pkgdatadir)/config.d/
14
15 libexecdir= $(pkglibdir)/libexec/
16
17 plugindir = $(libdir)/gnunet
18
19 pkgcfg_DATA = \
20   vpn.conf
21
22 if LINUX
23 VPNBIN = gnunet-helper-vpn
24 install-exec-hook:
25         $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
26 else
27 install-exec-hook:
28 endif
29
30
31 lib_LTLIBRARIES = \
32   libgnunetvpn.la
33
34
35 libexec_PROGRAMS = \
36   $(VPNBIN) \
37   gnunet-service-vpn
38
39 bin_PROGRAMS = \
40   gnunet-vpn
41
42 if MINGW
43   gnunet_helper_vpn_LDFLAGS = \
44     -no-undefined -Wl,--export-all-symbols
45
46   gnunet_helper_vpn_LDADD = \
47     -lsetupapi -lnewdev -lshell32 -liconv -lstdc++ \
48     -lcomdlg32 -lgdi32 -liphlpapi
49
50   gnunet_helper_vpn_SOURCES = \
51     gnunet-helper-vpn-windows.c
52 else
53     gnunet_helper_vpn_SOURCES = \
54         gnunet-helper-vpn.c
55 endif
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/cadet/libgnunetcadet.la \
63   $(top_builddir)/src/regex/libgnunetregex.la \
64   $(GN_LIBINTL)
65 gnunet_service_vpn_CFLAGS = \
66   -I$(top_srcdir)/src/exit $(CFLAGS)
67
68 gnunet_vpn_SOURCES = \
69  gnunet-vpn.c
70 gnunet_vpn_LDADD = \
71   libgnunetvpn.la \
72   $(top_builddir)/src/tun/libgnunettun.la \
73   $(top_builddir)/src/util/libgnunetutil.la \
74   $(GN_LIBINTL)
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