author | Cyril Plisko <cyril.plisko@grigale.com> |
Tue, 16 Nov 2010 22:41:08 -0800 | |
changeset 54 | c8df60226931 |
parent 46 | 9c200dad5ecc |
child 76 | 276c1f9233b3 |
permissions | -rw-r--r-- |
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 |
# |
|
21 |
# |
|
13 | 22 |
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 23 |
# |
13 | 24 |
|
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
25 |
#ident "@(#)Makefile.sfw 1.15 10/10/18 SMI" |
0 | 26 |
# |
27 |
# This makefile builds both 32 and 64 bit versions of the library. |
|
28 |
# Builds occur in separate directories. |
|
29 |
# |
|
30 |
||
9 | 31 |
RELNUM=$(COMPONENT_VERSION:sh) |
32 |
VER=curl-$(RELNUM) |
|
0 | 33 |
VER64=$(VER)-64 |
34 |
||
35 |
LARGEFILES= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
|
36 |
PREFIX = /usr |
|
37 |
||
38 |
# We need to do this because libtool adds wrong paths to RPATH. |
|
39 |
LDFLAGS += -L$(PREFIX)/lib -R$(PREFIX)/lib |
|
40 |
LDFLAGS += -L$(ROOT)/usr/lib |
|
41 |
LDFLAGS += -lgss |
|
42 |
||
43 |
EXTRA_LDFLAGS64 += -L$(PREFIX)/lib/$(MACH64) |
|
44 |
EXTRA_LDFLAGS64 += -L$(ROOT)/lib/$(MACH64) |
|
45 |
EXTRA_LDFLAGS64 += -R$(PREFIX)/lib/$(MACH64) |
|
46 |
EXTRA_LDFLAGS64 += -lgss |
|
47 |
||
48 |
LD_OPTIONS = -M $(SRC)/cmd/mapfile_noexstk -z ignore |
|
49 |
LD_OPTIONS += -lsocket -lresolv -lnsl -lgen |
|
50 |
||
51 |
include ../Makefile.lib |
|
52 |
||
53 |
CONFIGURE_OPTIONS = --localstatedir=/var --enable-shared |
|
54 |
CONFIGURE_OPTIONS += --disable-static --enable-http --enable-ftp |
|
55 |
CONFIGURE_OPTIONS += --enable-file --enable-dict |
|
56 |
CONFIGURE_OPTIONS += --enable-telnet --enable-tftp |
|
57 |
CONFIGURE_OPTIONS += --enable-manual --disable-libgcc |
|
9 | 58 |
CONFIGURE_OPTIONS += --enable-rtsp --enable-proxy |
59 |
CONFIGURE_OPTIONS += --enable-telnet --enable-tftp --enable-pop3 |
|
60 |
CONFIGURE_OPTIONS += --enable-imap --enable-smtp |
|
0 | 61 |
CONFIGURE_OPTIONS += --enable-ipv6 --enable-nonblocking |
62 |
CONFIGURE_OPTIONS += --enable-thread --enable-verbose |
|
63 |
CONFIGURE_OPTIONS += --disable-sspi --enable-crypto-auth |
|
64 |
CONFIGURE_OPTIONS += --enable-cookies --disable-hidden-symbols |
|
65 |
CONFIGURE_OPTIONS += --disable-soname-bump |
|
66 |
CONFIGURE_OPTIONS += --enable-ldap --with-random=/dev/urandom |
|
67 |
CONFIGURE_OPTIONS += --with-ssl --with-ldap-lib=ldap |
|
68 |
CONFIGURE_OPTIONS += --with-lber-lib=sldap |
|
69 |
CONFIGURE_OPTIONS += --with-gssapi-includes=/usr/include/gssapi |
|
70 |
CONFIGURE_OPTIONS += --with-gssapi-libs=/usr/lib |
|
71 |
CONFIGURE_OPTIONS += --with-gssapi=/usr --with-ca-bundle=/etc/curl/curlCA |
|
72 |
CONFIGURE_OPTIONS += --with-zlib=/usr --with-libidn=/usr |
|
73 |
CONFIGURE_OPTIONS += --with-pic |
|
13 | 74 |
CONFIGURE_OPTIONS += "curl_disallow_getifaddrs=yes" |
0 | 75 |
|
76 |
all: real-all |
|
77 |
||
78 |
all32: $(VER)/config.status |
|
79 |
(cd $(VER); env - "CFLAGS=$(CFLAGS) $(XREGSFLAG) $(LARGEFILES)" \ |
|
80 |
"LD_OPTIONS=$(LD_OPTIONS)" \ |
|
81 |
"LDFLAGS=$(LDFLAGS)" \ |
|
82 |
PATH=$(SFW_PATH) \ |
|
15
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
83 |
"SHELL=$(SHELL)" \ |
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
84 |
"CONFIG_SHELL=$(SHELL)" \ |
0 | 85 |
"MAKE=$(CCSMAKE)" $(CCSMAKE) -e) |
86 |
||
87 |
# if we do not add $($(MACH64)_XARCH), CXX will assume that it's linking |
|
88 |
# 32-bit, and linking will fail. |
|
89 |
all64: $(VER64)/config.status |
|
90 |
(cd $(VER64); env - "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) $(LARGEFILES)" \ |
|
91 |
"LD_OPTIONS=$(LD_OPTIONS)" \ |
|
92 |
"LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \ |
|
93 |
PATH=$(SFW_PATH) \ |
|
15
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
94 |
"SHELL=$(SHELL)" \ |
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
95 |
"CONFIG_SHELL=$(SHELL)" \ |
0 | 96 |
"MAKE=$(CCSMAKE)" $(CCSMAKE) -e) |
97 |
||
98 |
COMPAT_VERSION= 5 |
|
99 |
||
100 |
# We need to add this because idn's includes and libraries should be |
|
101 |
# picked up from the shadow build area (for now) |
|
102 |
CPPFLAGS += -I$(ROOT)/usr/include/idn |
|
103 |
||
104 |
# We want a thread-safe curl |
|
105 |
CFLAGS += -mt -D_REENTRANT -D__EXTENSIONS__ |
|
106 |
CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
|
107 |
CFLAGS += -D_XPG6 -D_XOPEN_SOURCE=600 -D_POSIX_PTHREAD_SEMANTICS |
|
108 |
CFLAGS += -D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX |
|
109 |
CPPFLAGS += -D_THREAD_SAFE -D_REENTRANT -D__EXTENSIONS__ |
|
110 |
CPPFLAGS += -D_LARGEFILE_SOURCE |
|
111 |
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_XPG6 -D_XOPEN_SOURCE=600 |
|
112 |
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_C_SOURCE=200112L |
|
113 |
CPPFLAGS += -D__XOPEN_OR_POSIX |
|
114 |
||
115 |
# lint stuff |
|
116 |
LIBRARY=libcurl.a |
|
117 |
LINTOUT= lint.out |
|
118 |
LINTFLAGS= -I./include -I. -Xc99=%all $(CCBITS32) $(LARGEFILES) |
|
119 |
LINTFLAGS64= -I./include -I. -Xc99=%all $(CCBITS64) $(LARGEFILES) |
|
120 |
||
121 |
install: all |
|
9 | 122 |
VERS=$(VER) $(SHELL) ./install-sfw |
123 |
MACH64=$(MACH64) VERS=$(VER64) $(SHELL) ./install-sfw-64 |
|
0 | 124 |
|
125 |
real-all: all32 all64 lint32 lint64 |
|
126 |
||
127 |
test: test32 test64 |
|
128 |
||
129 |
# We need to use a different method for correcting the pkgconfig *.pc |
|
130 |
# files generated by libtool for curl. The contents of these files is, |
|
131 |
# by default, wrong. It includes the entire LDFLAGS, and it does not |
|
132 |
# include the correct -L directive for 64-bit builds. This is done |
|
133 |
# by maintaining a correct set of libcurl.pc and libcurl-64.pc files, |
|
134 |
# and determining at make time the appropriate 64-bit ISA on which |
|
135 |
# the build is run. |
|
136 |
||
137 |
$(VER)/config.status: $(VER)/configure |
|
138 |
( cd $(VER); \ |
|
139 |
env - "CC=$(CC)" \ |
|
140 |
"CPPFLAGS=$(CPPFLAGS)" \ |
|
141 |
"CFLAGS=$(CPPFLAGS) $(CFLAGS)" \ |
|
142 |
"CPP=$(CC) $(CFLAGS) $(CPPFLAGS) -E" \ |
|
143 |
"CXX=$(CCC)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS)" \ |
|
144 |
"CXXCPP=$(CCC) $(CPPFLAGS) $(CCFLAGS) -E" \ |
|
145 |
"LDFLAGS=$(LDFLAGS)" \ |
|
146 |
"LD_OPTIONS=$(LD_OPTIONS)" \ |
|
147 |
"CXXLDFLAGS=$(LDFLAGS)" \ |
|
148 |
"CXXLD=$(CCC) $(LDFLAGS)" \ |
|
149 |
PATH=$(SFW_PATH) \ |
|
15
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
150 |
"SHELL=$(SHELL)" \ |
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
151 |
"CONFIG_SHELL=$(SHELL)" \ |
0 | 152 |
"INSTALL=$(GINSTALL)" \ |
153 |
"MAKE=$(CCSMAKE)" \ |
|
154 |
./configure --prefix=$(PREFIX) \ |
|
155 |
--bindir=$(PREFIX)/bin \ |
|
156 |
--sbindir=$(PREFIX)/sbin \ |
|
157 |
--libdir=$(PREFIX)/lib \ |
|
158 |
--libexecdir=$(PREFIX)/libexec \ |
|
159 |
$(CONFIGURE_OPTIONS) ; \ |
|
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
160 |
rm -f curl-config ; \ |
0 | 161 |
cp -p ../Solaris/curl-config .; \ |
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
162 |
chmod 0755 curl-config ; \ |
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
163 |
touch -acm curl-config ; \ |
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
164 |
rm -f libcurl.pc ; \ |
0 | 165 |
cp -p ../Solaris/libcurl.pc .; \ |
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
166 |
chmod 0644 libcurl.pc ; \ |
0 | 167 |
touch -acm libcurl.pc) |
168 |
||
169 |
$(VER64)/config.status: $(VER64)/configure |
|
170 |
( cd $(VER64); \ |
|
171 |
env - "CC=$(CC64)" \ |
|
172 |
"CPPFLAGS=$(CPPFLAGS)" \ |
|
173 |
"CFLAGS=$(CPPFLAGS) $(CFLAGS64)" \ |
|
174 |
"CPP=$(CC64) $(CFLAGS64) $(CPPFLAGS) -E" \ |
|
175 |
"CXX=$(CCC64)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS64)" \ |
|
176 |
"CXXCPP=$(CCC64) $(CPPFLAGS) $(CCFLAGS64) -E" \ |
|
177 |
"LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \ |
|
178 |
"LD_OPTIONS=$(LD_OPTIONS)" \ |
|
179 |
"CXXLDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \ |
|
180 |
"CXXLD=$(CCC64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \ |
|
181 |
"CXXLINKLIB=$(CCC64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \ |
|
182 |
"MACH64=$(MACH64)" \ |
|
183 |
PATH=$(SFW_PATH) \ |
|
15
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
184 |
"SHELL=$(SHELL)" \ |
24b3ef38fbcd
Import sfw build 141
Cyril Plisko <cyril.plisko@grigale.com>
parents:
13
diff
changeset
|
185 |
"CONFIG_SHELL=$(SHELL)" \ |
0 | 186 |
"INSTALL=$(GINSTALL)" \ |
187 |
"MAKE=$(CCSMAKE)" \ |
|
188 |
./configure --prefix=$(PREFIX) \ |
|
189 |
--bindir=$(PREFIX)/bin/$(MACH64) \ |
|
190 |
--sbindir=$(PREFIX)/sbin/$(MACH64) \ |
|
191 |
--libdir=$(PREFIX)/lib/$(MACH64) \ |
|
192 |
--libexecdir=$(PREFIX)/libexec/$(MACH64) \ |
|
193 |
$(CONFIGURE_OPTIONS) ; \ |
|
194 |
rm -f curl-config; \ |
|
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
195 |
cp -f ../Solaris/curl-config-64 curl-config; \ |
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
196 |
chmod 0755 curl-config; \ |
9 | 197 |
/usr/gnu/bin/sed -e "s#MACH64#$(MACH64)#g" curl-config > curl-config.sed ; \ |
198 |
cp -fp curl-config.sed curl-config ; \ |
|
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
199 |
chmod 0755 curl-config; \ |
9 | 200 |
touch -acm curl-config ; \ |
201 |
rm -f libcurl.pc ; \ |
|
54
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
202 |
cp -f ../Solaris/libcurl.pc .; \ |
c8df60226931
Import sfw build 153
Cyril Plisko <cyril.plisko@grigale.com>
parents:
46
diff
changeset
|
203 |
chmod 0644 libcurl.pc ; \ |
0 | 204 |
/bin/ksh ../postprocess-pkgconfig-64 libcurl.pc ) |
205 |
||
206 |
$(VER)/configure: $(VER).tar.gz |
|
207 |
mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -) |
|
208 |
mv tmp/$(VER) $(VER); rmdir tmp |
|
209 |
( cd $(VER) ; \ |
|
9 | 210 |
gpatch -p0 <../Solaris/diffs/configure.0.diff ; \ |
211 |
gpatch -p0 <../Solaris/diffs/Makefile.in.1.diff ; \ |
|
212 |
gpatch -p0 <../Solaris/diffs/curlbuild.h.2.diff ; \ |
|
213 |
gpatch -p0 <../Solaris/diffs/Makefile.in.3.diff ; \ |
|
0 | 214 |
touch -acm configure ; \ |
215 |
touch -acm include/curl/curlbuild.h ; \ |
|
216 |
chmod 0755 configure ) |
|
217 |
||
218 |
$(VER64)/configure: $(VER).tar.gz |
|
219 |
mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -) |
|
220 |
mv tmp/$(VER) $(VER64); rmdir tmp |
|
221 |
( cd $(VER64) ; \ |
|
9 | 222 |
gpatch -p0 <../Solaris/diffs/configure.0.diff ; \ |
223 |
gpatch -p0 <../Solaris/diffs/Makefile.in.1.diff ; \ |
|
224 |
gpatch -p0 <../Solaris/diffs/curlbuild.h.2.diff ; \ |
|
225 |
gpatch -p0 <../Solaris/diffs/Makefile.in.3.diff ; \ |
|
0 | 226 |
touch -acm configure ; \ |
227 |
touch -acm include/curl/curlbuild.h ; \ |
|
228 |
chmod 0755 configure ) |
|
229 |
clean: |
|
230 |
-rm -rf $(VER) |
|
231 |
-rm -rf $(VER64) |
|
232 |
||
233 |
lint32: $(VER)/config.status |
|
234 |
(cd $(VER); \ |
|
235 |
$(LINT.c) -o $(LIBNAME) ../llib-lcurl > $(LINTOUT) 2>&1) |
|
236 |
||
237 |
lint64: $(VER64)/config.status |
|
238 |
(cd $(VER64); \ |
|
239 |
$(LINT64.c) -o $(LIBNAME) ../llib-lcurl > $(LINTOUT) 2>&1) |
|
240 |
||
241 |
test32: $(VER)/config.status |
|
242 |
( cd $(VER) ; \ |
|
243 |
$(GMAKE) check > $(SRC)/lib/curl/test-results-$(MACH).out 2>&1 ) |
|
244 |
||
245 |
test64: $(VER64)/config.status |
|
246 |
( cd $(VER64) ; \ |
|
247 |
$(GMAKE) check > $(SRC)/lib/curl/test-results-$(MACH64).out 2>&1 ) |
|
248 |
||
249 |
install_h: |
|
250 |
||
251 |
include ../Makefile.targ |