-fixing misc minor ats test/driver bugs
[oweals/gnunet.git] / src / dns / Makefile.am
1 AM_CPPFLAGS = -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 check_PROGRAMS = \
48  test_hexcoder
49
50 gnunet_helper_dns_SOURCES = \
51  gnunet-helper-dns.c
52
53
54 gnunet_dns_monitor_SOURCES = \
55  gnunet-dns-monitor.c
56 gnunet_dns_monitor_LDADD = \
57   libgnunetdnsparser.la \
58   libgnunetdns.la \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(GN_LIBINTL)
61
62 gnunet_dns_redirector_SOURCES = \
63  gnunet-dns-redirector.c
64 gnunet_dns_redirector_LDADD = \
65   libgnunetdnsparser.la \
66   libgnunetdns.la \
67   $(top_builddir)/src/util/libgnunetutil.la \
68   $(GN_LIBINTL)
69
70 gnunet_service_dns_SOURCES = \
71  gnunet-service-dns.c
72 gnunet_service_dns_LDADD = \
73   libgnunetdnsstub.la \
74   $(top_builddir)/src/tun/libgnunettun.la \
75   $(top_builddir)/src/statistics/libgnunetstatistics.la \
76   $(top_builddir)/src/util/libgnunetutil.la \
77   $(GN_LIBINTL)
78
79 libgnunetdnsparser_la_SOURCES = \
80  dnsparser.c
81 libgnunetdnsparser_la_LIBADD = \
82  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
83   -lidn
84 libgnunetdnsparser_la_LDFLAGS = \
85   $(GN_LIB_LDFLAGS) \
86   -version-info 1:0:1
87
88 libgnunetdnsstub_la_SOURCES = \
89  dnsstub.c
90 libgnunetdnsstub_la_LIBADD = \
91  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
92 libgnunetdnsstub_la_LDFLAGS = \
93   $(GN_LIB_LDFLAGS) \
94   -version-info 0:0:0
95
96 libgnunetdns_la_SOURCES = \
97  dns_api.c dns.h
98 libgnunetdns_la_LIBADD = \
99  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
100 libgnunetdns_la_LDFLAGS = \
101   $(GN_LIB_LDFLAGS) \
102   -version-info 0:0:0
103
104 libgnunet_plugin_block_dns_la_SOURCES = \
105   plugin_block_dns.c
106 libgnunet_plugin_block_dns_la_LIBADD = \
107   $(top_builddir)/src/util/libgnunetutil.la
108 libgnunet_plugin_block_dns_la_LDFLAGS = \
109   $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
110
111
112 if ENABLE_TEST_RUN
113 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
114 TESTS = $(check_PROGRAMS)  $(check_SCRIPTS)
115 endif
116
117 EXTRA_DIST = \
118   $(check_SCRIPTS)
119
120
121 test_hexcoder_SOURCES = \
122  test_hexcoder.c
123 test_hexcoder_LDADD = \
124  libgnunetdnsparser.la \
125  $(top_builddir)/src/util/libgnunetutil.la
126