cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Building a Universal framework in OS X.

From: Óscar Morales Vivó <oscarmv_at_aecsoftware.com>
Date: Fri, 19 May 2006 11:02:04 -0400

I hope I did it right. I also fixed the libraries to make sure the
SDK ones were used.

Of interest too: I still need to test this thing extensively, but I
hope that no byte-swapping constant is fixed at ./configure time,
since that would mean that one of the two binaries would be wrong. I
doubt that libcurl is likely to be affected by that, but I'd love to
have some assurance.

The diff follows (/Users/oscarmv/Desktop/libcurl.framework.make is
the newer one):

--- /Users/oscarmv/Desktop/curl-7.15.3/lib/libcurl.framework.make
2005-04-07 16:55:53.000000000 -0400
+++ /Users/oscarmv/Desktop/libcurl.framework.make 2006-05-19
10:43:12.000000000 -0400
@@ -3,19 +3,27 @@
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 debuggin.
# Can be compiled with -O3 optimizations.
-C_OPTIONS = \
+C_OPTIONS = -isysroot $(SDK) \
        -fno-common \
- -O2 \
+ -Os \
        -DHAVE_CONFIG_H \
        -DPIC \
        -I../lib \
        -I../include \
- -Wall
+ -Wall \
+ -arch ppc \
+ -arch i386
-LIBRARIES = /usr/lib/libssl.dylib \
- /usr/lib/libcrypto.dylib \
+LIBRARIES = $(SDK)/usr/lib/libssl.dylib \
+ $(SDK)/usr/lib/libcrypto.dylib \
        -lz
# These libtool options are needed for a framework.
@@ -25,7 +33,11 @@
# 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 = -prebind \
+LINK_OPTIONS = \
+ -Wl,-syslibroot,$(SDK) \
+ -arch ppc \
+ -arch i386 \
+ -prebind \
        -seg1addr 0x10400000 \
        -dynamiclib \
        -install_name @executable_path/../Frameworks/libcurl.framework/libcurl
@@ -71,6 +83,7 @@
        $(TMP_DIR)/parsedate.o \
        $(TMP_DIR)/progress.o \
        $(TMP_DIR)/security.o \
+ $(TMP_DIR)/select.o \
        $(TMP_DIR)/sendf.o \
        $(TMP_DIR)/share.o \
        $(TMP_DIR)/speedcheck.o \
@@ -81,6 +94,7 @@
        $(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 \
@@ -97,7 +111,7 @@
# 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
- $(CC) $(LINK_OPTIONS) $(LIBRARIES) $(OBJECTS) \
+ $(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
        cd $(LIB_DIR)/libcurl.framework; \
Received on 2006-05-19

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET