]> git.ipfire.org Git - thirdparty/dhcp.git/blob - util/Makefile.bind.in
Finished rebased
[thirdparty/dhcp.git] / util / Makefile.bind.in
1 #
2 # Copyright (C) 2009-2012, 2015 Internet Systems Consortium, Inc. ("ISC")
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 # Configure and build the bind libraries for use by DHCP
17
18 binddir=@BINDDIR@
19 bindsrcdir=@BINDSRCDIR@
20
21 bindconfig = --without-openssl --without-libxml2 \
22 --without-gssapi --disable-threads \
23 --enable-exportlib \
24 --with-export-includedir=${binddir}/include \
25 --with-export-libdir=${binddir}/lib \
26 @BINDIOMUX@ @BINDCONFIG@ --enable-full-report
27
28 @BIND_ATF_FALSE@cleandirs = ./lib ./include
29 @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf
30 cleanfiles = ./configure.log ./build.log ./install.log
31
32 @BIND_ATF_FALSE@all: bind1 bind2
33 @BIND_ATF_TRUE@all: bind1 atf bind2
34
35 bind1:
36 # Extract the source from the tarball, if it hasn't been already.
37 @if test -d ${bindsrcdir} ; then \
38 echo ${bindsrcdir} already unpacked... ; \
39 else \
40 gunzip -c bind.tar.gz | tar xf - ; \
41 fi
42
43 # Configure the export libraries
44 # Currently disable the epoll, devpoll and kqueue options as they
45 # don't interact well with the DHCP code.
46 # If the top-level Bind Makefile exists we skip the configuration step
47 # as we assume it's done and won't change. Doing a make clean will
48 # reset things if necessary.
49 @if test -f ${bindsrcdir}/Makefile ; then \
50 echo Bind export libraries already configured ; \
51 else \
52 echo Configuring BIND Export libraries for DHCP. ; \
53 rm -rf ${cleandirs} ${cleanfiles} ; \
54 (cd ${bindsrcdir} && \
55 ./configure ${bindconfig} > ${binddir}/configure.log); \
56 fi
57
58 atf:
59 # Build and copy the ATF support if not yet installed.
60 @if test -d ./atf ; then \
61 echo ATF support already installed ; \
62 else \
63 echo Building ATF support ; \
64 (cd ${bindsrcdir}/unit; \
65 $(MAKE) atf > ${binddir}/build.log ; \
66 cp -rp atf ${binddir}) ; \
67 fi
68
69 @CROSS_COMPILING_FALSE@bind2: bind2-noguest
70 @CROSS_COMPILING_TRUE@bind2: bind2-hostgen
71
72 bind2-noguest:
73 # Build and install the export libraries
74 # No need to do anything if we already have something installed.
75 @if test -d ${binddir}/lib ; then \
76 echo Bind export libraries already installed ; \
77 else \
78 echo Building BIND Export libraries - this takes some time. ;\
79 (cd ${bindsrcdir}/lib/export ; \
80 echo building in `pwd` ; \
81 $(MAKE) >> ${binddir}/build.log) ; \
82 \
83 echo Installing BIND Export libraries to ${binddir}. ; \
84 (cd ${bindsrcdir}/lib/export ; \
85 $(MAKE) install > ${binddir}/install.log) ; \
86 fi
87
88 bind2-hostgen:
89 # Build and install the export libraries
90 # No need to do anything if we already have something installed.
91 @if test -d ${binddir}/lib ; then \
92 echo Bind export libraries already installed ; \
93 else \
94 echo Building BIND Export libraries - this takes some time. ;\
95 (cd ${bindsrcdir}/lib/export/dns ; \
96 echo building gen using ${BUILD_CC} in `pwd` ; \
97 $(MAKE) CC=${BUILD_CC} CFLAGS=${BUILD_CFLAGS} CPPFLAGS=${BUILD_CPPFLAGS} LDFLAGS=${BUILD_LDFLAGS} LIBS=${BUILD_LIBS} gen >> ${binddir}/build.log) ; \
98 (cd ${bindsrcdir}/lib/export ; \
99 echo building in `pwd` ; \
100 $(MAKE) >> ${binddir}/build.log) ; \
101 \
102 echo Installing BIND Export libraries to ${binddir}. ; \
103 (cd ${bindsrcdir}/lib/export ; \
104 $(MAKE) install > ${binddir}/install.log) ; \
105 fi
106
107 clean:
108 @echo Cleaning BIND export library.
109 rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles}
110
111 # Include the following so that this Makefile is happy when the parent
112 # tries to use them.
113
114 check distdir distclean dvi install installcheck uninstall:
115