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