99e78d7d68b663ad8765e7075c18f4f82d5ff47a
[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-hijack-dns gnunet-helper-dns
20 install-exec-hook:
21         $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-hijack-dns || true
22         $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-hijack-dns || true
23         $(SUDO_BINARY) chown root $(bindir)/gnunet-helper-dns || true
24         $(SUDO_BINARY) chgrp $(GNUNETDNS_GROUP) $(bindir)/gnunet-helper-dns || true
25         $(SUDO_BINARY) chmod 4750 $(bindir)/gnunet-helper-dns || true
26         $(SUDO_BINARY) chgrp $(GNUNETDNS_GROUP) $(bindir)/gnunet-service-dns-new || true
27         $(SUDO_BINARY) chmod 2755 $(bindir)/gnunet-helper-dns || true
28 else
29 install-exec-hook:
30 endif
31
32 lib_LTLIBRARIES = \
33   libgnunetdnsparser.la \
34   libgnunetdnsnew.la \
35   libgnunetdns.la
36
37 bin_PROGRAMS = \
38   gnunet-service-dns gnunet-service-dns-new $(HIJACKBIN)
39
40 noinst_PROGRAMS = \
41   gnunet-dns-monitor gnunet-dns-redirector
42
43 plugin_LTLIBRARIES = \
44   libgnunet_plugin_block_dns.la 
45
46
47 gnunet_helper_hijack_dns_SOURCES = \
48  gnunet-helper-hijack-dns.c
49
50 gnunet_helper_dns_SOURCES = \
51  gnunet-helper-dns.c
52
53 gnunet_service_dns_SOURCES = \
54  gnunet-service-dns.c 
55 gnunet_service_dns_LDADD = \
56   $(top_builddir)/src/core/libgnunetcore.la \
57   $(top_builddir)/src/statistics/libgnunetstatistics.la \
58   $(top_builddir)/src/util/libgnunetutil.la \
59   $(top_builddir)/src/dht/libgnunetdht.la \
60   $(top_builddir)/src/mesh/libgnunetmesh.la \
61   $(top_builddir)/src/dns/libgnunetdnsparser.la \
62   $(GN_LIBINTL)
63 gnunet_service_dns_DEPENDENCIES = \
64   libgnunetdnsparser.la
65
66 gnunet_dns_monitor_SOURCES = \
67  gnunet-dns-monitor.c
68 gnunet_dns_monitor_LDADD = \
69   $(top_builddir)/src/dns/libgnunetdnsparser.la \
70   $(top_builddir)/src/dns/libgnunetdnsnew.la \
71   $(top_builddir)/src/util/libgnunetutil.la \
72   $(GN_LIBINTL)
73 gnunet_dns_monitor_DEPENDENCIES = \
74   libgnunetdnsparser.la \
75   libgnunetdnsnew.la
76
77 gnunet_dns_redirector_SOURCES = \
78  gnunet-dns-redirector.c
79 gnunet_dns_redirector_LDADD = \
80   $(top_builddir)/src/dns/libgnunetdnsparser.la \
81   $(top_builddir)/src/dns/libgnunetdnsnew.la \
82   $(top_builddir)/src/util/libgnunetutil.la \
83   $(GN_LIBINTL)
84 gnunet_dns_redirector_DEPENDENCIES = \
85   libgnunetdnsparser.la \
86   libgnunetdnsnew.la
87
88 gnunet_service_dns_new_SOURCES = \
89  gnunet-service-dns_new.c 
90 gnunet_service_dns_new_LDADD = \
91   $(top_builddir)/src/statistics/libgnunetstatistics.la \
92   $(top_builddir)/src/util/libgnunetutil.la \
93   $(GN_LIBINTL)
94
95 libgnunetdnsparser_la_SOURCES = \
96  dnsparser.c 
97 libgnunetdnsparser_la_LIBADD = \
98  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
99 libgnunetdnsparser_la_LDFLAGS = \
100   $(GN_LIB_LDFLAGS)
101
102 libgnunetdns_la_SOURCES = \
103  dns_api.c dns.h
104 libgnunetdns_la_LIBADD = \
105  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
106 libgnunetdns_la_LDFLAGS = \
107   $(GN_LIB_LDFLAGS)
108
109 libgnunetdnsnew_la_SOURCES = \
110  dns_api_new.c dns_new.h
111 libgnunetdnsnew_la_LIBADD = \
112  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
113 libgnunetdnsnew_la_LDFLAGS = \
114   $(GN_LIB_LDFLAGS)
115
116 libgnunet_plugin_block_dns_la_SOURCES = \
117   plugin_block_dns.c
118 libgnunet_plugin_block_dns_la_LIBADD = \
119   $(top_builddir)/src/util/libgnunetutil.la
120 libgnunet_plugin_block_dns_la_LDFLAGS = \
121   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
122
123
124