1
# to build Mac OS X framework call the following line with the directory set
3
# make build -e -f libcurl.framework.make
7
# Sets the SDK. 10.4u.sdk is the minimum for building a Universal Binary.
8
SDK = /Developer/SDKs/MacOSX10.4u.sdk
10
# Sets the minimum OSX version where the framework will work.
11
ENVP = MACOSX_DEPLOYMENT_TARGET=10.3
13
# for debug symbols add the -g option. Remove the -O2 option for best debuggin.
14
# Can be compiled with -O3 optimizations.
15
C_OPTIONS = -isysroot $(SDK) \
26
LIBRARIES = $(SDK)/usr/lib/libssl.dylib \
27
$(SDK)/usr/lib/libcrypto.dylib \
30
# These libtool options are needed for a framework.
31
# @executable_path tells the application that links to this library where to find it.
32
# On Mac OS X frameworks are usually iniside the application bundle in a frameworks folder.
33
# Define a seg1addr so prebinding does not overlap with other frameworks or bundles.
34
# For prebinding 0x10400000 was chosen a bit at random.
35
# If this overlaps one of you current libs just change in the makefile.
36
# This address is safe for all built in frameworks.
38
-Wl,-syslibroot,$(SDK) \
42
-seg1addr 0x10400000 \
44
-install_name @executable_path/../Frameworks/libcurl.framework/libcurl
46
# This is the file list. It is not dynamically generated so this must be updated if new files are added to the build.
47
OBJECTS = $(TMP_DIR)/base64.o \
48
$(TMP_DIR)/connect.o \
49
$(TMP_DIR)/content_encoding.o \
55
$(TMP_DIR)/formdata.o \
58
$(TMP_DIR)/getinfo.o \
61
$(TMP_DIR)/hostares.o \
62
$(TMP_DIR)/hostasyn.o \
64
$(TMP_DIR)/hostip4.o \
65
$(TMP_DIR)/hostip6.o \
66
$(TMP_DIR)/hostsyn.o \
67
$(TMP_DIR)/hostthre.o \
69
$(TMP_DIR)/http_chunks.o \
70
$(TMP_DIR)/http_digest.o \
71
$(TMP_DIR)/http_negotiate.o \
72
$(TMP_DIR)/http_ntlm.o \
74
$(TMP_DIR)/inet_ntop.o \
75
$(TMP_DIR)/inet_pton.o \
80
$(TMP_DIR)/memdebug.o \
81
$(TMP_DIR)/mprintf.o \
84
$(TMP_DIR)/parsedate.o \
85
$(TMP_DIR)/progress.o \
86
$(TMP_DIR)/security.o \
90
$(TMP_DIR)/speedcheck.o \
93
$(TMP_DIR)/strequal.o \
94
$(TMP_DIR)/strerror.o \
96
$(TMP_DIR)/strtoofft.o \
99
$(TMP_DIR)/timeval.o \
100
$(TMP_DIR)/transfer.o \
102
$(TMP_DIR)/version.o \
106
build: $(TMP_DIR) $(LIB_DIR) $(LIB_DIR)/libcurl.framework
114
# This builds the framework structure and links everything properly
115
$(LIB_DIR)/libcurl.framework: $(OBJECTS) $(LIB_DIR)/libcurl.plist
116
mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Resources
117
$(ENVP) $(CC) $(LINK_OPTIONS) $(LIBRARIES) $(OBJECTS) \
118
-o $(LIB_DIR)/libcurl.framework/Versions/A/libcurl
119
cp $(LIB_DIR)/libcurl.plist $(LIB_DIR)/libcurl.framework/Versions/A/Resources/Info.plist
120
mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Headers
121
cp $(LIB_DIR)/../include/curl/*.h $(LIB_DIR)/libcurl.framework/Versions/A/Headers
122
cd $(LIB_DIR)/libcurl.framework; \
123
ln -fs Versions/A/libcurl libcurl; \
124
ln -fs Versions/A/Resources Resources; \
125
ln -fs Versions/A/Headers Headers
126
cd $(LIB_DIR)/libcurl.framework/Versions; \
129
$(OBJECTS) : $(TMP_DIR)/%.o: $(LIB_DIR)/%.c
130
$(CC) $(C_OPTIONS) -c $< -o $@
133
rm -fr $(LIB_DIR)/libcurl.framework