ignore some files
[tridge/bind9.git] / bin / dig / Makefile
1 # Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 2000-2002  Internet Software Consortium.
3 #
4 # Permission to use, copy, modify, and/or distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
7 #
8 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 # AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 # PERFORMANCE OF THIS SOFTWARE.
15
16 # $Id: Makefile.in,v 1.41 2007/06/19 23:46:59 tbox Exp $
17
18 srcdir =        .
19
20 top_srcdir =    ../..
21
22 VERSION=9.6.1-P2
23
24 # Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
25 # Copyright (C) 1999-2001  Internet Software Consortium.
26 #
27 # Permission to use, copy, modify, and/or distribute this software for any
28 # purpose with or without fee is hereby granted, provided that the above
29 # copyright notice and this permission notice appear in all copies.
30 #
31 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
32 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
33 # AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
34 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
35 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
36 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
37 # PERFORMANCE OF THIS SOFTWARE.
38
39 # $Id: includes.in,v 1.21 2007/06/19 23:47:24 tbox Exp $
40
41 # Search for machine-generated header files in the build tree,
42 # and for normal headers in the source tree (${top_srcdir}).
43 # We only need to look in OS-specific subdirectories for the
44 # latter case, because there are no machine-generated OS-specific
45 # headers.
46
47 ISC_INCLUDES = -I/home/tridge/project/bind9/lib/isc/include \
48         -I${top_srcdir}/lib/isc \
49         -I${top_srcdir}/lib/isc/include \
50         -I${top_srcdir}/lib/isc/unix/include \
51         -I${top_srcdir}/lib/isc/pthreads/include \
52         -I${top_srcdir}/lib/isc/x86_32/include
53
54 ISCCC_INCLUDES = -I/home/tridge/project/bind9/lib/isccc/include \
55        -I${top_srcdir}/lib/isccc/include
56
57 ISCCFG_INCLUDES = -I/home/tridge/project/bind9/lib/isccfg/include \
58        -I${top_srcdir}/lib/isccfg/include
59
60 DNS_INCLUDES = -I/home/tridge/project/bind9/lib/dns/include \
61         -I${top_srcdir}/lib/dns/include
62
63 LWRES_INCLUDES = -I/home/tridge/project/bind9/lib/lwres/include \
64         -I${top_srcdir}/lib/lwres/unix/include \
65         -I${top_srcdir}/lib/lwres/include
66
67 BIND9_INCLUDES = -I/home/tridge/project/bind9/lib/bind9/include \
68         -I${top_srcdir}/lib/bind9/include
69
70 TEST_INCLUDES = \
71         -I${top_srcdir}/lib/tests/include
72
73 CINCLUDES =     -I${srcdir}/include ${DNS_INCLUDES} ${BIND9_INCLUDES} \
74                 ${ISC_INCLUDES} ${LWRES_INCLUDES}
75
76 CDEFINES =      -DVERSION=\"${VERSION}\"
77 CWARNINGS =
78
79 ISCCFGLIBS =    ../../lib/isccfg/libisccfg.la
80 DNSLIBS =       ../../lib/dns/libdns.la  -L/usr/lib -lgssapi_krb5 -lcrypto
81 BIND9LIBS =     ../../lib/bind9/libbind9.la
82 ISCLIBS =       ../../lib/isc/libisc.la
83 LWRESLIBS =     ../../lib/lwres/liblwres.la
84
85 ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.la
86 DNSDEPLIBS =    ../../lib/dns/libdns.la
87 BIND9DEPLIBS =  ../../lib/bind9/libbind9.la
88 ISCDEPLIBS =    ../../lib/isc/libisc.la
89 LWRESDEPLIBS =  ../../lib/lwres/liblwres.la
90
91 DEPLIBS =       ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS} \
92                 ${LWRESDEPLIBS}
93
94 LIBS =          ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
95                 ${ISCCFGLIBS}  -lcap -lpthread  -lxml2
96
97 SUBDIRS =
98
99 TARGETS =       dig host nslookup
100
101 OBJS =          dig.lo dighost.lo host.lo nslookup.lo
102
103 UOBJS =
104
105 SRCS =          dig.c dighost.c host.c nslookup.c
106
107 MANPAGES =      dig.1 host.1 nslookup.1
108
109 HTMLPAGES =     dig.html host.html nslookup.html
110
111 MANOBJS =       ${MANPAGES} ${HTMLPAGES}
112
113 # Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
114 # Copyright (C) 1998-2003  Internet Software Consortium.
115 #
116 # Permission to use, copy, modify, and/or distribute this software for any
117 # purpose with or without fee is hereby granted, provided that the above
118 # copyright notice and this permission notice appear in all copies.
119 #
120 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
121 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
122 # AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
123 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
124 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
125 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
126 # PERFORMANCE OF THIS SOFTWARE.
127
128 # $Id: rules.in,v 1.64.130.2 2009/01/10 23:46:57 tbox Exp $
129
130 ###
131 ### Common Makefile rules for BIND 9.
132 ###
133
134 ###
135 ### Paths
136 ###
137 ### Note: paths that vary by Makefile MUST NOT be listed
138 ### here, or they won't get expanded correctly.
139
140 prefix =        /home/tridge/project/bind9/prefix
141 exec_prefix =   ${prefix}
142 bindir =        ${exec_prefix}/bin
143 sbindir =       ${exec_prefix}/sbin
144 includedir =    ${prefix}/include
145 libdir =        ${exec_prefix}/lib
146 sysconfdir =    /etc/bind
147 localstatedir = /var
148 mandir =        $/share/man
149 datarootdir =   ${prefix}/share
150
151 DESTDIR =
152
153
154
155 top_builddir =  /home/tridge/project/bind9
156
157 ###
158 ### All
159 ###
160 ### Makefile may define:
161 ###     TARGETS
162
163 all: subdirs ${TARGETS}
164
165 ###
166 ### Subdirectories
167 ###
168 ### Makefile may define:
169 ###     SUBDIRS
170
171 ALL_SUBDIRS = ${SUBDIRS} nulldir
172
173 #
174 # We use a single-colon rule so that additional dependencies of
175 # subdirectories can be specified after the inclusion of this file.
176 # The "depend" target is treated the same way.
177 #
178 subdirs:
179         @for i in ${ALL_SUBDIRS}; do \
180                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
181                         echo "making all in `pwd`/$$i"; \
182                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" all) || exit 1; \
183                 fi; \
184         done
185
186 install:: all
187
188 install clean distclean maintainer-clean doc docclean man manclean::
189         @for i in ${ALL_SUBDIRS}; do \
190                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
191                         echo "making $@ in `pwd`/$$i"; \
192                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
193                 fi; \
194         done
195
196 ###
197 ### C Programs
198 ###
199 ### Makefile must define
200 ###     CC
201 ### Makefile may define
202 ###     CFLAGS
203 ###     LDFLAGS
204 ###     CINCLUDES
205 ###     CDEFINES
206 ###     CWARNINGS
207 ### User may define externally
208 ###     EXT_CFLAGS
209
210 CC =            ccache gcc
211 CFLAGS =        -fno-strict-aliasing -DDIG_SIGCHASE -g -I/usr/include/libxml2
212 LDFLAGS =       
213 STD_CINCLUDES = 
214 STD_CDEFINES =   -D_GNU_SOURCE
215 STD_CWARNINGS =  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing
216
217 BUILD_CC = ccache gcc
218 BUILD_CFLAGS = -fno-strict-aliasing -DDIG_SIGCHASE -g -I/usr/include/libxml2
219 BUILD_CPPFLAGS =  -D_GNU_SOURCE 
220 BUILD_LDFLAGS = 
221 BUILD_LIBS = -lcap -lpthread  -lxml2
222
223 .SUFFIXES:
224 .SUFFIXES: .c .lo
225
226 ALWAYS_INCLUDES = -I${top_builddir}
227 ALWAYS_DEFINES = -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
228 ALWAYS_WARNINGS =
229
230 ALL_CPPFLAGS = \
231         ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
232         ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
233
234 ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \
235         ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
236
237 .c.lo:
238         ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
239
240 SHELL = /bin/bash
241 LIBTOOL = $(SHELL) $(top_builddir)/libtool
242 LIBTOOL_MODE_COMPILE = ${LIBTOOL} --mode=compile
243 LIBTOOL_MODE_INSTALL = ${LIBTOOL} --mode=install
244 LIBTOOL_MODE_LINK = ${LIBTOOL} --mode=link
245 PURIFY = 
246
247 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
248
249 cleandir: distclean
250 superclean: maintainer-clean
251
252 clean distclean maintainer-clean::
253         rm -f *.lo *.o *.lo *.la core *.core .depend
254         rm -rf .libs
255
256 distclean maintainer-clean::
257         rm -f Makefile
258
259 depend:
260         @for i in ${ALL_SUBDIRS}; do \
261                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
262                         echo "making depend in `pwd`/$$i"; \
263                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
264                 fi; \
265         done
266         @if [ X"${VPATH}" != X ] ; then \
267                 if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
268                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
269                         ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
270                         echo ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
271                         ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
272                         ${DEPENDEXTRA} \
273                 elif [ X"${SRCS}" != X ] ; then \
274                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
275                         ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
276                         ${DEPENDEXTRA} \
277                 elif [ X"${PSRCS}" != X ] ; then \
278                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
279                         ${MKDEP} -vpath ${VPATH} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
280                         ${DEPENDEXTRA} \
281                 fi \
282         else \
283                 if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
284                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
285                         ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
286                         echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
287                         ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
288                         ${DEPENDEXTRA} \
289                 elif [ X"${SRCS}" != X ] ; then \
290                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
291                         ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
292                         ${DEPENDEXTRA} \
293                 elif [ X"${PSRCS}" != X ] ; then \
294                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
295                         ${MKDEP} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
296                         ${DEPENDEXTRA} \
297                 fi \
298         fi
299
300 FORCE:
301
302 ###
303 ### Libraries
304 ###
305
306 AR =            /usr/bin/ar
307 ARFLAGS =       cruv
308 RANLIB =        ranlib
309
310 ###
311 ### Installation
312 ###
313
314 INSTALL =               /usr/bin/install -c
315 INSTALL_PROGRAM =       ${INSTALL}
316 LINK_PROGRAM =          ln -s
317 INSTALL_SCRIPT =        ${INSTALL}
318 INSTALL_DATA =          ${INSTALL} -m 644
319
320 ###
321 ### Programs used when generating documentation.  It's ok for these
322 ### not to exist when not generating documentation.
323 ###
324
325 XSLTPROC =              /usr/bin/xsltproc --novalid --xinclude --nonet
326 PERL =                  /usr/bin/perl
327 LATEX =                 /usr/bin/latex
328 PDFLATEX =              /usr/bin/pdflatex
329 W3M =                   /usr/bin/w3m
330
331 ###
332 ### DocBook -> HTML
333 ### DocBook -> man page
334 ###
335
336 .SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8
337
338 .docbook.html:
339         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $<
340
341 .docbook.1:
342         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
343
344 .docbook.2:
345         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
346
347 .docbook.3:
348         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
349
350 .docbook.4:
351         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
352
353 .docbook.5:
354         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
355
356 .docbook.6:
357         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
358
359 .docbook.7:
360         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
361
362 .docbook.8:
363         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
364
365 dig: dig.lo dighost.lo ${UOBJS} ${DEPLIBS}
366         ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
367         dig.lo dighost.lo ${UOBJS} ${LIBS}
368
369 host: host.lo dighost.lo ${UOBJS} ${DEPLIBS}
370         ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
371         host.lo dighost.lo ${UOBJS} ${LIBS}
372
373 nslookup: nslookup.lo dighost.lo ${UOBJS} ${DEPLIBS}
374         ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
375         nslookup.lo dighost.lo ${UOBJS} ${LIBS}
376
377 doc man:: ${MANOBJS}
378
379 docclean manclean maintainer-clean::
380         rm -f ${MANOBJS}
381
382 clean distclean maintainer-clean::
383         rm -f ${TARGETS}
384
385 installdirs:
386         $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
387         $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
388
389 install:: dig host nslookup installdirs
390         ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
391                 dig ${DESTDIR}${bindir}
392         ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
393                 host ${DESTDIR}${bindir}
394         ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
395                 nslookup ${DESTDIR}${bindir}
396         for m in ${MANPAGES}; do \
397                 ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
398                 done