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