libcurl.framework.make 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. TMP_DIR = ../lib/.lib
  2. LIB_DIR = ../lib
  3. # for debug symbols add the -g option. Remove the -O2 option for best debuggin.
  4. # Can be compiled with -O3 optimizations.
  5. C_OPTIONS = \
  6. -fno-common \
  7. -O2 \
  8. -DHAVE_CONFIG_H \
  9. -DPIC \
  10. -I../lib \
  11. -I../include \
  12. -Wall
  13. # The 2 -framework tags are the needed Mac OS X sytem libs
  14. # must link to version 0.9 of libssl to run on Mac OS X 10.2. 10.1 is not tested but should work.
  15. LIBRARIES = -framework CoreFoundation \
  16. -framework CoreServices \
  17. /usr/lib/libssl.dylib \
  18. /usr/lib/libcrypto.dylib \
  19. -lz
  20. # These libtool options are needed for a framework.
  21. # @executable_path tells the application that links to this library where to find it.
  22. # On Mac OS X frameworks are usually iniside the application bundle in a frameworks folder.
  23. # Define a seg1addr so prebinding does not overlap with other frameworks or bundles.
  24. # For prebinding 0x10400000 was chosen a bit at random.
  25. # If this overlaps one of you current libs just change in the makefile.
  26. # This address is safe for all built in frameworks.
  27. LINK_OPTIONS = -prebind \
  28. -seg1addr 0x10400000 \
  29. -dynamiclib \
  30. -install_name @executable_path/../frameworks/libcurl.framework/libcurl
  31. # This is the file list. It is not dynamically generated so this must be updated if new files are added to the build.
  32. OBJECTS = $(TMP_DIR)/base64.o \
  33. $(TMP_DIR)/connect.o \
  34. $(TMP_DIR)/content_encoding.o \
  35. $(TMP_DIR)/cookie.o \
  36. $(TMP_DIR)/dict.o \
  37. $(TMP_DIR)/easy.o \
  38. $(TMP_DIR)/escape.o \
  39. $(TMP_DIR)/file.o \
  40. $(TMP_DIR)/formdata.o \
  41. $(TMP_DIR)/ftp.o \
  42. $(TMP_DIR)/getdate.o \
  43. $(TMP_DIR)/getenv.o \
  44. $(TMP_DIR)/getinfo.o \
  45. $(TMP_DIR)/hash.o \
  46. $(TMP_DIR)/hostip.o \
  47. $(TMP_DIR)/http.o \
  48. $(TMP_DIR)/http_chunks.o \
  49. $(TMP_DIR)/http_digest.o \
  50. $(TMP_DIR)/http_negotiate.o \
  51. $(TMP_DIR)/http_ntlm.o \
  52. $(TMP_DIR)/if2ip.o \
  53. $(TMP_DIR)/inet_pton.o \
  54. $(TMP_DIR)/krb4.o \
  55. $(TMP_DIR)/ldap.o \
  56. $(TMP_DIR)/llist.o \
  57. $(TMP_DIR)/md5.o \
  58. $(TMP_DIR)/memdebug.o \
  59. $(TMP_DIR)/mprintf.o \
  60. $(TMP_DIR)/multi.o \
  61. $(TMP_DIR)/netrc.o \
  62. $(TMP_DIR)/progress.o \
  63. $(TMP_DIR)/security.o \
  64. $(TMP_DIR)/sendf.o \
  65. $(TMP_DIR)/share.o \
  66. $(TMP_DIR)/speedcheck.o \
  67. $(TMP_DIR)/ssluse.o \
  68. $(TMP_DIR)/strequal.o \
  69. $(TMP_DIR)/strtok.o \
  70. $(TMP_DIR)/telnet.o \
  71. $(TMP_DIR)/timeval.o \
  72. $(TMP_DIR)/transfer.o \
  73. $(TMP_DIR)/url.o \
  74. $(TMP_DIR)/version.o
  75. build: $(TMP_DIR) $(LIB_DIR) $(LIB_DIR)/libcurl.framework
  76. $(TMP_DIR) :
  77. mkdir -p $(TMP_DIR)
  78. $(LIB_DIR) :
  79. mkdir -p $(LIB_DIR)
  80. # This builds the framework structure and links everything properly
  81. $(LIB_DIR)/libcurl.framework: $(OBJECTS) $(LIB_DIR)/libcurl.plist
  82. mkdir -p $(LIB_DIR)/libcurl.framework/Versions/A/Resources
  83. $(CC) $(LINK_OPTIONS) $(LIBRARIES) $(OBJECTS) \
  84. -o $(LIB_DIR)/libcurl.framework/Versions/A/libcurl
  85. cp $(LIB_DIR)/libcurl.plist $(LIB_DIR)/libcurl.framework/Versions/A/Resources/Info.plist
  86. cd $(LIB_DIR)/libcurl.framework; \
  87. ln -fs ./Versions/A/libcurl libcurl; \
  88. ln -fs ./Versions/A/Resources Resources
  89. cd $(LIB_DIR)/libcurl.framework/Versions; \
  90. ln -fs ./A Current
  91. $(OBJECTS) : $(TMP_DIR)/%.o: $(LIB_DIR)/%.c
  92. $(CC) $(C_OPTIONS) -c $< -o $@
  93. clean:
  94. rm -fr $(LIB_DIR)/libcurl.framework
  95. rm -f $(OBJECTS)