42d0c5bd1683361b23e9b49ca0d6aa72fbfd5be7
[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 $(bindir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true
22 else
23 install-exec-hook:
24 endif
25
26 lib_LTLIBRARIES = \
27   libgnunetdnsparser.la \
28   libgnunetdnsstub.la \
29   libgnunetdns.la
30
31 bin_PROGRAMS = \
32   gnunet-service-dns $(HIJACKBIN)
33
34 noinst_PROGRAMS = \
35   gnunet-dns-monitor gnunet-dns-redirector
36
37 plugin_LTLIBRARIES = \
38   libgnunet_plugin_block_dns.la 
39
40 if LINUX
41 check_SCRIPTS = \
42  test_gnunet_dns.sh
43 endif
44
45 gnunet_helper_dns_SOURCES = \
46  gnunet-helper-dns.c
47
48
49 gnunet_dns_monitor_SOURCES = \
50  gnunet-dns-monitor.c
51 gnunet_dns_monitor_LDADD = \
52   $(top_builddir)/src/dns/libgnunetdnsparser.la \
53   $(top_builddir)/src/dns/libgnunetdns.la \
54   $(top_builddir)/src/util/libgnunetutil.la \
55   $(GN_LIBINTL)
56 gnunet_dns_monitor_DEPENDENCIES = \
57   libgnunetdnsparser.la \
58   libgnunetdns.la
59
60 gnunet_dns_redirector_SOURCES = \
61  gnunet-dns-redirector.c
62 gnunet_dns_redirector_LDADD = \
63   $(top_builddir)/src/dns/libgnunetdnsparser.la \
64   $(top_builddir)/src/dns/libgnunetdns.la \
65   $(top_builddir)/src/util/libgnunetutil.la \
66   $(GN_LIBINTL)
67 gnunet_dns_redirector_DEPENDENCIES = \
68   libgnunetdnsparser.la \
69   libgnunetdns.la
70
71 gnunet_service_dns_SOURCES = \
72  gnunet-service-dns.c 
73 gnunet_service_dns_LDADD = \
74   $(top_builddir)/src/dns/libgnunetdnsstub.la \
75   $(top_builddir)/src/tun/libgnunettun.la \
76   $(top_builddir)/src/mesh/libgnunetmesh.la \
77   $(top_builddir)/src/statistics/libgnunetstatistics.la \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(GN_LIBINTL)
80 gnunet_service_dns_DEPENDENCIES = \
81   libgnunetdnsstub.la
82
83 libgnunetdnsparser_la_SOURCES = \
84  dnsparser.c 
85 libgnunetdnsparser_la_LIBADD = \
86  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
87   -lidn
88 libgnunetdnsparser_la_LDFLAGS = \
89   $(GN_LIB_LDFLAGS) \
90   -version-info 0:0:0
91
92 libgnunetdnsstub_la_SOURCES = \
93  dnsstub.c 
94 libgnunetdnsstub_la_LIBADD = \
95  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
96 libgnunetdnsstub_la_LDFLAGS = \
97   $(GN_LIB_LDFLAGS) \
98   -version-info 0:0:0
99
100 libgnunetdns_la_SOURCES = \
101  dns_api.c dns.h
102 libgnunetdns_la_LIBADD = \
103  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
104 libgnunetdns_la_LDFLAGS = \
105   $(GN_LIB_LDFLAGS) \
106   -version-info 0:0:0
107
108 libgnunet_plugin_block_dns_la_SOURCES = \
109   plugin_block_dns.c
110 libgnunet_plugin_block_dns_la_LIBADD = \
111   $(top_builddir)/src/util/libgnunetutil.la
112 libgnunet_plugin_block_dns_la_LDFLAGS = \
113   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
114
115
116 if ENABLE_TEST_RUN
117 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
118 endif
119
120 EXTRA_DIST = \
121   $(check_SCRIPTS)