441ffeefdbce1dda33993a5d369aa28a7fb98c56
[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 libexecdir= $(pkglibdir)/libexec/
14
15 plugindir = $(libdir)/gnunet
16
17 pkgcfg_DATA = \
18   dns.conf
19
20 if LINUX
21 HIJACKBIN = gnunet-helper-dns
22 install-exec-hook:
23         $(top_srcdir)/src/dns/install-dns-helper.sh $(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true
24 else
25 install-exec-hook:
26 endif
27
28 lib_LTLIBRARIES = \
29   libgnunetdnsparser.la \
30   libgnunetdnsstub.la \
31   libgnunetdns.la
32
33 libexec_PROGRAMS = \
34   gnunet-service-dns $(HIJACKBIN)
35
36 noinst_PROGRAMS = \
37   gnunet-dns-monitor gnunet-dns-redirector
38
39 plugin_LTLIBRARIES = \
40   libgnunet_plugin_block_dns.la 
41
42 if LINUX
43 check_SCRIPTS = \
44  test_gnunet_dns.sh
45 endif
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/dns/libgnunetdnsstub.la \
77   $(top_builddir)/src/tun/libgnunettun.la \
78   $(top_builddir)/src/statistics/libgnunetstatistics.la \
79   $(top_builddir)/src/util/libgnunetutil.la \
80   $(GN_LIBINTL)
81 gnunet_service_dns_DEPENDENCIES = \
82   libgnunetdnsstub.la
83
84 libgnunetdnsparser_la_SOURCES = \
85  dnsparser.c 
86 libgnunetdnsparser_la_LIBADD = \
87  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
88   -lidn
89 libgnunetdnsparser_la_LDFLAGS = \
90   $(GN_LIB_LDFLAGS) \
91   -version-info 1:0:1
92
93 libgnunetdnsstub_la_SOURCES = \
94  dnsstub.c 
95 libgnunetdnsstub_la_LIBADD = \
96  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
97 libgnunetdnsstub_la_LDFLAGS = \
98   $(GN_LIB_LDFLAGS) \
99   -version-info 0:0:0
100
101 libgnunetdns_la_SOURCES = \
102  dns_api.c dns.h
103 libgnunetdns_la_LIBADD = \
104  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
105 libgnunetdns_la_LDFLAGS = \
106   $(GN_LIB_LDFLAGS) \
107   -version-info 0:0:0
108
109 libgnunet_plugin_block_dns_la_SOURCES = \
110   plugin_block_dns.c
111 libgnunet_plugin_block_dns_la_LIBADD = \
112   $(top_builddir)/src/util/libgnunetutil.la
113 libgnunet_plugin_block_dns_la_LDFLAGS = \
114   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
115
116
117 if ENABLE_TEST_RUN
118 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
119 endif
120
121 EXTRA_DIST = \
122   $(check_SCRIPTS)