0
|
1 |
#
|
|
2 |
# CDDL HEADER START
|
|
3 |
#
|
|
4 |
# The contents of this file are subject to the terms of the
|
|
5 |
# Common Development and Distribution License (the "License").
|
|
6 |
# You may not use this file except in compliance with the License.
|
|
7 |
#
|
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
9 |
# or http://www.opensolaris.org/os/licensing.
|
|
10 |
# See the License for the specific language governing permissions
|
|
11 |
# and limitations under the License.
|
|
12 |
#
|
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
15 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
18 |
#
|
|
19 |
# CDDL HEADER END
|
|
20 |
#
|
16
|
21 |
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
0
|
22 |
#
|
16
|
23 |
# ident "@(#)Makefile.sfw 1.4 10/06/02 SMI"
|
0
|
24 |
#
|
|
25 |
|
|
26 |
include ../Makefile.cmd
|
|
27 |
|
|
28 |
# Library subversion number
|
245
|
29 |
LVER=2.10.1
|
0
|
30 |
# release version number
|
245
|
31 |
VER=openldap-2.4.38
|
0
|
32 |
VER64=${VER}-64
|
|
33 |
VERP=/usr/openldap/2.4
|
|
34 |
BDB=bdb-4.5.20.b
|
|
35 |
BDBDIST=${BDB}/source/4.5.20.b/dist
|
|
36 |
BDBBLD=${BDB}/source/4.5.20.b/build_unix
|
|
37 |
BDBLP=${SRC}/cmd/openldap/${BDB}/source/4.5.20.b/build_unix
|
|
38 |
BDB64=${BDB}-64
|
|
39 |
BDB64DIST=${BDB64}/source/4.5.20.b/dist
|
|
40 |
BDB64BLD=${BDB64}/source/4.5.20.b/build_unix
|
|
41 |
BDB64LP=${SRC}/cmd/openldap/${BDB64}/source/4.5.20.b/build_unix
|
|
42 |
VERI=${SRC}/cmd/openldap/${VER}/include
|
|
43 |
SDFVER=sdf-2.001
|
|
44 |
SDF=${SDFVER}/blib/script/sdf
|
|
45 |
SDFBLIB=../../../../${SDFVER}/blib
|
|
46 |
|
16
|
47 |
CFLAGS += -mt -xstrconst -ztext -zdefs -Bdirect -W2,-Rcond_elim
|
|
48 |
CFLAGS64 += -mt -xstrconst -ztext -zdefs -Bdirect -W2,-Rcond_elim
|
0
|
49 |
LDFLAGS = -L${ROOT}/lib -L${ROOT}/usr/lib -lumem -L${BDBLP} \
|
|
50 |
-L${ROOT}/usr/sfw/lib -L/usr/sfw/lib -R/usr/sfw/lib
|
|
51 |
LDFLAGS64 = -L${ROOT}/lib/${MACH64} -L${ROOT}/usr/lib/${MACH64} \
|
|
52 |
-lumem -L${BDB64LP} -L${ROOT}/usr/sfw/lib/${MACH64} \
|
|
53 |
-L/usr/sfw/lib/${MACH64} -R/usr/sfw/lib/${MACH64}
|
|
54 |
BLDFLAGS = -L${ROOT}/usr/lib -lumem -L${ROOT}/usr/sfw/lib
|
|
55 |
BLDFLAGS64 = -L${ROOT}/usr/lib/${MACH64} -lumem -L${ROOT}/usr/sfw/lib/${MACH64}
|
|
56 |
|
|
57 |
# DEFAULTS
|
|
58 |
# Where --prefix=PREFIX and --exec-prefix=EPREFIX
|
|
59 |
# --bindir=DIR user executables [EPREFIX/bin]
|
|
60 |
# --sbindir=DIR system admin executables [EPREFIX/sbin]
|
|
61 |
# --libexecdir=DIR program executables [EPREFIX/libexec]
|
|
62 |
# --datadir=DIR read-only architecture-independent data [PREFIX/share]
|
|
63 |
# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
|
64 |
# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
|
65 |
# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
|
66 |
# --libdir=DIR object code libraries [EPREFIX/lib]
|
|
67 |
# --includedir=DIR C header files [PREFIX/include]
|
|
68 |
# --oldincludedir=DIR C header files for non-gcc [/usr/include]
|
|
69 |
# --infodir=DIR info documentation [PREFIX/info]
|
|
70 |
# --mandir=DIR man documentation [PREFIX/man]
|
|
71 |
CONFDIRS= --prefix= --exec-prefix=/usr --libexecdir=/usr/lib \
|
|
72 |
--sysconfdir=/etc --localstatedir=/var/openldap \
|
|
73 |
--includedir=/usr/include/openldap --mandir=/usr/share/man
|
|
74 |
|
|
75 |
all: all32 all64
|
|
76 |
|
|
77 |
all32: $(BDBBLD)/libdb.a $(SDF) .WAIT $(VER)/config.status
|
|
78 |
(cd $(VER); env \
|
|
79 |
PATH=$(SFW_PATH) \
|
|
80 |
MAKE=$(GMAKE) \
|
|
81 |
$(GMAKE))
|
|
82 |
(cd $(VER)/doc/guide/admin; \
|
|
83 |
perl -I$(SDFBLIB)/lib $(SDFBLIB)/script/sdf -2html guide.sdf; \
|
|
84 |
perl -I$(SDFBLIB)/lib $(SDFBLIB)/script/sdf -2html index.sdf)
|
|
85 |
@find . -name core -exec rm -f {} \;
|
|
86 |
|
|
87 |
all64: $(BDB64BLD)/libdb.a .WAIT $(VER64)/config.status
|
|
88 |
(cd $(VER64); env \
|
|
89 |
PATH=$(SFW_PATH) \
|
|
90 |
MAKE=$(GMAKE) \
|
|
91 |
$(GMAKE))
|
|
92 |
@find . -name core -exec rm -f {} \;
|
|
93 |
|
|
94 |
test: all .WAIT test32 .WAIT test64
|
|
95 |
|
|
96 |
test32: all32
|
|
97 |
(cd $(VER); env \
|
16
|
98 |
LD_LIBRARY_PATH=${ROOT}/usr/lib \
|
0
|
99 |
PATH=$(SFW_PATH) \
|
|
100 |
MAKE=$(GMAKE) \
|
|
101 |
$(GMAKE) test)
|
|
102 |
|
|
103 |
test64: all64
|
|
104 |
(cd $(VER64); env \
|
16
|
105 |
LD_LIBRARY_PATH=${ROOT}/usr/lib/${MACH64} \
|
0
|
106 |
PATH=$(SFW_PATH) \
|
|
107 |
MAKE=$(GMAKE) \
|
|
108 |
$(GMAKE) test)
|
|
109 |
|
|
110 |
# Build libdb first before configuring openldap
|
|
111 |
|
|
112 |
$(BDBBLD)/libdb.a: $(BDBBLD)/config.status
|
|
113 |
(cd $(BDBBLD); env \
|
|
114 |
PATH=$(SFW_PATH) \
|
|
115 |
MAKE=$(GMAKE) \
|
|
116 |
$(GMAKE))
|
|
117 |
|
|
118 |
$(BDB64BLD)/libdb.a: $(BDB64BLD)/config.status
|
|
119 |
(cd $(BDB64BLD); env \
|
|
120 |
PATH=$(SFW_PATH) \
|
|
121 |
MAKE=$(GMAKE) \
|
|
122 |
$(GMAKE))
|
|
123 |
|
|
124 |
# Install binaries included in package into ROOT
|
|
125 |
install: all
|
|
126 |
$(SH) ./install-openldap $(VER) $(LVER)
|
|
127 |
$(SH) ./install-openldap64 $(VER64) $(LVER) $(MACH64)
|
|
128 |
|
|
129 |
# Configure BDB for compilation.
|
|
130 |
$(BDBBLD)/config.status: $(BDBDIST)/configure
|
|
131 |
(cd $(BDBBLD); env \
|
|
132 |
LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
|
|
133 |
CC=$(CC) CXX=$(CCC) \
|
|
134 |
CFLAGS="$(CFLAGS)" \
|
|
135 |
CXXFLAGS="$(CCFLAGS)" \
|
|
136 |
LDFLAGS="$(BLDFLAGS)" \
|
|
137 |
MAKE=$(GMAKE) \
|
|
138 |
LD_LIBRARY_PATH=/usr/sfw/lib \
|
|
139 |
../dist/configure \
|
|
140 |
--disable-cryptography \
|
|
141 |
--disable-hash \
|
|
142 |
--disable-queue \
|
|
143 |
--disable-replication \
|
|
144 |
--disable-statistics \
|
|
145 |
--disable-compat185 \
|
|
146 |
--disable-cxx \
|
|
147 |
--disable-debug \
|
|
148 |
--disable-debug_rop \
|
|
149 |
--disable-debug_wop \
|
|
150 |
--disable-diagnostic \
|
|
151 |
--disable-dump185 \
|
|
152 |
--disable-java \
|
|
153 |
--disable-mingw \
|
|
154 |
--disable-rpc \
|
|
155 |
--enable-smallbuild \
|
|
156 |
--disable-tcl \
|
|
157 |
--disable-test \
|
|
158 |
--disable-shared \
|
|
159 |
--enable-static)
|
|
160 |
|
|
161 |
$(BDB64BLD)/config.status: $(BDB64DIST)/configure
|
|
162 |
(cd $(BDB64BLD); env \
|
|
163 |
LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
|
|
164 |
CC=$(CC) CXX=$(CCC64) \
|
|
165 |
CFLAGS="$(CFLAGS64)" \
|
|
166 |
CXXFLAGS="$(CCFLAGS64)" \
|
|
167 |
LDFLAGS="$(BLDFLAGS64)" \
|
|
168 |
MAKE=$(GMAKE) \
|
|
169 |
LD_LIBRARY_PATH=/usr/sfw/lib/${MACH64} \
|
|
170 |
../dist/configure \
|
|
171 |
--disable-cryptography \
|
|
172 |
--disable-hash \
|
|
173 |
--disable-queue \
|
|
174 |
--disable-replication \
|
|
175 |
--disable-statistics \
|
|
176 |
--disable-compat185 \
|
|
177 |
--disable-cxx \
|
|
178 |
--disable-debug \
|
|
179 |
--disable-debug_rop \
|
|
180 |
--disable-debug_wop \
|
|
181 |
--disable-diagnostic \
|
|
182 |
--disable-dump185 \
|
|
183 |
--disable-java \
|
|
184 |
--disable-mingw \
|
|
185 |
--disable-rpc \
|
|
186 |
--enable-smallbuild \
|
|
187 |
--disable-tcl \
|
|
188 |
--disable-test \
|
|
189 |
--disable-shared \
|
|
190 |
--enable-static)
|
|
191 |
|
|
192 |
# Configure OpenLDAP ready for compilation.
|
|
193 |
$(VER)/config.status: $(VER)/configure
|
|
194 |
(cd $(VER); env \
|
|
195 |
CC=$(CC) CXX=$(CCC) \
|
|
196 |
"CPPFLAGS=$(CPPFLAGS) -I/usr/sfw/include -I$(BDBLP) -I$(VERI)" \
|
|
197 |
"CFLAGS=$(CFLAGS)" \
|
|
198 |
"CXXFLAGS=$(CCFLAGS)" \
|
|
199 |
"LDFLAGS=$(LDFLAGS)" \
|
|
200 |
PATH=$(SFW_PATH) \
|
|
201 |
MAKE=$(GMAKE) \
|
|
202 |
LD_LIBRARY_PATH=/usr/sfw/lib \
|
|
203 |
./configure --with-libtool \
|
|
204 |
$(CONFDIRS) \
|
|
205 |
--with-openssl \
|
|
206 |
--disable-static \
|
|
207 |
--enable-overlays \
|
|
208 |
--disable-dynamic \
|
|
209 |
--enable-crypt \
|
|
210 |
--enable-shared \
|
|
211 |
--enable-bdb \
|
|
212 |
--enable-hdb \
|
|
213 |
--enable-null \
|
|
214 |
--enable-passwd \
|
|
215 |
--enable-shell \
|
|
216 |
--with-cyrus-sasl \
|
|
217 |
--with-threads \
|
|
218 |
--without-gnutls \
|
|
219 |
--with-tls=openssl \
|
|
220 |
--disable-openssl-version-check)
|
|
221 |
|
|
222 |
$(VER64)/config.status: $(VER64)/configure
|
|
223 |
(cd $(VER64); env \
|
|
224 |
CC=$(CC) CXX=$(CCC64) \
|
|
225 |
"CPPFLAGS=$(CPPFLAGS) -I/usr/sfw/include -I$(BDB64LP) -I$(VERI)" \
|
|
226 |
"CFLAGS=$(CFLAGS64)" \
|
|
227 |
"CXXFLAGS=$(CCFLAGS64)" \
|
|
228 |
"LDFLAGS=$(LDFLAGS64)" \
|
|
229 |
PATH=$(SFW_PATH) \
|
|
230 |
MAKE=$(GMAKE) \
|
|
231 |
LD_LIBRARY_PATH=/usr/sfw/lib/${MACH64} \
|
|
232 |
./configure --with-libtool \
|
|
233 |
$(CONFDIRS) \
|
|
234 |
--libdir=/usr/lib/${MACH64} \
|
|
235 |
--with-openssl \
|
|
236 |
--disable-static \
|
|
237 |
--enable-overlays \
|
|
238 |
--disable-dynamic \
|
|
239 |
--enable-crypt \
|
|
240 |
--enable-shared \
|
|
241 |
--enable-bdb \
|
|
242 |
--enable-hdb \
|
|
243 |
--enable-null \
|
|
244 |
--enable-passwd \
|
|
245 |
--enable-shell \
|
|
246 |
--with-cyrus-sasl \
|
|
247 |
--with-threads \
|
|
248 |
--without-gnutls \
|
|
249 |
--with-tls=openssl \
|
|
250 |
--disable-openssl-version-check)
|
|
251 |
|
|
252 |
|
|
253 |
# configure: unpack and patch (if required) ISC version of BIND.
|
|
254 |
#
|
|
255 |
# Should a Sun Specific patch need to be applied then do so here.
|
|
256 |
# This insures that the shipped source includes any new files
|
|
257 |
# and directories. Ideally no patches should be required, where they
|
|
258 |
# are needed for a release they should be incorporated or obsoleted in
|
|
259 |
# the next ISC release.
|
|
260 |
#
|
|
261 |
$(BDBDIST)/configure: $(BDB).tgz $(FRC)
|
|
262 |
gzip -dc $(BDB).tgz | tar xopf -
|
|
263 |
$(TOUCH) $(BDBDIST)/configure
|
|
264 |
|
|
265 |
$(BDB64DIST)/configure: $(BDB).tgz $(FRC)
|
|
266 |
mkdir -p tmp
|
|
267 |
gzip -dc $(BDB).tgz | (cd tmp; tar xopf -)
|
|
268 |
rm -rf $(BDB64)
|
|
269 |
mv tmp/$(BDB) $(BDB64); rmdir tmp
|
|
270 |
$(TOUCH) $(BDB64DIST)/configure
|
|
271 |
|
|
272 |
$(VER)/configure: $(VER).tgz $(FRC)
|
|
273 |
gzip -dc $(VER).tgz | tar xopf -
|
|
274 |
$(TOUCH) $(VER)/configure
|
|
275 |
|
|
276 |
$(VER64)/configure: $(VER).tgz $(FRC)
|
|
277 |
mkdir -p tmp
|
|
278 |
gzip -dc $(VER).tgz | (cd tmp; tar xopf -)
|
|
279 |
rm -rf $(VER64)
|
|
280 |
mv tmp/$(VER) $(VER64); rmdir tmp
|
|
281 |
$(TOUCH) $(VER64)/configure
|
|
282 |
|
|
283 |
# Build SDF so that OpenLDAP admin guide can be generated
|
|
284 |
# SDF is used for interal build purposes only.
|
|
285 |
# The code base was frozen at v2.001 in 1998.
|
|
286 |
|
|
287 |
$(SDF): $(SDFVER).tar.gz $(FRC)
|
|
288 |
gzip -dc $(SDFVER).tar.gz | tar xopf -
|
|
289 |
(cd $(SDFVER); perl Makefile.PL; \
|
|
290 |
$(MAKE))
|
|
291 |
|
|
292 |
clean:
|
|
293 |
-/usr/bin/rm -rf $(VER) $(VER64) $(BDB) $(BDB64) $(SDFVER)
|
|
294 |
|
|
295 |
include ../Makefile.targ
|
|
296 |
|
|
297 |
FRC:
|