1 # Copyright (c) 1996,1999 by Internet Software Consortium
3 # Permission to use, copy, modify, and distribute this software for any
4 # purpose with or without fee is hereby granted, provided that the above
5 # copyright notice and this permission notice appear in all copies.
7 # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
8 # ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
9 # OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
10 # CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
11 # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
12 # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
13 # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
16 # $Id: Makefile,v 8.22 1999/06/08 01:42:57 vixie Exp $
18 SUBDIRS = resolv irs isc bsd inet nameser dst
20 # these are only appropriate for BSD 4.4 or derivatives, and are used in
21 # development. normal builds will be done in the top level directory and
22 # this Makefile will be invoked with a lot of overrides for the following:
28 DESTINC= /usr/local/bind/include
29 DESTLIB= /usr/local/bind/lib
32 PORTINCL= ${TOP}/port/${SYSTYPE}/include
33 LIBBIND= ${TOP}/lib/libbind.${A}
34 LIBBINDR= ${TOP}/lib/libbind_r.${A}
35 LIBPORT= ${TOP}/port/libport.${A}
40 REENTRANT=-D_REENTRANT
42 INSTALL_LIB=-o bin -g bin
44 # Warning: this MARGS has RANLIB=: to prevent submakes from running ranlib
45 MARGS = "SYSTYPE=${SYSTYPE}" "SHELL=${SHELL}" "A=${A}" "O=${O}" \
46 "CC=${CC}" "LEX=${LEX}" "YACC=${YACC}" "CDEBUG=${CDEBUG}" \
47 "SYSLIBS=${SYSLIBS}" "LDFLAGS=${LDFLAGS}" \
48 "DESTDIR=${DESTDIR}" "DESTMAN=${DESTMAN}" \
49 "DESTBIN=${DESTBIN}" "DESTSBIN=${DESTSBIN}" "DESTEXEC=${DESTEXEC}" \
50 "DESTLIB=${DESTLIB}" "DESTINC=${DESTINC}" "DESTHELP=${DESTHELP}" \
51 "RANLIB=:" "AR=${AR}" "ARPREF=${ARPREF}" "ARSUFF=${ARSUFF}" \
52 "INCL=../${INCL}" "PORTINCL=../${PORTINCL}" "EXE=${EXE}" \
53 "LIBBIND=../${LIBBIND}" "LIBPORT=../${LIBPORT}" \
54 "INSTALL=${INSTALL}" "CPPFLAGS=${CPPFLAGS}" "TOP=../${TOP}" \
55 "REENTRANT=${REENTRANT}" "INSTALL_LIB=${INSTALL_LIB}" \
56 "INSTALL_EXEC=${INSTALL_EXEC}" "BOUNDS=${BOUNDS}"
59 LIBTS = ${TOP}/lib/libbind.ts
61 LIBRTS = ${TOP}/lib/libbindr.ts
63 all depend clean install distclean::
64 @for x in ${SUBDIRS}; do \
65 (cd $$x; pwd; ${MAKE} ${MARGS} $@); \
68 all:: ${LIBTS} ${LIBRTS}
70 ${LIBRTS}: ${LIBBINDR}
72 sleep 1 && touch ${LIBRTS}
76 sleep 1 && touch ${LIBTS}
81 rm -f *~ *.BAK *.CKP *.orig
82 rm -f ${LIBBIND} ${LIBTS}
83 rm -f ${LIBBINDR} ${LIBRTS}
85 install:: ${DESTDIR}${DESTLIB} ${DESTDIR}${DESTLIB}/${LIB}
86 install:: ${DESTDIR}${DESTLIB} ${DESTDIR}${DESTLIB}/${LIBR}
89 mkdir -p ${DESTDIR}${DESTLIB}
91 ${DESTDIR}${DESTLIB}/${LIBR}: ${LIBBINDR}
92 ${INSTALL} -c ${INSTALL_LIB} -m 644 ${LIBBINDR} \
93 ${DESTDIR}${DESTLIB}/${LIBR}
94 ( cd ${DESTDIR}${DESTLIB} ; ${RANLIB} ${LIBR} )
96 ${DESTDIR}${DESTLIB}/${LIB}: ${LIBBIND}
97 ${INSTALL} -c ${INSTALL_LIB} -m 644 ${LIBBIND} \
98 ${DESTDIR}${DESTLIB}/${LIB}
99 ( cd ${DESTDIR}${DESTLIB} ; ${RANLIB} ${LIB} )
102 @set -e; for x in ${SUBDIRS}; do \
103 ( mkdir $$x; cd $$x; pwd; ln -s ../SRC/$$x SRC; \
104 cp SRC/Makefile Makefile; chmod +w Makefile; \
105 ${MAKE} ${MARGS} links; \