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.
# 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
$(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 \
$(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 \
# 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
+ mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Headers
+ cp $(LIB_DIR)/../include/curl/* $(LIB_DIR)/libcurl.framework/Versions/A/Headers
+ rm $(LIB_DIR)/libcurl.framework/Versions/A/Headers/Make*
cd $(LIB_DIR)/libcurl.framework; \
ln -fs ./Versions/A/libcurl libcurl; \
- ln -fs ./Versions/A/Resources Resources
+ ln -fs ./Versions/A/Resources Resources; \
+ ln -fs ./Versions/A/Headers Headers
cd $(LIB_DIR)/libcurl.framework/Versions; \
ln -fs ./A Current