1*b5677b36Schristos# Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") 2*b5677b36Schristos# Copyright (C) 2001, 2002 Internet Software Consortium. 3*b5677b36Schristos# 4*b5677b36Schristos# Permission to use, copy, modify, and/or distribute this software for any 5*b5677b36Schristos# purpose with or without fee is hereby granted, provided that the above 6*b5677b36Schristos# copyright notice and this permission notice appear in all copies. 7*b5677b36Schristos# 8*b5677b36Schristos# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 9*b5677b36Schristos# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10*b5677b36Schristos# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 11*b5677b36Schristos# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12*b5677b36Schristos# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 13*b5677b36Schristos# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14*b5677b36Schristos# PERFORMANCE OF THIS SOFTWARE. 15*b5677b36Schristos 16*b5677b36Schristos# Id: rules.in,v 1.15 2009/01/22 23:49:23 tbox Exp 17*b5677b36Schristos 18*b5677b36Schristos### 19*b5677b36Schristos### Common Makefile rules for BIND 9. 20*b5677b36Schristos### 21*b5677b36Schristos 22*b5677b36Schristos### 23*b5677b36Schristos### Paths 24*b5677b36Schristos### 25*b5677b36Schristos### Note: paths that vary by Makefile MUST NOT be listed 26*b5677b36Schristos### here, or they won't get expanded correctly. 27*b5677b36Schristos 28*b5677b36Schristosprefix = @prefix@ 29*b5677b36Schristosexec_prefix = @exec_prefix@ 30*b5677b36Schristosbindir = @bindir@ 31*b5677b36Schristossbindir = @sbindir@ 32*b5677b36Schristosincludedir = @includedir@ 33*b5677b36Schristoslibdir = @libdir@ 34*b5677b36Schristossysconfdir = @sysconfdir@ 35*b5677b36Schristoslocalstatedir = @localstatedir@ 36*b5677b36Schristosmandir = @mandir@ 37*b5677b36Schristosdatarootdir = @datarootdir@ 38*b5677b36Schristos 39*b5677b36SchristosDESTDIR = 40*b5677b36SchristosMAKEDEFS= 'DESTDIR=${DESTDIR}' 41*b5677b36Schristos 42*b5677b36Schristos@SET_MAKE@ 43*b5677b36Schristos 44*b5677b36Schristostop_builddir = @BIND9_TOP_BUILDDIR@ 45*b5677b36Schristosabs_top_srcdir = @abs_top_srcdir@ 46*b5677b36Schristos 47*b5677b36Schristos### 48*b5677b36Schristos### All 49*b5677b36Schristos### 50*b5677b36Schristos### Makefile may define: 51*b5677b36Schristos### TARGETS 52*b5677b36Schristos 53*b5677b36Schristosall: subdirs ${TARGETS} 54*b5677b36Schristos 55*b5677b36Schristos### 56*b5677b36Schristos### Subdirectories 57*b5677b36Schristos### 58*b5677b36Schristos### Makefile may define: 59*b5677b36Schristos### SUBDIRS 60*b5677b36Schristos 61*b5677b36SchristosALL_SUBDIRS = ${SUBDIRS} nulldir 62*b5677b36Schristos 63*b5677b36Schristos# 64*b5677b36Schristos# We use a single-colon rule so that additional dependencies of 65*b5677b36Schristos# subdirectories can be specified after the inclusion of this file. 66*b5677b36Schristos# The "depend" target is treated the same way. 67*b5677b36Schristos# 68*b5677b36Schristossubdirs: 69*b5677b36Schristos @for i in ${ALL_SUBDIRS}; do \ 70*b5677b36Schristos if [ "$$i" != "nulldir" -a -d $$i ]; then \ 71*b5677b36Schristos echo "making all in `pwd`/$$i"; \ 72*b5677b36Schristos (cd $$i; ${MAKE} ${MAKEDEFS} all) || exit 1; \ 73*b5677b36Schristos fi; \ 74*b5677b36Schristos done 75*b5677b36Schristos 76*b5677b36Schristosinstall clean distclean docclean manclean:: 77*b5677b36Schristos @for i in ${ALL_SUBDIRS}; do \ 78*b5677b36Schristos if [ "$$i" != "nulldir" -a -d $$i ]; then \ 79*b5677b36Schristos echo "making $@ in `pwd`/$$i"; \ 80*b5677b36Schristos (cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \ 81*b5677b36Schristos fi \ 82*b5677b36Schristos done 83*b5677b36Schristos 84*b5677b36Schristos### 85*b5677b36Schristos### C Programs 86*b5677b36Schristos### 87*b5677b36Schristos### Makefile must define 88*b5677b36Schristos### CC 89*b5677b36Schristos### Makefile may define 90*b5677b36Schristos### CFLAGS 91*b5677b36Schristos### CINCLUDES 92*b5677b36Schristos### CDEFINES 93*b5677b36Schristos### CWARNINGS 94*b5677b36Schristos### User may define externally 95*b5677b36Schristos### EXT_CFLAGS 96*b5677b36Schristos 97*b5677b36SchristosCC = @CC@ 98*b5677b36SchristosCFLAGS = @CFLAGS@ 99*b5677b36SchristosSTD_CINCLUDES = @STD_CINCLUDES@ 100*b5677b36SchristosSTD_CDEFINES = @STD_CDEFINES@ 101*b5677b36SchristosSTD_CWARNINGS = @STD_CWARNINGS@ 102*b5677b36Schristos 103*b5677b36Schristos.SUFFIXES: 104*b5677b36Schristos.SUFFIXES: .c .@O@ 105*b5677b36Schristos 106*b5677b36SchristosALWAYS_INCLUDES = -I${top_builddir} -I${abs_top_srcdir}/@PORT_INCLUDE@ 107*b5677b36SchristosALWAYS_DEFINES = @ALWAYS_DEFINES@ 108*b5677b36SchristosALWAYS_WARNINGS = 109*b5677b36Schristos 110*b5677b36SchristosALL_CPPFLAGS = \ 111*b5677b36Schristos ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \ 112*b5677b36Schristos ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES} 113*b5677b36Schristos 114*b5677b36SchristosALL_CFLAGS = ${EXT_CFLAGS} ${CFLAGS} \ 115*b5677b36Schristos ${ALL_CPPFLAGS} \ 116*b5677b36Schristos ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS} 117*b5677b36Schristos 118*b5677b36Schristos.c.@O@: 119*b5677b36Schristos ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $< 120*b5677b36Schristos 121*b5677b36SchristosSHELL = @SHELL@ 122*b5677b36SchristosLIBTOOL = @LIBTOOL@ 123*b5677b36SchristosLIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@ 124*b5677b36SchristosLIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@ 125*b5677b36SchristosLIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@ 126*b5677b36SchristosPURIFY = @PURIFY@ 127*b5677b36Schristos 128*b5677b36SchristosMKDEP = ${SHELL} ${top_builddir}/make/mkdep 129*b5677b36Schristos 130*b5677b36Schristoscleandir: distclean 131*b5677b36Schristos 132*b5677b36Schristosclean distclean:: 133*b5677b36Schristos rm -f *.@O@ *.lo *.la core *.core .depend 134*b5677b36Schristos rm -rf .libs 135*b5677b36Schristos 136*b5677b36Schristosdistclean:: 137*b5677b36Schristos rm -f Makefile 138*b5677b36Schristos 139*b5677b36Schristosdepend: 140*b5677b36Schristos @for i in ${ALL_SUBDIRS}; do \ 141*b5677b36Schristos if [ "$$i" != "nulldir" -a -d $$i ]; then \ 142*b5677b36Schristos echo "making depend in `pwd`/$$i"; \ 143*b5677b36Schristos (cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \ 144*b5677b36Schristos fi \ 145*b5677b36Schristos done 146*b5677b36Schristos @if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ 147*b5677b36Schristos echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ 148*b5677b36Schristos ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ 149*b5677b36Schristos echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \ 150*b5677b36Schristos ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \ 151*b5677b36Schristos ${DEPENDEXTRA} \ 152*b5677b36Schristos elif [ X"${SRCS}" != X ] ; then \ 153*b5677b36Schristos echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ 154*b5677b36Schristos ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ 155*b5677b36Schristos ${DEPENDEXTRA} \ 156*b5677b36Schristos elif [ X"${PSRCS}" != X ] ; then \ 157*b5677b36Schristos echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \ 158*b5677b36Schristos ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \ 159*b5677b36Schristos ${DEPENDEXTRA} \ 160*b5677b36Schristos fi 161*b5677b36Schristos 162*b5677b36SchristosFORCE: 163*b5677b36Schristos 164*b5677b36Schristos### 165*b5677b36Schristos### Libraries 166*b5677b36Schristos### 167*b5677b36Schristos 168*b5677b36SchristosAR = @AR@ 169*b5677b36SchristosARFLAGS = @ARFLAGS@ 170*b5677b36SchristosRANLIB = @RANLIB@ 171*b5677b36Schristos 172*b5677b36Schristos### 173*b5677b36Schristos### Installation 174*b5677b36Schristos### 175*b5677b36Schristos 176*b5677b36SchristosINSTALL = @INSTALL@ 177*b5677b36SchristosINSTALL_PROGRAM = @INSTALL_PROGRAM@ 178*b5677b36SchristosINSTALL_DATA = @INSTALL_DATA@ 179