move dns ops again, 2nd try
[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 MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage -O0
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 plugindir = $(libdir)/gnunet
17
18 pkgcfg_DATA = \
19   dns.conf
20
21 if LINUX
22 HIJACKBIN = gnunet-helper-dns
23 install-exec-hook:
24         $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true
25 else
26 install-exec-hook:
27 endif
28
29 lib_LTLIBRARIES = \
30   libgnunetdns.la
31
32 libexec_PROGRAMS = \
33   gnunet-service-dns $(HIJACKBIN)
34
35 noinst_PROGRAMS = \
36   gnunet-dns-monitor \
37   gnunet-dns-redirector \
38   gnunet-zonewalk
39
40 plugin_LTLIBRARIES = \
41   libgnunet_plugin_block_dns.la
42
43 if LINUX
44 check_SCRIPTS = \
45  test_gnunet_dns.sh
46 endif
47
48 gnunet_helper_dns_SOURCES = \
49  gnunet-helper-dns.c
50
51
52 gnunet_dns_monitor_SOURCES = \
53  gnunet-dns-monitor.c
54 gnunet_dns_monitor_LDADD = \
55   libgnunetdns.la \
56   $(top_builddir)/src/util/libgnunetutil.la \
57   $(GN_LIBINTL)
58
59 gnunet_zonewalk_SOURCES = \
60  gnunet-zonewalk.c
61 gnunet_zonewalk_LDADD = \
62   $(top_builddir)/src/util/libgnunetutil.la \
63   $(GN_LIBINTL)
64
65 gnunet_dns_redirector_SOURCES = \
66  gnunet-dns-redirector.c
67 gnunet_dns_redirector_LDADD = \
68   libgnunetdns.la \
69   $(top_builddir)/src/util/libgnunetutil.la \
70   $(GN_LIBINTL)
71
72 gnunet_service_dns_SOURCES = \
73  gnunet-service-dns.c
74 gnunet_service_dns_LDADD = \
75   $(top_builddir)/src/statistics/libgnunetstatistics.la \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(GN_LIBINTL)
78
79 libgnunetdns_la_SOURCES = \
80  dns_api.c dns.h
81 libgnunetdns_la_LIBADD = \
82  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
83 libgnunetdns_la_LDFLAGS = \
84   $(GN_LIB_LDFLAGS) \
85   -version-info 0:0:0
86
87 libgnunet_plugin_block_dns_la_SOURCES = \
88   plugin_block_dns.c
89 libgnunet_plugin_block_dns_la_LIBADD = \
90   $(top_builddir)/src/block/libgnunetblockgroup.la \
91   $(top_builddir)/src/util/libgnunetutil.la
92 libgnunet_plugin_block_dns_la_LDFLAGS = \
93   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
94
95
96 if ENABLE_TEST_RUN
97 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
98 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
99 endif
100
101 EXTRA_DIST = \
102   $(check_SCRIPTS)
103
104