aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-02-23 12:39:06 +0000
committerYang Tse <yangsita@gmail.com>2009-02-23 12:39:06 +0000
commitf5548973abd2088af81ed022ec718f254f50ce15 (patch)
treef7cfd26aa2e54709a81cb17810472f5d7f278580
parent07dc741e18626f77862a3aa90fcd9e4a04d6f2b6 (diff)
Daniel Johnson provided a shell script that will perform all the steps needed
to build a Mac OS X fat ppc/i386 or ppc64/x86_64 libcurl.framework
-rw-r--r--CHANGES4
-rwxr-xr-xMacOSX-Framework49
-rw-r--r--RELEASE-NOTES4
-rw-r--r--lib/libcurl.framework.make139
4 files changed, 56 insertions, 140 deletions
diff --git a/CHANGES b/CHANGES
index 8bf300b79..d33a25b3a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,10 @@
Changelog
+Yang Tse (23 Feb 2009)
+- Daniel Johnson provided a shell script that will perform all the steps needed
+ to build a Mac OS X fat ppc/i386 or ppc64/x86_64 libcurl.framework
+
Daniel Stenberg (23 Feb 2009)
- I renamed everything in the windows builds files that used the name 'curllib'
to the proper 'libcurl' as clearly this caused confusion.
diff --git a/MacOSX-Framework b/MacOSX-Framework
new file mode 100755
index 000000000..8f3fdd10d
--- /dev/null
+++ b/MacOSX-Framework
@@ -0,0 +1,49 @@
+#!/bin/bash
+# This script performs all of the steps needed to build a 32 bit
+# universal binary libcurl.framework for Mac OS X 10.4 or greater.
+
+VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
+
+SDK='/Developer/SDKs/MacOSX10.4u.sdk'
+
+MINVER='-mmacosx-version-min=10.4'
+
+ARCHES='-arch ppc -arch i386'
+
+# Use these values instead to produce a 64 bit framework that only works on 10.5.
+# You can't currently build a combined 32/64 framework.
+#SDK='/Developer/SDKs/MacOSX10.5.sdk'
+#
+#MINVER='-mmacosx-version-min=10.5'
+#
+#ARCHES='-arch ppc64 -arch x86_64'
+
+
+if test -d $SDK; then
+ echo "Configuring libcurl for 32 bit universal framework..."
+ ./configure --disable-dependency-tracking --disable-static --with-gssapi \
+ CFLAGS="-isysroot $SDK $ARCHES $MINVER" \
+ LDFLAGS="-Wl,-syslibroot,$SDK $ARCHES $MINVER -Wl,-headerpad_max_install_names"
+
+ echo "Building libcurl..."
+ make
+
+ echo "Creating framework..."
+ rm -r libcurl.framework
+ mkdir -p libcurl.framework/Versions/A/Resources
+ cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
+ install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
+ /usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
+ mkdir -p libcurl.framework/Versions/A/Headers
+ cp include/curl/*.h libcurl.framework/Versions/A/Headers
+ cd libcurl.framework
+ ln -fs Versions/A/libcurl libcurl
+ ln -fs Versions/A/Resources Resources
+ ln -fs Versions/A/Headers Headers
+ cd Versions
+ ln -fs A Current
+
+ echo "libcurl.framework is built and can now be included in other projects."
+else
+ echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
+fi
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index a8ae5dcd7..1dda26972 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -40,6 +40,7 @@ This release includes the following bugfixes:
o FTP with the multi interface no longer kills the control connection as
easily on transfer failures
o compilation halting when using VS2008 to build a Windows 2000 target
+ o ease creation of libcurl Mac OS X Framework
This release includes the following known bugs:
@@ -51,6 +52,7 @@ advice from friends like these:
Lisa Xu, Daniel Fandrich, Craig A West, Alexey Borzov, Sharad Gupta,
Peter Sylvester, Chad Monroe, Markus Moeller, Yang Tse, Scott Cantor,
Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet,
- Kamil Dudka, Patrik Thunstrom, Linus Nielsen Feltzing, Mark Incley
+ Kamil Dudka, Patrik Thunstrom, Linus Nielsen Feltzing, Mark Incley,
+ Daniel Johnson
Thanks! (and sorry if I forgot to mention someone)
diff --git a/lib/libcurl.framework.make b/lib/libcurl.framework.make
deleted file mode 100644
index 3b9a5e0cc..000000000
--- a/lib/libcurl.framework.make
+++ /dev/null
@@ -1,139 +0,0 @@
-# to build Mac OS X framework call the following line with the directory set
-# properly to lib:
-# make build -e -f libcurl.framework.make
-TMP_DIR = ../lib/.lib
-LIB_DIR = ../lib
-
-# Sets the SDK. 10.4u.sdk is the minimum for building a Universal Binary.
-SDK = /Developer/SDKs/MacOSX10.4u.sdk
-
-# Sets the minimum OSX version where the framework will work.
-ENVP = MACOSX_DEPLOYMENT_TARGET=10.3
-
-# for debug symbols add the -g option. Remove the -O2 option for best debugging.
-# Can be compiled with -O3 optimizations.
-C_OPTIONS = -isysroot $(SDK) \
- -fno-common \
- -Os \
- -DHAVE_CONFIG_H \
- -DPIC \
- -I../lib \
- -I../include \
- -Wall \
- -arch ppc \
- -arch i386
-
-LIBRARIES = $(SDK)/usr/lib/libssl.dylib \
- $(SDK)/usr/lib/libcrypto.dylib \
- -lz
-
-# These libtool options are needed for a framework.
-# @executable_path tells the application that links to this library where to find it.
-# On Mac OS X frameworks are usually iniside the application bundle in a frameworks folder.
-# Define a seg1addr so prebinding does not overlap with other frameworks or bundles.
-# For prebinding 0x10400000 was chosen a bit at random.
-# If this overlaps one of you current libs just change in the makefile.
-# This address is safe for all built in frameworks.
-LINK_OPTIONS = \
- -Wl,-syslibroot,$(SDK) \
- -arch ppc \
- -arch i386 \
- -prebind \
- -seg1addr 0x10400000 \
- -dynamiclib \
- -install_name @executable_path/../Frameworks/libcurl.framework/libcurl
-
-# This is the file list. It is not dynamically generated so this must be updated if new files are added to the build.
-OBJECTS = $(TMP_DIR)/base64.o \
- $(TMP_DIR)/connect.o \
- $(TMP_DIR)/content_encoding.o \
- $(TMP_DIR)/cookie.o \
- $(TMP_DIR)/curl_addrinfo.o \
- $(TMP_DIR)/dict.o \
- $(TMP_DIR)/easy.o \
- $(TMP_DIR)/escape.o \
- $(TMP_DIR)/file.o \
- $(TMP_DIR)/formdata.o \
- $(TMP_DIR)/ftp.o \
- $(TMP_DIR)/getenv.o \
- $(TMP_DIR)/getinfo.o \
- $(TMP_DIR)/gtls.o \
- $(TMP_DIR)/hash.o \
- $(TMP_DIR)/hostares.o \
- $(TMP_DIR)/hostasyn.o \
- $(TMP_DIR)/hostip.o \
- $(TMP_DIR)/hostip4.o \
- $(TMP_DIR)/hostip6.o \
- $(TMP_DIR)/hostsyn.o \
- $(TMP_DIR)/hostthre.o \
- $(TMP_DIR)/http.o \
- $(TMP_DIR)/http_chunks.o \
- $(TMP_DIR)/http_digest.o \
- $(TMP_DIR)/http_negotiate.o \
- $(TMP_DIR)/http_ntlm.o \
- $(TMP_DIR)/if2ip.o \
- $(TMP_DIR)/inet_ntop.o \
- $(TMP_DIR)/inet_pton.o \
- $(TMP_DIR)/krb4.o \
- $(TMP_DIR)/ldap.o \
- $(TMP_DIR)/llist.o \
- $(TMP_DIR)/md5.o \
- $(TMP_DIR)/memdebug.o \
- $(TMP_DIR)/mprintf.o \
- $(TMP_DIR)/multi.o \
- $(TMP_DIR)/netrc.o \
- $(TMP_DIR)/parsedate.o \
- $(TMP_DIR)/progress.o \
- $(TMP_DIR)/rawstr.o \
- $(TMP_DIR)/security.o \
- $(TMP_DIR)/select.o \
- $(TMP_DIR)/sendf.o \
- $(TMP_DIR)/share.o \
- $(TMP_DIR)/speedcheck.o \
- $(TMP_DIR)/sslgen.o \
- $(TMP_DIR)/ssluse.o \
- $(TMP_DIR)/strequal.o \
- $(TMP_DIR)/strerror.o \
- $(TMP_DIR)/strtok.o \
- $(TMP_DIR)/strtoofft.o \
- $(TMP_DIR)/telnet.o \
- $(TMP_DIR)/tftp.o \
- $(TMP_DIR)/timeval.o \
- $(TMP_DIR)/transfer.o \
- $(TMP_DIR)/url.o \
- $(TMP_DIR)/version.o \
- $(TMP_DIR)/splay.o \
- $(TMP_DIR)/socks.o
-
-build: $(TMP_DIR) $(LIB_DIR) $(LIB_DIR)/libcurl.framework
-
-$(TMP_DIR) :
- mkdir -p $(TMP_DIR)
-
-$(LIB_DIR) :
- mkdir -p $(LIB_DIR)
-
-# This builds the framework structure and links everything properly
-$(LIB_DIR)/libcurl.framework: $(OBJECTS) $(LIB_DIR)/libcurl.plist
- mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Resources
- $(ENVP) $(CC) $(LINK_OPTIONS) $(LIBRARIES) $(OBJECTS) \
- -o $(LIB_DIR)/libcurl.framework/Versions/A/libcurl
- cp $(LIB_DIR)/libcurl.plist $(LIB_DIR)/libcurl.framework/Versions/A/Resources/Info.plist
- mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Headers
- cp $(LIB_DIR)/../include/curl/*.h $(LIB_DIR)/libcurl.framework/Versions/A/Headers
- cd $(LIB_DIR)/libcurl.framework; \
- ln -fs Versions/A/libcurl libcurl; \
- ln -fs Versions/A/Resources Resources; \
- ln -fs Versions/A/Headers Headers
- cd $(LIB_DIR)/libcurl.framework/Versions; \
- ln -fs A Current
-
-$(OBJECTS) : $(TMP_DIR)/%.o: $(LIB_DIR)/%.c
- $(CC) $(C_OPTIONS) -c $< -o $@
-
-clean:
- rm -fr $(LIB_DIR)/libcurl.framework
- rm -f $(OBJECTS)
-
-
-