1 # Copyright (C) 2004, 2007, 2009 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.15 2009/01/22 23:49:23 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@
37 datarootdir = @datarootdir@
40 MAKEDEFS= 'DESTDIR=${DESTDIR}'
44 top_builddir = @BIND9_TOP_BUILDDIR@
45 abs_top_srcdir = @abs_top_srcdir@
50 ### Makefile may define:
53 all: subdirs ${TARGETS}
58 ### Makefile may define:
61 ALL_SUBDIRS = ${SUBDIRS} nulldir
64 # We use a single-colon rule so that additional dependencies of
65 # subdirectories can be specified after the inclusion of this file.
66 # The "depend" target is treated the same way.
69 @for i in ${ALL_SUBDIRS}; do \
70 if [ "$$i" != "nulldir" -a -d $$i ]; then \
71 echo "making all in `pwd`/$$i"; \
72 (cd $$i; ${MAKE} ${MAKEDEFS} all) || exit 1; \
76 install clean distclean docclean manclean::
77 @for i in ${ALL_SUBDIRS}; do \
78 if [ "$$i" != "nulldir" -a -d $$i ]; then \
79 echo "making $@ in `pwd`/$$i"; \
80 (cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \
87 ### Makefile must define
89 ### Makefile may define
94 ### User may define externally
99 STD_CINCLUDES = @STD_CINCLUDES@
100 STD_CDEFINES = @STD_CDEFINES@
101 STD_CWARNINGS = @STD_CWARNINGS@
106 ALWAYS_INCLUDES = -I${top_builddir} -I${abs_top_srcdir}/@PORT_INCLUDE@
107 ALWAYS_DEFINES = @ALWAYS_DEFINES@
111 ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
112 ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
114 ALL_CFLAGS = ${EXT_CFLAGS} ${CFLAGS} \
116 ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
119 ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
123 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
124 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
125 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
128 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
133 rm -f *.@O@ *.lo *.la core *.core .depend
140 @for i in ${ALL_SUBDIRS}; do \
141 if [ "$$i" != "nulldir" -a -d $$i ]; then \
142 echo "making depend in `pwd`/$$i"; \
143 (cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \
146 @if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
147 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
148 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
149 echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \
150 ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \
152 elif [ X"${SRCS}" != X ] ; then \
153 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
154 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
156 elif [ X"${PSRCS}" != X ] ; then \
157 echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \
158 ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \
177 INSTALL_PROGRAM = @INSTALL_PROGRAM@
178 INSTALL_DATA = @INSTALL_DATA@