]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind/lib/Makefile
This commit was generated by cvs2svn to compensate for changes in r57422,
[FreeBSD/FreeBSD.git] / contrib / bind / lib / Makefile
1 # Copyright (c) 1996,1999 by Internet Software Consortium
2 #
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.
6 #
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
14 # SOFTWARE.
15
16 # $Id: Makefile,v 8.22 1999/06/08 01:42:57 vixie Exp $
17
18 SUBDIRS = resolv irs isc bsd inet nameser dst
19
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:
23 SYSTYPE= bsdos
24 SHELL= /bin/sh
25 O=o
26 A=a
27 DESTDIR=
28 DESTINC= /usr/local/bind/include
29 DESTLIB= /usr/local/bind/lib
30 TOP= ..
31 INCL= ${TOP}/include
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}
36 RANLIB= ranlib
37 AR= ar cru
38 INSTALL= install
39 CDEBUG= -g
40 REENTRANT=-D_REENTRANT
41 INSTALL_EXEC=
42 INSTALL_LIB=-o bin -g bin
43
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}"
57
58 LIB = libbind.${A}
59 LIBTS = ${TOP}/lib/libbind.ts
60 LIBR = libbind_r.${A}
61 LIBRTS = ${TOP}/lib/libbindr.ts
62
63 all depend clean install distclean::
64         @for x in ${SUBDIRS}; do \
65                 (cd $$x; pwd; ${MAKE} ${MARGS} $@); \
66         done
67
68 all:: ${LIBTS} ${LIBRTS}
69
70 ${LIBRTS}: ${LIBBINDR}
71         ${RANLIB} ${LIBBINDR}
72         sleep 1 && touch ${LIBRTS}
73
74 ${LIBTS}: ${LIBBIND}
75         ${RANLIB} ${LIBBIND}
76         sleep 1 && touch ${LIBTS}
77
78 distclean:: clean
79
80 clean:: FRC
81         rm -f *~ *.BAK *.CKP *.orig
82         rm -f ${LIBBIND} ${LIBTS}
83         rm -f ${LIBBINDR} ${LIBRTS}
84
85 install:: ${DESTDIR}${DESTLIB} ${DESTDIR}${DESTLIB}/${LIB}
86 install:: ${DESTDIR}${DESTLIB} ${DESTDIR}${DESTLIB}/${LIBR}
87
88 ${DESTDIR}${DESTLIB}:
89         mkdir -p ${DESTDIR}${DESTLIB}
90
91 ${DESTDIR}${DESTLIB}/${LIBR}: ${LIBBINDR}
92         ${INSTALL} -c ${INSTALL_LIB} -m 644 ${LIBBINDR} \
93                 ${DESTDIR}${DESTLIB}/${LIBR}
94         ( cd ${DESTDIR}${DESTLIB} ; ${RANLIB} ${LIBR} )
95
96 ${DESTDIR}${DESTLIB}/${LIB}: ${LIBBIND}
97         ${INSTALL} -c ${INSTALL_LIB} -m 644 ${LIBBIND} \
98                 ${DESTDIR}${DESTLIB}/${LIB}
99         ( cd ${DESTDIR}${DESTLIB} ; ${RANLIB} ${LIB} )
100
101 links:: FRC
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; \
106                 ); \
107         done
108
109 FRC: