]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/curl/lib/libcurl.framework.make
hello world
[icculus/iodoom3.git] / neo / curl / lib / libcurl.framework.make
1 TMP_DIR = ../lib/.lib
2 LIB_DIR = ../lib
3
4 # for debug symbols add the -g option.  Remove the -O2 option for best debuggin.
5 # Can be compiled with -O3 optimizations.
6 C_OPTIONS = \
7         -fno-common \
8         -O2 \
9         -DHAVE_CONFIG_H \
10         -DPIC \
11         -I../lib \
12         -I../include \
13         -Wall
14
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 \
21         -lz 
22
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 \
32         -dynamiclib \
33         -install_name @executable_path/../frameworks/libcurl.framework/libcurl
34
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 \
39         $(TMP_DIR)/cookie.o \
40         $(TMP_DIR)/dict.o \
41         $(TMP_DIR)/easy.o \
42         $(TMP_DIR)/escape.o \
43         $(TMP_DIR)/file.o \
44         $(TMP_DIR)/formdata.o \
45         $(TMP_DIR)/ftp.o \
46         $(TMP_DIR)/getdate.o \
47         $(TMP_DIR)/getenv.o \
48         $(TMP_DIR)/getinfo.o \
49         $(TMP_DIR)/hash.o \
50         $(TMP_DIR)/hostip.o \
51         $(TMP_DIR)/http.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 \
56         $(TMP_DIR)/if2ip.o \
57         $(TMP_DIR)/inet_pton.o \
58         $(TMP_DIR)/krb4.o \
59         $(TMP_DIR)/ldap.o \
60         $(TMP_DIR)/llist.o \
61         $(TMP_DIR)/md5.o \
62         $(TMP_DIR)/memdebug.o \
63         $(TMP_DIR)/mprintf.o \
64         $(TMP_DIR)/multi.o \
65         $(TMP_DIR)/netrc.o \
66         $(TMP_DIR)/progress.o \
67         $(TMP_DIR)/security.o \
68         $(TMP_DIR)/sendf.o \
69         $(TMP_DIR)/share.o \
70         $(TMP_DIR)/speedcheck.o \
71         $(TMP_DIR)/ssluse.o \
72         $(TMP_DIR)/strequal.o \
73         $(TMP_DIR)/strtok.o \
74         $(TMP_DIR)/telnet.o \
75         $(TMP_DIR)/timeval.o \
76         $(TMP_DIR)/transfer.o \
77         $(TMP_DIR)/url.o \
78         $(TMP_DIR)/version.o 
79
80 build: $(TMP_DIR) $(LIB_DIR) $(LIB_DIR)/libcurl.framework
81
82 $(TMP_DIR) :
83         mkdir -p $(TMP_DIR)
84
85 $(LIB_DIR) :
86         mkdir -p $(LIB_DIR)
87         
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; \
98         ln -fs ./A Current
99
100 $(OBJECTS) : $(TMP_DIR)/%.o: $(LIB_DIR)/%.c 
101         $(CC) $(C_OPTIONS) -c $< -o $@
102
103 clean:
104         rm -fr $(LIB_DIR)/libcurl.framework
105         rm -f $(OBJECTS)
106
107
108