Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / libbind / dist / make / rules.in
blobfe9853b06cf5ddbf729ead21c57ea2340fdb0b6e
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
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@
37 datarootdir =   @datarootdir@
39 DESTDIR =
40 MAKEDEFS= 'DESTDIR=${DESTDIR}'
42 @SET_MAKE@
44 top_builddir =  @BIND9_TOP_BUILDDIR@
45 abs_top_srcdir = @abs_top_srcdir@
47 ###
48 ### All
49 ###
50 ### Makefile may define:
51 ###     TARGETS
53 all: subdirs ${TARGETS}
55 ###
56 ### Subdirectories
57 ###
58 ### Makefile may define:
59 ###     SUBDIRS
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.
68 subdirs:
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; \
73                 fi; \
74         done
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; \
81                 fi \
82         done
84 ###
85 ### C Programs
86 ###
87 ### Makefile must define
88 ###     CC
89 ### Makefile may define
90 ###     CFLAGS
91 ###     CINCLUDES
92 ###     CDEFINES
93 ###     CWARNINGS
94 ### User may define externally
95 ###     EXT_CFLAGS
97 CC =            @CC@
98 CFLAGS =        @CFLAGS@
99 STD_CINCLUDES = @STD_CINCLUDES@
100 STD_CDEFINES =  @STD_CDEFINES@
101 STD_CWARNINGS = @STD_CWARNINGS@
103 .SUFFIXES:
104 .SUFFIXES: .c .@O@
106 ALWAYS_INCLUDES = -I${top_builddir} -I${abs_top_srcdir}/@PORT_INCLUDE@
107 ALWAYS_DEFINES = @ALWAYS_DEFINES@
108 ALWAYS_WARNINGS =
110 ALL_CPPFLAGS = \
111         ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
112         ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
114 ALL_CFLAGS = ${EXT_CFLAGS} ${CFLAGS} \
115         ${ALL_CPPFLAGS} \
116         ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
118 .c.@O@:
119         ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
121 SHELL = @SHELL@
122 LIBTOOL = @LIBTOOL@
123 LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
124 LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@
125 LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@
126 PURIFY = @PURIFY@
128 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
130 cleandir: distclean
132 clean distclean::
133         rm -f *.@O@ *.lo *.la core *.core .depend
134         rm -rf .libs
136 distclean::
137         rm -f Makefile
139 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; \
144                 fi \
145         done
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}; \
151                 ${DEPENDEXTRA} \
152         elif [ X"${SRCS}" != X ] ; then \
153                 echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
154                 ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \
155                 ${DEPENDEXTRA} \
156         elif [ X"${PSRCS}" != X ] ; then \
157                 echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \
158                 ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \
159                 ${DEPENDEXTRA} \
160         fi
162 FORCE:
165 ### Libraries
168 AR =            @AR@
169 ARFLAGS =       @ARFLAGS@
170 RANLIB =        @RANLIB@
173 ### Installation
176 INSTALL =               @INSTALL@
177 INSTALL_PROGRAM =       @INSTALL_PROGRAM@
178 INSTALL_DATA =          @INSTALL_DATA@