-fix
[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) chown gnunet:$(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 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   $(top_builddir)/src/dns/libgnunetdnsparser.la \
56   $(top_builddir)/src/dns/libgnunetdns.la \
57   $(top_builddir)/src/util/libgnunetutil.la \
58   $(GN_LIBINTL)
59 gnunet_dns_monitor_DEPENDENCIES = \
60   libgnunetdnsparser.la \
61   libgnunetdns.la
62
63 gnunet_dns_redirector_SOURCES = \
64  gnunet-dns-redirector.c
65 gnunet_dns_redirector_LDADD = \
66   $(top_builddir)/src/dns/libgnunetdnsparser.la \
67   $(top_builddir)/src/dns/libgnunetdns.la \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   $(GN_LIBINTL)
70 gnunet_dns_redirector_DEPENDENCIES = \
71   libgnunetdnsparser.la \
72   libgnunetdns.la
73
74 gnunet_service_dns_SOURCES = \
75  gnunet-service-dns.c 
76 gnunet_service_dns_LDADD = \
77   $(top_builddir)/src/tun/libgnunettun.la \
78   $(top_builddir)/src/mesh/libgnunetmesh.la \
79   $(top_builddir)/src/statistics/libgnunetstatistics.la \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   $(GN_LIBINTL)
82
83 libgnunetdnsparser_la_SOURCES = \
84  dnsparser.c 
85 libgnunetdnsparser_la_LIBADD = \
86  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
87 libgnunetdnsparser_la_LDFLAGS = \
88   $(GN_LIB_LDFLAGS) \
89   -version-info 0:0:0
90
91 libgnunetdns_la_SOURCES = \
92  dns_api.c dns.h
93 libgnunetdns_la_LIBADD = \
94  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
95 libgnunetdns_la_LDFLAGS = \
96   $(GN_LIB_LDFLAGS) \
97   -version-info 0:0:0
98
99 libgnunet_plugin_block_dns_la_SOURCES = \
100   plugin_block_dns.c
101 libgnunet_plugin_block_dns_la_LIBADD = \
102   $(top_builddir)/src/util/libgnunetutil.la
103 libgnunet_plugin_block_dns_la_LDFLAGS = \
104   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
105
106
107 if ENABLE_TEST_RUN
108 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
109 endif
110
111 EXTRA_DIST = \
112   $(check_SCRIPTS)