Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / lib / libcurl.framework.make
blobf37df3ec4f152457e711c6615da2916a86d425a1
1 # to build Mac OS X framework call the following line with the directory set
2 # properly to lib:
3 # make build -e -f libcurl.framework.make
4 TMP_DIR = ../lib/.lib
5 LIB_DIR = ../lib
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) \
16 -fno-common \
17 -Os \
18 -DHAVE_CONFIG_H \
19 -DPIC \
20 -I../lib \
21 -I../include \
22 -Wall \
23 -arch ppc \
24 -arch i386
26 LIBRARIES = $(SDK)/usr/lib/libssl.dylib \
27 $(SDK)/usr/lib/libcrypto.dylib \
28 -lz
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.
37 LINK_OPTIONS = \
38 -Wl,-syslibroot,$(SDK) \
39 -arch ppc \
40 -arch i386 \
41 -prebind \
42 -seg1addr 0x10400000 \
43 -dynamiclib \
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 \
50 $(TMP_DIR)/cookie.o \
51 $(TMP_DIR)/dict.o \
52 $(TMP_DIR)/easy.o \
53 $(TMP_DIR)/escape.o \
54 $(TMP_DIR)/file.o \
55 $(TMP_DIR)/formdata.o \
56 $(TMP_DIR)/ftp.o \
57 $(TMP_DIR)/getenv.o \
58 $(TMP_DIR)/getinfo.o \
59 $(TMP_DIR)/gtls.o \
60 $(TMP_DIR)/hash.o \
61 $(TMP_DIR)/hostares.o \
62 $(TMP_DIR)/hostasyn.o \
63 $(TMP_DIR)/hostip.o \
64 $(TMP_DIR)/hostip4.o \
65 $(TMP_DIR)/hostip6.o \
66 $(TMP_DIR)/hostsyn.o \
67 $(TMP_DIR)/hostthre.o \
68 $(TMP_DIR)/http.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 \
73 $(TMP_DIR)/if2ip.o \
74 $(TMP_DIR)/inet_ntop.o \
75 $(TMP_DIR)/inet_pton.o \
76 $(TMP_DIR)/krb4.o \
77 $(TMP_DIR)/ldap.o \
78 $(TMP_DIR)/llist.o \
79 $(TMP_DIR)/md5.o \
80 $(TMP_DIR)/memdebug.o \
81 $(TMP_DIR)/mprintf.o \
82 $(TMP_DIR)/multi.o \
83 $(TMP_DIR)/netrc.o \
84 $(TMP_DIR)/parsedate.o \
85 $(TMP_DIR)/progress.o \
86 $(TMP_DIR)/security.o \
87 $(TMP_DIR)/select.o \
88 $(TMP_DIR)/sendf.o \
89 $(TMP_DIR)/share.o \
90 $(TMP_DIR)/speedcheck.o \
91 $(TMP_DIR)/sslgen.o \
92 $(TMP_DIR)/ssluse.o \
93 $(TMP_DIR)/strequal.o \
94 $(TMP_DIR)/strerror.o \
95 $(TMP_DIR)/strtok.o \
96 $(TMP_DIR)/strtoofft.o \
97 $(TMP_DIR)/telnet.o \
98 $(TMP_DIR)/tftp.o \
99 $(TMP_DIR)/timeval.o \
100 $(TMP_DIR)/transfer.o \
101 $(TMP_DIR)/url.o \
102 $(TMP_DIR)/version.o \
103 $(TMP_DIR)/splay.o \
104 $(TMP_DIR)/socks.o
106 build: $(TMP_DIR) $(LIB_DIR) $(LIB_DIR)/libcurl.framework
108 $(TMP_DIR) :
109 mkdir -p $(TMP_DIR)
111 $(LIB_DIR) :
112 mkdir -p $(LIB_DIR)
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; \
127 ln -fs A Current
129 $(OBJECTS) : $(TMP_DIR)/%.o: $(LIB_DIR)/%.c
130 $(CC) $(C_OPTIONS) -c $< -o $@
132 clean:
133 rm -fr $(LIB_DIR)/libcurl.framework
134 rm -f $(OBJECTS)