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 $
19 ### Common Makefile rules for BIND 9.
25 ### Note: paths that vary by Makefile MUST NOT be listed
26 ### here, or they won't get expanded correctly.
29 exec_prefix = @exec_prefix@
32 includedir = @includedir@
34 sysconfdir = @sysconfdir@
35 localstatedir = @localstatedir@
39 MAKEDEFS= 'DESTDIR=${DESTDIR}'
43 top_builddir = @BIND9_TOP_BUILDDIR@
44 abs_top_srcdir = @abs_top_srcdir@
49 ### Makefile may define:
52 all: subdirs ${TARGETS}
57 ### Makefile may define:
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.
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; \
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; \
86 ### Makefile must define
88 ### Makefile may define
93 ### User may define externally
98 STD_CINCLUDES = @STD_CINCLUDES@
99 STD_CDEFINES = @STD_CDEFINES@
100 STD_CWARNINGS = @STD_CWARNINGS@
105 ALWAYS_INCLUDES = -I${top_builddir} -I${abs_top_srcdir}/@PORT_INCLUDE@
106 ALWAYS_DEFINES = @ALWAYS_DEFINES@
110 ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
111 ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
113 ALL_CFLAGS = ${EXT_CFLAGS} ${CFLAGS} \
115 ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
118 ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
122 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
123 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
124 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
127 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
132 rm -f *.@O@ *.lo *.la core *.core .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; \
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}; \
151 elif [ X"${SRCS}" != X ] ; then \
152 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
153 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
155 elif [ X"${PSRCS}" != X ] ; then \
156 echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \
157 ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \
176 INSTALL_PROGRAM = @INSTALL_PROGRAM@
177 INSTALL_DATA = @INSTALL_DATA@