Merge remote-tracking branch 'origin/master' into identity_abe
[oweals/gnunet.git] / src / dns / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage -O0
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 plugindir = $(libdir)/gnunet
17
18 pkgcfg_DATA = \
19   dns.conf
20
21 if LINUX
22 HIJACKBIN = gnunet-helper-dns
23 install-exec-hook:
24         $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true
25 else
26 install-exec-hook:
27 endif
28
29 lib_LTLIBRARIES = \
30   libgnunetdnsparser.la \
31   libgnunetdnsstub.la \
32   libgnunetdns.la
33
34 libexec_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 check_PROGRAMS = \
49  test_hexcoder
50
51 gnunet_helper_dns_SOURCES = \
52  gnunet-helper-dns.c
53
54
55 gnunet_dns_monitor_SOURCES = \
56  gnunet-dns-monitor.c
57 gnunet_dns_monitor_LDADD = \
58   libgnunetdnsparser.la \
59   libgnunetdns.la \
60   $(top_builddir)/src/util/libgnunetutil.la \
61   $(GN_LIBINTL)
62
63 gnunet_dns_redirector_SOURCES = \
64  gnunet-dns-redirector.c
65 gnunet_dns_redirector_LDADD = \
66   libgnunetdnsparser.la \
67   libgnunetdns.la \
68   $(top_builddir)/src/util/libgnunetutil.la \
69   $(GN_LIBINTL)
70
71 gnunet_service_dns_SOURCES = \
72  gnunet-service-dns.c
73 gnunet_service_dns_LDADD = \
74   libgnunetdnsstub.la \
75   $(top_builddir)/src/tun/libgnunettun.la \
76   $(top_builddir)/src/statistics/libgnunetstatistics.la \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(GN_LIBINTL)
79
80 libgnunetdnsparser_la_SOURCES = \
81  dnsparser.c
82 libgnunetdnsparser_la_LIBADD = \
83  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
84   -lidn
85 libgnunetdnsparser_la_LDFLAGS = \
86   $(GN_LIB_LDFLAGS) \
87   -version-info 1:0:1
88
89 libgnunetdnsstub_la_SOURCES = \
90  dnsstub.c
91 libgnunetdnsstub_la_LIBADD = \
92   $(top_builddir)/src/tun/libgnunettun.la \
93  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
94 libgnunetdnsstub_la_LDFLAGS = \
95   $(GN_LIB_LDFLAGS) \
96   -version-info 0:0:0
97
98 libgnunetdns_la_SOURCES = \
99  dns_api.c dns.h
100 libgnunetdns_la_LIBADD = \
101  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
102 libgnunetdns_la_LDFLAGS = \
103   $(GN_LIB_LDFLAGS) \
104   -version-info 0:0:0
105
106 libgnunet_plugin_block_dns_la_SOURCES = \
107   plugin_block_dns.c
108 libgnunet_plugin_block_dns_la_LIBADD = \
109   $(top_builddir)/src/block/libgnunetblockgroup.la \
110   $(top_builddir)/src/util/libgnunetutil.la
111 libgnunet_plugin_block_dns_la_LDFLAGS = \
112   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
113
114
115 if ENABLE_TEST_RUN
116 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
117 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
118 endif
119
120 EXTRA_DIST = \
121   $(check_SCRIPTS)
122
123
124 test_hexcoder_SOURCES = \
125  test_hexcoder.c
126 test_hexcoder_LDADD = \
127  libgnunetdnsparser.la \
128  $(top_builddir)/src/util/libgnunetutil.la