Import bind 9.5.2 vendor sources.
[dragonfly.git] / contrib / bind-9.5.2 / lib / bind / make / rules.in
blobf37998035f591e67dec5ff7c90420575b4046dd8
1 # Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 2001, 2002  Internet Software Consortium.
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.
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.
16 # $Id: rules.in,v 1.13 2007/06/18 23:47:34 tbox Exp $
18 ###
19 ### Common Makefile rules for BIND 9.
20 ###
22 ###
23 ### Paths
24 ###
25 ### Note: paths that vary by Makefile MUST NOT be listed
26 ### here, or they won't get expanded correctly.
28 prefix =        @prefix@
29 exec_prefix =   @exec_prefix@
30 bindir =        @bindir@
31 sbindir =       @sbindir@
32 includedir =    @includedir@
33 libdir =        @libdir@
34 sysconfdir =    @sysconfdir@
35 localstatedir = @localstatedir@
36 mandir =        @mandir@
38 DESTDIR =
39 MAKEDEFS= 'DESTDIR=${DESTDIR}'
41 @SET_MAKE@
43 top_builddir =  @BIND9_TOP_BUILDDIR@
44 abs_top_srcdir = @abs_top_srcdir@
46 ###
47 ### All
48 ###
49 ### Makefile may define:
50 ###     TARGETS
52 all: subdirs ${TARGETS}
54 ###
55 ### Subdirectories
56 ###
57 ### Makefile may define:
58 ###     SUBDIRS
60 ALL_SUBDIRS = ${SUBDIRS} nulldir
63 # We use a single-colon rule so that additional dependencies of
64 # subdirectories can be specified after the inclusion of this file.
65 # The "depend" target is treated the same way.
67 subdirs:
68         @for i in ${ALL_SUBDIRS}; do \
69                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
70                         echo "making all in `pwd`/$$i"; \
71                         (cd $$i; ${MAKE} ${MAKEDEFS} all) || exit 1; \
72                 fi; \
73         done
75 install clean distclean docclean manclean::
76         @for i in ${ALL_SUBDIRS}; do \
77                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
78                         echo "making $@ in `pwd`/$$i"; \
79                         (cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \
80                 fi \
81         done
83 ###
84 ### C Programs
85 ###
86 ### Makefile must define
87 ###     CC
88 ### Makefile may define
89 ###     CFLAGS
90 ###     CINCLUDES
91 ###     CDEFINES
92 ###     CWARNINGS
93 ### User may define externally
94 ###     EXT_CFLAGS
96 CC =            @CC@
97 CFLAGS =        @CFLAGS@
98 STD_CINCLUDES = @STD_CINCLUDES@
99 STD_CDEFINES =  @STD_CDEFINES@
100 STD_CWARNINGS = @STD_CWARNINGS@
102 .SUFFIXES:
103 .SUFFIXES: .c .@O@
105 ALWAYS_INCLUDES = -I${top_builddir} -I${abs_top_srcdir}/@PORT_INCLUDE@
106 ALWAYS_DEFINES = @ALWAYS_DEFINES@
107 ALWAYS_WARNINGS =
109 ALL_CPPFLAGS = \
110         ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
111         ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
113 ALL_CFLAGS = ${EXT_CFLAGS} ${CFLAGS} \
114         ${ALL_CPPFLAGS} \
115         ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
117 .c.@O@:
118         ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
120 SHELL = @SHELL@
121 LIBTOOL = @LIBTOOL@
122 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
123 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
124 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
125 PURIFY = @PURIFY@
127 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
129 cleandir: distclean
131 clean distclean::
132         rm -f *.@O@ *.lo *.la core *.core .depend
133         rm -rf .libs
135 distclean::
136         rm -f Makefile
138 depend:
139         @for i in ${ALL_SUBDIRS}; do \
140                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
141                         echo "making depend in `pwd`/$$i"; \
142                         (cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \
143                 fi \
144         done
145         @if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
146                 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
147                 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
148                 echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \
149                 ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \
150                 ${DEPENDEXTRA} \
151         elif [ X"${SRCS}" != X ] ; then \
152                 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
153                 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
154                 ${DEPENDEXTRA} \
155         elif [ X"${PSRCS}" != X ] ; then \
156                 echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \
157                 ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \
158                 ${DEPENDEXTRA} \
159         fi
161 FORCE:
164 ### Libraries
167 AR =            @AR@
168 ARFLAGS =       @ARFLAGS@
169 RANLIB =        @RANLIB@
172 ### Installation
175 INSTALL =               @INSTALL@
176 INSTALL_PROGRAM =       @INSTALL_PROGRAM@
177 INSTALL_DATA =          @INSTALL_DATA@