usr/src/lib/curl/Makefile.sfw
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--
Import sfw build 153 Bugs Fixed ---------- 6917181 svc-net-snmp does not work on OpenSolaris 6917302 Apache HTTPD 1.3 removal 6921017 RFE: update tcpdump to version 4.1.1 after release 6921019 RFE: update libpcap to version 1.1.1 6932608 core found from snmpd SIGSEGV at netsnmp_access_systemstats_entry_update 6934478 snmpd dumps core in var_extensible_vmstat 6956251 snmpd cores with SIGFPE in update_stats 6981644 Upgrade bash to 4.1 6983060 BIND Packages Description needs updating when version changes. 6984919 SMA snmpd takes a long time to service ifOperStatus and ifAdminStatus requests 6985355 trousers should use /var/user/$USERNAME subdirectories to store data 6992874 Upgrade CURL to 7.21.2 6993289 Please migrate rdiff-backup to Python 2.6 or otherwise remove Python 2.4 dependency 6993295 Please migrate grails to Python 2.6. 6993306 antlr-2 packages depend on Python 2.4, but do not seem to require Python 2.4 at all. 6993308 pywbem seems to depend on Python 2.4 but actually uses Python 2.6 6993310 Please remove python 2.4 pycups bindings 6993610 Wireshark update to version 1.2.12 6995326 switch sfw to sunstudio12.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
# CDDL HEADER START
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
# and limitations under the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
# CDDL HEADER END
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
#
13
971008b98b79 Import sfw build 139
Cyril Plisko <cyril.plisko@grigale.com>
parents: 9
diff changeset
    22
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    23
#
13
971008b98b79 Import sfw build 139
Cyril Plisko <cyril.plisko@grigale.com>
parents: 9
diff changeset
    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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    26
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
# This makefile builds both 32 and 64 bit versions of the library.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
# Builds occur in separate directories.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
9
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    31
RELNUM=$(COMPONENT_VERSION:sh)
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    32
VER=curl-$(RELNUM)
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    33
VER64=$(VER)-64
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    34
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    35
LARGEFILES=	-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    36
PREFIX = /usr
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    37
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    38
# We need to do this because libtool adds wrong paths to RPATH.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    39
LDFLAGS += -L$(PREFIX)/lib -R$(PREFIX)/lib
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    40
LDFLAGS += -L$(ROOT)/usr/lib
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    41
LDFLAGS += -lgss
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    42
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    43
EXTRA_LDFLAGS64 += -L$(PREFIX)/lib/$(MACH64)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
EXTRA_LDFLAGS64 += -L$(ROOT)/lib/$(MACH64)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
EXTRA_LDFLAGS64 += -R$(PREFIX)/lib/$(MACH64) 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
EXTRA_LDFLAGS64 += -lgss
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    48
LD_OPTIONS = -M $(SRC)/cmd/mapfile_noexstk -z ignore
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
LD_OPTIONS += -lsocket -lresolv -lnsl -lgen
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
include ../Makefile.lib
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
CONFIGURE_OPTIONS = --localstatedir=/var --enable-shared
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    54
CONFIGURE_OPTIONS += --disable-static --enable-http --enable-ftp
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    55
CONFIGURE_OPTIONS += --enable-file --enable-dict
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    56
CONFIGURE_OPTIONS += --enable-telnet --enable-tftp
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    57
CONFIGURE_OPTIONS += --enable-manual --disable-libgcc
9
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    58
CONFIGURE_OPTIONS += --enable-rtsp --enable-proxy
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    59
CONFIGURE_OPTIONS += --enable-telnet --enable-tftp --enable-pop3
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    60
CONFIGURE_OPTIONS += --enable-imap --enable-smtp
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    61
CONFIGURE_OPTIONS += --enable-ipv6 --enable-nonblocking
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    62
CONFIGURE_OPTIONS += --enable-thread --enable-verbose
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    63
CONFIGURE_OPTIONS += --disable-sspi --enable-crypto-auth
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    64
CONFIGURE_OPTIONS += --enable-cookies --disable-hidden-symbols
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    65
CONFIGURE_OPTIONS += --disable-soname-bump
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    66
CONFIGURE_OPTIONS += --enable-ldap --with-random=/dev/urandom
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    67
CONFIGURE_OPTIONS += --with-ssl --with-ldap-lib=ldap
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    68
CONFIGURE_OPTIONS += --with-lber-lib=sldap
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    69
CONFIGURE_OPTIONS += --with-gssapi-includes=/usr/include/gssapi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    70
CONFIGURE_OPTIONS += --with-gssapi-libs=/usr/lib
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    71
CONFIGURE_OPTIONS += --with-gssapi=/usr --with-ca-bundle=/etc/curl/curlCA
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    72
CONFIGURE_OPTIONS += --with-zlib=/usr --with-libidn=/usr
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    73
CONFIGURE_OPTIONS += --with-pic
13
971008b98b79 Import sfw build 139
Cyril Plisko <cyril.plisko@grigale.com>
parents: 9
diff changeset
    74
CONFIGURE_OPTIONS += "curl_disallow_getifaddrs=yes"
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    75
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    76
all: real-all
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    77
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    78
all32: $(VER)/config.status
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    79
	(cd $(VER); env - "CFLAGS=$(CFLAGS) $(XREGSFLAG) $(LARGEFILES)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    80
	    "LD_OPTIONS=$(LD_OPTIONS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    81
	    "LDFLAGS=$(LDFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    85
	    "MAKE=$(CCSMAKE)" $(CCSMAKE) -e) 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    86
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    87
# if we do not add $($(MACH64)_XARCH), CXX will assume that it's linking
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    88
# 32-bit, and linking will fail.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    89
all64: $(VER64)/config.status
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    90
	(cd $(VER64); env - "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) $(LARGEFILES)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    91
	    "LD_OPTIONS=$(LD_OPTIONS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    92
	    "LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    96
	    "MAKE=$(CCSMAKE)" $(CCSMAKE) -e) 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    97
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    98
COMPAT_VERSION=	5
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    99
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   100
# We need to add this because idn's includes and libraries should be
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   101
# picked up from the shadow build area (for now)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   102
CPPFLAGS += -I$(ROOT)/usr/include/idn
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   103
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   104
# We want a thread-safe curl
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   105
CFLAGS += -mt -D_REENTRANT -D__EXTENSIONS__
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   106
CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   107
CFLAGS += -D_XPG6 -D_XOPEN_SOURCE=600 -D_POSIX_PTHREAD_SEMANTICS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   108
CFLAGS += -D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   109
CPPFLAGS += -D_THREAD_SAFE -D_REENTRANT -D__EXTENSIONS__
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   110
CPPFLAGS += -D_LARGEFILE_SOURCE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   111
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_XPG6 -D_XOPEN_SOURCE=600
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   112
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_C_SOURCE=200112L
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   113
CPPFLAGS +=  -D__XOPEN_OR_POSIX 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   114
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   115
# lint stuff
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   116
LIBRARY=libcurl.a
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   117
LINTOUT=        lint.out
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   118
LINTFLAGS= 	-I./include -I. -Xc99=%all $(CCBITS32) $(LARGEFILES)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   119
LINTFLAGS64= 	-I./include -I. -Xc99=%all $(CCBITS64) $(LARGEFILES)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   120
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   121
install: all
9
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   122
	VERS=$(VER) $(SHELL) ./install-sfw
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   123
	 MACH64=$(MACH64) VERS=$(VER64) $(SHELL) ./install-sfw-64
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   124
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   125
real-all: all32 all64 lint32 lint64
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   126
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   127
test: test32 test64
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   128
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   129
# We need to use a different method for correcting the pkgconfig *.pc
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   130
# files generated by libtool for curl. The contents of these files is,
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   131
# by default, wrong. It includes the entire LDFLAGS, and it does not
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   132
# include the correct -L directive for 64-bit builds. This is done 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   133
# by maintaining a correct set of libcurl.pc and libcurl-64.pc files,
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   134
# and determining at make time the appropriate 64-bit ISA on which
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   135
# the build is run.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   136
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   137
$(VER)/config.status: $(VER)/configure
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   138
	( cd $(VER); \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   139
	    env - "CC=$(CC)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   140
	    "CPPFLAGS=$(CPPFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   141
	    "CFLAGS=$(CPPFLAGS) $(CFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   142
	    "CPP=$(CC) $(CFLAGS) $(CPPFLAGS) -E" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   143
	    "CXX=$(CCC)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   144
	    "CXXCPP=$(CCC) $(CPPFLAGS) $(CCFLAGS) -E" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   145
	    "LDFLAGS=$(LDFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   146
	    "LD_OPTIONS=$(LD_OPTIONS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   147
	    "CXXLDFLAGS=$(LDFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   148
	    "CXXLD=$(CCC) $(LDFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   152
	    "INSTALL=$(GINSTALL)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   153
	    "MAKE=$(CCSMAKE)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   154
	    ./configure --prefix=$(PREFIX) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   155
	    --bindir=$(PREFIX)/bin \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   156
	    --sbindir=$(PREFIX)/sbin \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   157
	    --libdir=$(PREFIX)/lib \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   158
	    --libexecdir=$(PREFIX)/libexec \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   167
	    touch -acm libcurl.pc)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   168
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   169
$(VER64)/config.status: $(VER64)/configure
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   170
	( cd $(VER64); \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   171
	    env - "CC=$(CC64)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   172
	    "CPPFLAGS=$(CPPFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   173
	    "CFLAGS=$(CPPFLAGS) $(CFLAGS64)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   174
	    "CPP=$(CC64) $(CFLAGS64) $(CPPFLAGS) -E" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   175
	    "CXX=$(CCC64)" "CXXFLAGS=$(CPPFLAGS) $(CCFLAGS64)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   176
	    "CXXCPP=$(CCC64) $(CPPFLAGS) $(CCFLAGS64) -E" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   177
	    "LDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   178
	    "LD_OPTIONS=$(LD_OPTIONS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   179
	    "CXXLDFLAGS=$(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   180
	    "CXXLD=$(CCC64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   181
	    "CXXLINKLIB=$(CCC64) $(EXTRA_LDFLAGS64) $($(MACH64)_XARCH)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   182
	    "MACH64=$(MACH64)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   186
	    "INSTALL=$(GINSTALL)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   187
	    "MAKE=$(CCSMAKE)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   188
	    ./configure --prefix=$(PREFIX) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   189
	    --bindir=$(PREFIX)/bin/$(MACH64) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   190
	    --sbindir=$(PREFIX)/sbin/$(MACH64) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   191
	    --libdir=$(PREFIX)/lib/$(MACH64) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   192
	    --libexecdir=$(PREFIX)/libexec/$(MACH64) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   193
	    $(CONFIGURE_OPTIONS) ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   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
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   197
	    /usr/gnu/bin/sed -e "s#MACH64#$(MACH64)#g" curl-config > curl-config.sed ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   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
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   200
	    touch -acm curl-config ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   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
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   204
	    /bin/ksh ../postprocess-pkgconfig-64 libcurl.pc )
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   205
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   206
$(VER)/configure: $(VER).tar.gz
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   207
	mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   208
	mv tmp/$(VER) $(VER); rmdir tmp
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   209
	( cd $(VER) ; \
9
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   210
	    gpatch -p0 <../Solaris/diffs/configure.0.diff ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   211
	    gpatch -p0 <../Solaris/diffs/Makefile.in.1.diff ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   212
	    gpatch -p0 <../Solaris/diffs/curlbuild.h.2.diff ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   213
	    gpatch -p0 <../Solaris/diffs/Makefile.in.3.diff ; \
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   214
	    touch -acm configure ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   215
	    touch -acm include/curl/curlbuild.h ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   216
	    chmod 0755 configure )
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   217
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   218
$(VER64)/configure: $(VER).tar.gz
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   219
	mkdir -p tmp; gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   220
	mv tmp/$(VER) $(VER64); rmdir tmp
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   221
	( cd $(VER64) ; \
9
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   222
	    gpatch -p0 <../Solaris/diffs/configure.0.diff ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   223
	    gpatch -p0 <../Solaris/diffs/Makefile.in.1.diff ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   224
	    gpatch -p0 <../Solaris/diffs/curlbuild.h.2.diff ; \
502b128296a2 Import sfw build 135
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   225
	    gpatch -p0 <../Solaris/diffs/Makefile.in.3.diff ; \
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   226
	    touch -acm configure ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   227
	    touch -acm include/curl/curlbuild.h ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   228
	    chmod 0755 configure )
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   229
clean:
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   230
	-rm -rf $(VER)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   231
	-rm -rf $(VER64)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   232
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   233
lint32: $(VER)/config.status
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   234
	(cd $(VER); \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   235
		$(LINT.c) -o $(LIBNAME) ../llib-lcurl > $(LINTOUT) 2>&1)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   236
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   237
lint64: $(VER64)/config.status
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   238
	(cd $(VER64); \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   239
		$(LINT64.c) -o $(LIBNAME) ../llib-lcurl > $(LINTOUT) 2>&1)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   240
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   241
test32: $(VER)/config.status
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   242
	( cd $(VER) ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   243
	    $(GMAKE) check > $(SRC)/lib/curl/test-results-$(MACH).out 2>&1 )
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   244
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   245
test64: $(VER64)/config.status
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   246
	( cd $(VER64) ; \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   247
	    $(GMAKE) check > $(SRC)/lib/curl/test-results-$(MACH64).out 2>&1 )
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   248
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   249
install_h:
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   250
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   251
include ../Makefile.targ