59395700a5e97bed28984d203f90c690f7b6a960
[oweals/gnunet.git] / src / dns / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9 endif
10
11 pkgcfgdir= $(pkgdatadir)/config.d/
12
13 plugindir = $(libdir)/gnunet
14
15 pkgcfg_DATA = \
16   dns.conf
17
18 if LINUX
19 HIJACKBIN = gnunet-helper-dns
20 install-exec-hook:
21         $(top_srcdir)/src/dns/install-dns-helper.sh $(SUDO_BINARY) $(bindir) $(GNUNETDNS_GROUP) || true
22 else
23 install-exec-hook:
24 endif
25
26 lib_LTLIBRARIES = \
27   libgnunetdnsparser.la \
28   libgnunetdns.la
29
30 bin_PROGRAMS = \
31   gnunet-service-dns $(HIJACKBIN)
32
33 noinst_PROGRAMS = \
34   gnunet-dns-monitor gnunet-dns-redirector
35
36 plugin_LTLIBRARIES = \
37   libgnunet_plugin_block_dns.la 
38
39 if LINUX
40 check_SCRIPTS = \
41  test_gnunet_dns.sh
42 endif
43
44 gnunet_helper_dns_SOURCES = \
45  gnunet-helper-dns.c
46
47
48 gnunet_dns_monitor_SOURCES = \
49  gnunet-dns-monitor.c
50 gnunet_dns_monitor_LDADD = \
51   $(top_builddir)/src/dns/libgnunetdnsparser.la \
52   $(top_builddir)/src/dns/libgnunetdns.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   $(GN_LIBINTL)
55 gnunet_dns_monitor_DEPENDENCIES = \
56   libgnunetdnsparser.la \
57   libgnunetdns.la
58
59 gnunet_dns_redirector_SOURCES = \
60  gnunet-dns-redirector.c
61 gnunet_dns_redirector_LDADD = \
62   $(top_builddir)/src/dns/libgnunetdnsparser.la \
63   $(top_builddir)/src/dns/libgnunetdns.la \
64   $(top_builddir)/src/util/libgnunetutil.la \
65   $(GN_LIBINTL)
66 gnunet_dns_redirector_DEPENDENCIES = \
67   libgnunetdnsparser.la \
68   libgnunetdns.la
69
70 gnunet_service_dns_SOURCES = \
71  gnunet-service-dns.c 
72 gnunet_service_dns_LDADD = \
73   $(top_builddir)/src/tun/libgnunettun.la \
74   $(top_builddir)/src/mesh/libgnunetmesh.la \
75   $(top_builddir)/src/statistics/libgnunetstatistics.la \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(GN_LIBINTL)
78
79 libgnunetdnsparser_la_SOURCES = \
80  dnsparser.c 
81 libgnunetdnsparser_la_LIBADD = \
82  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
83 libgnunetdnsparser_la_LDFLAGS = \
84   $(GN_LIB_LDFLAGS) \
85   -version-info 0:0:0
86
87 libgnunetdns_la_SOURCES = \
88  dns_api.c dns.h
89 libgnunetdns_la_LIBADD = \
90  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
91 libgnunetdns_la_LDFLAGS = \
92   $(GN_LIB_LDFLAGS) \
93   -version-info 0:0:0
94
95 libgnunet_plugin_block_dns_la_SOURCES = \
96   plugin_block_dns.c
97 libgnunet_plugin_block_dns_la_LIBADD = \
98   $(top_builddir)/src/util/libgnunetutil.la
99 libgnunet_plugin_block_dns_la_LDFLAGS = \
100   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
101
102
103 if ENABLE_TEST_RUN
104 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
105 endif
106
107 EXTRA_DIST = \
108   $(check_SCRIPTS)