added missing upstream files
[tridge/bind9.git] / lib / isc / unix / Makefile
1 # Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 1998-2001  Internet Software Consortium.
3 #
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.
7 #
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.
15
16 # $Id: Makefile.in,v 1.41 2007/06/19 23:47:18 tbox Exp $
17
18 srcdir =        .
19
20 top_srcdir =    ../../..
21
22 CINCLUDES =     -I${srcdir}/include \
23                 -I${srcdir}/../pthreads/include \
24                 -I../include \
25                 -I${srcdir}/../include \
26                 -I${srcdir}/..
27
28 CDEFINES =
29 CWARNINGS =
30
31 # Alphabetically
32 OBJS =           \
33                 app.lo dir.lo entropy.lo errno2result.lo file.lo \
34                 fsaccess.lo interfaceiter.lo keyboard.lo net.lo \
35                 os.lo resource.lo socket.lo stdio.lo stdtime.lo \
36                 strerror.lo syslog.lo time.lo
37
38 # Alphabetically
39 SRCS =           \
40                 app.c dir.c entropy.c errno2result.c file.c \
41                 fsaccess.c interfaceiter.c keyboard.c net.c \
42                 os.c resource.c socket.c stdio.c stdtime.c \
43                 strerror.c syslog.c time.c
44
45 SUBDIRS =       include
46 TARGETS =       ${OBJS}
47
48 # Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
49 # Copyright (C) 1998-2003  Internet Software Consortium.
50 #
51 # Permission to use, copy, modify, and/or distribute this software for any
52 # purpose with or without fee is hereby granted, provided that the above
53 # copyright notice and this permission notice appear in all copies.
54 #
55 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
56 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
57 # AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
58 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
59 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
60 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
61 # PERFORMANCE OF THIS SOFTWARE.
62
63 # $Id: rules.in,v 1.64.130.2 2009/01/10 23:46:57 tbox Exp $
64
65 ###
66 ### Common Makefile rules for BIND 9.
67 ###
68
69 ###
70 ### Paths
71 ###
72 ### Note: paths that vary by Makefile MUST NOT be listed
73 ### here, or they won't get expanded correctly.
74
75 prefix =        /home/tridge/project/bind9/prefix
76 exec_prefix =   ${prefix}
77 bindir =        ${exec_prefix}/bin
78 sbindir =       ${exec_prefix}/sbin
79 includedir =    ${prefix}/include
80 libdir =        ${exec_prefix}/lib
81 sysconfdir =    /etc/bind
82 localstatedir = /var
83 mandir =        $/share/man
84 datarootdir =   ${prefix}/share
85
86 DESTDIR =
87
88
89
90 top_builddir =  /home/tridge/project/bind9
91
92 ###
93 ### All
94 ###
95 ### Makefile may define:
96 ###     TARGETS
97
98 all: subdirs ${TARGETS}
99
100 ###
101 ### Subdirectories
102 ###
103 ### Makefile may define:
104 ###     SUBDIRS
105
106 ALL_SUBDIRS = ${SUBDIRS} nulldir
107
108 #
109 # We use a single-colon rule so that additional dependencies of
110 # subdirectories can be specified after the inclusion of this file.
111 # The "depend" target is treated the same way.
112 #
113 subdirs:
114         @for i in ${ALL_SUBDIRS}; do \
115                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
116                         echo "making all in `pwd`/$$i"; \
117                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" all) || exit 1; \
118                 fi; \
119         done
120
121 install:: all
122
123 install clean distclean maintainer-clean doc docclean man manclean::
124         @for i in ${ALL_SUBDIRS}; do \
125                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
126                         echo "making $@ in `pwd`/$$i"; \
127                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
128                 fi; \
129         done
130
131 ###
132 ### C Programs
133 ###
134 ### Makefile must define
135 ###     CC
136 ### Makefile may define
137 ###     CFLAGS
138 ###     LDFLAGS
139 ###     CINCLUDES
140 ###     CDEFINES
141 ###     CWARNINGS
142 ### User may define externally
143 ###     EXT_CFLAGS
144
145 CC =            ccache gcc
146 CFLAGS =        -fno-strict-aliasing -DDIG_SIGCHASE -g -I/usr/include/libxml2
147 LDFLAGS =       
148 STD_CINCLUDES = 
149 STD_CDEFINES =   -D_GNU_SOURCE
150 STD_CWARNINGS =  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing
151
152 BUILD_CC = ccache gcc
153 BUILD_CFLAGS = -fno-strict-aliasing -DDIG_SIGCHASE -g -I/usr/include/libxml2
154 BUILD_CPPFLAGS =  -D_GNU_SOURCE 
155 BUILD_LDFLAGS = 
156 BUILD_LIBS = -lcap -lpthread  -lxml2
157
158 .SUFFIXES:
159 .SUFFIXES: .c .lo
160
161 ALWAYS_INCLUDES = -I${top_builddir}
162 ALWAYS_DEFINES = -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
163 ALWAYS_WARNINGS =
164
165 ALL_CPPFLAGS = \
166         ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \
167         ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES}
168
169 ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \
170         ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS}
171
172 .c.lo:
173         ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
174
175 SHELL = /bin/bash
176 LIBTOOL = $(SHELL) $(top_builddir)/libtool
177 LIBTOOL_MODE_COMPILE = ${LIBTOOL} --mode=compile
178 LIBTOOL_MODE_INSTALL = ${LIBTOOL} --mode=install
179 LIBTOOL_MODE_LINK = ${LIBTOOL} --mode=link
180 PURIFY = 
181
182 MKDEP = ${SHELL} ${top_builddir}/make/mkdep
183
184 cleandir: distclean
185 superclean: maintainer-clean
186
187 clean distclean maintainer-clean::
188         rm -f *.lo *.o *.lo *.la core *.core .depend
189         rm -rf .libs
190
191 distclean maintainer-clean::
192         rm -f Makefile
193
194 depend:
195         @for i in ${ALL_SUBDIRS}; do \
196                 if [ "$$i" != "nulldir" -a -d $$i ]; then \
197                         echo "making depend in `pwd`/$$i"; \
198                         (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \
199                 fi; \
200         done
201         @if [ X"${VPATH}" != X ] ; then \
202                 if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
203                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
204                         ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
205                         echo ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
206                         ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
207                         ${DEPENDEXTRA} \
208                 elif [ X"${SRCS}" != X ] ; then \
209                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
210                         ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
211                         ${DEPENDEXTRA} \
212                 elif [ X"${PSRCS}" != X ] ; then \
213                         echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
214                         ${MKDEP} -vpath ${VPATH} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
215                         ${DEPENDEXTRA} \
216                 fi \
217         else \
218                 if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \
219                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
220                         ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
221                         echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
222                         ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
223                         ${DEPENDEXTRA} \
224                 elif [ X"${SRCS}" != X ] ; then \
225                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
226                         ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \
227                         ${DEPENDEXTRA} \
228                 elif [ X"${PSRCS}" != X ] ; then \
229                         echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
230                         ${MKDEP} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \
231                         ${DEPENDEXTRA} \
232                 fi \
233         fi
234
235 FORCE:
236
237 ###
238 ### Libraries
239 ###
240
241 AR =            /usr/bin/ar
242 ARFLAGS =       cruv
243 RANLIB =        ranlib
244
245 ###
246 ### Installation
247 ###
248
249 INSTALL =               /usr/bin/install -c
250 INSTALL_PROGRAM =       ${INSTALL}
251 LINK_PROGRAM =          ln -s
252 INSTALL_SCRIPT =        ${INSTALL}
253 INSTALL_DATA =          ${INSTALL} -m 644
254
255 ###
256 ### Programs used when generating documentation.  It's ok for these
257 ### not to exist when not generating documentation.
258 ###
259
260 XSLTPROC =              /usr/bin/xsltproc --novalid --xinclude --nonet
261 PERL =                  /usr/bin/perl
262 LATEX =                 /usr/bin/latex
263 PDFLATEX =              /usr/bin/pdflatex
264 W3M =                   /usr/bin/w3m
265
266 ###
267 ### DocBook -> HTML
268 ### DocBook -> man page
269 ###
270
271 .SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8
272
273 .docbook.html:
274         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $<
275
276 .docbook.1:
277         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
278
279 .docbook.2:
280         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
281
282 .docbook.3:
283         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
284
285 .docbook.4:
286         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
287
288 .docbook.5:
289         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
290
291 .docbook.6:
292         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
293
294 .docbook.7:
295         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
296
297 .docbook.8:
298         ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
299
300 interfaceiter.lo: interfaceiter.c ifiter_ioctl.c ifiter_sysctl.c ifiter_getifaddrs.c
301