starting tool for zone import (very incomplete)
[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   libgnunetdnsparser.la \
31   libgnunetdnsstub.la \
32   libgnunetdns.la
33
34 libexec_PROGRAMS = \
35   gnunet-service-dns $(HIJACKBIN)
36
37 noinst_PROGRAMS = \
38   gnunet-dns-monitor \
39   gnunet-dns-redirector \
40   gnunet-zoneimport
41
42 plugin_LTLIBRARIES = \
43   libgnunet_plugin_block_dns.la
44
45 if LINUX
46 check_SCRIPTS = \
47  test_gnunet_dns.sh
48 endif
49
50 check_PROGRAMS = \
51  test_hexcoder
52
53 gnunet_helper_dns_SOURCES = \
54  gnunet-helper-dns.c
55
56
57 gnunet_dns_monitor_SOURCES = \
58  gnunet-dns-monitor.c
59 gnunet_dns_monitor_LDADD = \
60   libgnunetdnsparser.la \
61   libgnunetdns.la \
62   $(top_builddir)/src/util/libgnunetutil.la \
63   $(GN_LIBINTL)
64
65 gnunet_zoneimport_SOURCES = \
66  gnunet-zoneimport.c
67 gnunet_zoneimport_LDADD = \
68   libgnunetdnsparser.la \
69   libgnunetdnsstub.la \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(GN_LIBINTL)
72
73 gnunet_dns_redirector_SOURCES = \
74  gnunet-dns-redirector.c
75 gnunet_dns_redirector_LDADD = \
76   libgnunetdnsparser.la \
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   libgnunetdnsstub.la \
85   $(top_builddir)/src/tun/libgnunettun.la \
86   $(top_builddir)/src/statistics/libgnunetstatistics.la \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   $(GN_LIBINTL)
89
90 libgnunetdnsparser_la_SOURCES = \
91  dnsparser.c
92 libgnunetdnsparser_la_LIBADD = \
93  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
94   -lidn
95 libgnunetdnsparser_la_LDFLAGS = \
96   $(GN_LIB_LDFLAGS) \
97   -version-info 1:0:1
98
99 libgnunetdnsstub_la_SOURCES = \
100  dnsstub.c
101 libgnunetdnsstub_la_LIBADD = \
102   $(top_builddir)/src/tun/libgnunettun.la \
103  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
104 libgnunetdnsstub_la_LDFLAGS = \
105   $(GN_LIB_LDFLAGS) \
106   -version-info 0:0:0
107
108 libgnunetdns_la_SOURCES = \
109  dns_api.c dns.h
110 libgnunetdns_la_LIBADD = \
111  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
112 libgnunetdns_la_LDFLAGS = \
113   $(GN_LIB_LDFLAGS) \
114   -version-info 0:0:0
115
116 libgnunet_plugin_block_dns_la_SOURCES = \
117   plugin_block_dns.c
118 libgnunet_plugin_block_dns_la_LIBADD = \
119   $(top_builddir)/src/block/libgnunetblockgroup.la \
120   $(top_builddir)/src/util/libgnunetutil.la
121 libgnunet_plugin_block_dns_la_LDFLAGS = \
122   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
123
124
125 if ENABLE_TEST_RUN
126 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
127 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
128 endif
129
130 EXTRA_DIST = \
131   $(check_SCRIPTS)
132
133
134 test_hexcoder_SOURCES = \
135  test_hexcoder.c
136 test_hexcoder_LDADD = \
137  libgnunetdnsparser.la \
138  $(top_builddir)/src/util/libgnunetutil.la