4 # for debug symbols add the -g option. Remove the -O2 option for best debuggin.
5 # Can be compiled with -O3 optimizations.
15 # The 2 -framework tags are the needed Mac OS X sytem libs
16 # must link to version 0.9 of libssl to run on Mac OS X 10.2. 10.1 is not tested but should work.
17 LIBRARIES = -framework CoreFoundation \
18 -framework CoreServices \
19 /usr/lib/libssl.dylib \
20 /usr/lib/libcrypto.dylib \
23 # These libtool options are needed for a framework.
24 # @executable_path tells the application that links to this library where to find it.
25 # On Mac OS X frameworks are usually iniside the application bundle in a frameworks folder.
26 # Define a seg1addr so prebinding does not overlap with other frameworks or bundles.
27 # For prebinding 0x10400000 was chosen a bit at random.
28 # If this overlaps one of you current libs just change in the makefile.
29 # This address is safe for all built in frameworks.
30 LINK_OPTIONS = -prebind \
31 -seg1addr 0x10400000 \
33 -install_name @executable_path/../frameworks/libcurl.framework/libcurl
35 # This is the file list. It is not dynamically generated so this must be updated if new files are added to the build.
36 OBJECTS = $(TMP_DIR)/base64.o \
37 $(TMP_DIR)/connect.o \
38 $(TMP_DIR)/content_encoding.o \
44 $(TMP_DIR)/formdata.o \
46 $(TMP_DIR)/getdate.o \
48 $(TMP_DIR)/getinfo.o \
52 $(TMP_DIR)/http_chunks.o \
53 $(TMP_DIR)/http_digest.o \
54 $(TMP_DIR)/http_negotiate.o \
55 $(TMP_DIR)/http_ntlm.o \
57 $(TMP_DIR)/inet_pton.o \
62 $(TMP_DIR)/memdebug.o \
63 $(TMP_DIR)/mprintf.o \
66 $(TMP_DIR)/progress.o \
67 $(TMP_DIR)/security.o \
70 $(TMP_DIR)/speedcheck.o \
72 $(TMP_DIR)/strequal.o \
75 $(TMP_DIR)/timeval.o \
76 $(TMP_DIR)/transfer.o \
80 build: $(TMP_DIR) $(LIB_DIR) $(LIB_DIR)/libcurl.framework
88 # This builds the framework structure and links everything properly
89 $(LIB_DIR)/libcurl.framework: $(OBJECTS) $(LIB_DIR)/libcurl.plist
90 mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Resources
91 $(CC) $(LINK_OPTIONS) $(LIBRARIES) $(OBJECTS) \
92 -o $(LIB_DIR)/libcurl.framework/Versions/A/libcurl
93 cp $(LIB_DIR)/libcurl.plist $(LIB_DIR)/libcurl.framework/Versions/A/Resources/Info.plist
94 cd $(LIB_DIR)/libcurl.framework; \
95 ln -fs ./Versions/A/libcurl libcurl; \
96 ln -fs ./Versions/A/Resources Resources
97 cd $(LIB_DIR)/libcurl.framework/Versions; \
100 $(OBJECTS) : $(TMP_DIR)/%.o: $(LIB_DIR)/%.c
101 $(CC) $(C_OPTIONS) -c $< -o $@
104 rm -fr $(LIB_DIR)/libcurl.framework