first test commit to make sudo + sh scripts obsolete.
[oweals/gnunet.git] / src / dns / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/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   dns.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 HIJACKBIN = gnunet-helper-dns
27 install-exec-hook:
28         chown root $(DESTDIR)$(libexecdir)/gnunt-helper-dns
29         chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunt-helper-dns
30         chmod 4750 $(DESTDIR)$(libexecdir)/gnunt-helper-dns
31         chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunt-helper-dns
32         chown gnunet:$(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunt-helper-dns
33         chmod 2750 $(DESTDIR)$(libexecdir)/gnunt-helper-dns
34 else
35 install-exec-hook:
36 endif
37
38 lib_LTLIBRARIES = \
39   libgnunetdns.la
40
41 libexec_PROGRAMS = \
42   gnunet-service-dns $(HIJACKBIN)
43
44 noinst_PROGRAMS = \
45   gnunet-dns-monitor \
46   gnunet-dns-redirector \
47   gnunet-zonewalk
48
49 plugin_LTLIBRARIES = \
50   libgnunet_plugin_block_dns.la
51
52 if LINUX
53 check_SCRIPTS = \
54  test_gnunet_dns.sh
55 endif
56
57 gnunet_helper_dns_SOURCES = \
58  gnunet-helper-dns.c
59
60
61 gnunet_dns_monitor_SOURCES = \
62  gnunet-dns-monitor.c
63 gnunet_dns_monitor_LDADD = \
64   libgnunetdns.la \
65   $(top_builddir)/src/util/libgnunetutil.la \
66   $(GN_LIBINTL)
67
68 gnunet_zonewalk_SOURCES = \
69  gnunet-zonewalk.c
70 gnunet_zonewalk_LDADD = \
71   $(top_builddir)/src/util/libgnunetutil.la \
72   $(GN_LIBINTL)
73
74 gnunet_dns_redirector_SOURCES = \
75  gnunet-dns-redirector.c
76 gnunet_dns_redirector_LDADD = \
77   libgnunetdns.la \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(GN_LIBINTL)
80
81 gnunet_service_dns_SOURCES = \
82  gnunet-service-dns.c
83 gnunet_service_dns_LDADD = \
84   $(top_builddir)/src/statistics/libgnunetstatistics.la \
85   $(top_builddir)/src/util/libgnunetutil.la \
86   $(GN_LIBINTL)
87
88 libgnunetdns_la_SOURCES = \
89  dns_api.c dns.h
90 libgnunetdns_la_LIBADD = \
91  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
92 libgnunetdns_la_LDFLAGS = \
93   $(GN_LIB_LDFLAGS) \
94   -version-info 0:0:0
95
96 libgnunet_plugin_block_dns_la_SOURCES = \
97   plugin_block_dns.c
98 libgnunet_plugin_block_dns_la_LIBADD = \
99   $(top_builddir)/src/block/libgnunetblockgroup.la \
100   $(top_builddir)/src/util/libgnunetutil.la
101 libgnunet_plugin_block_dns_la_LDFLAGS = \
102   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
103
104
105 if ENABLE_TEST_RUN
106 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
107 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
108 endif
109
110 EXTRA_DIST = \
111   $(check_SCRIPTS)
112
113