2
0

Makefile.b32 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. ############################################################
  2. # $Id$
  3. #
  4. # Makefile.b32 - Borland's C++ Compiler 5.X
  5. #
  6. # 'lib' directory
  7. #
  8. # 'BCCDIR' has to be set up to point to the base directory
  9. # of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
  10. # where c:\Borland\BCC55 is the compiler is installed
  11. #
  12. # Written by Jaepil Kim, pit@paradise.net.nz
  13. ############################################################
  14. # Edit the path below to point to the base of your Zlib sources.
  15. !ifndef ZLIB_PATH
  16. ZLIB_PATH = ../../zlib-1.2.1
  17. !endif
  18. # Edit the path below to point to the base of your OpenSSL package.
  19. !ifndef OPENSSL_PATH
  20. OPENSSL_PATH = ../../openssl-0.9.7d
  21. !endif
  22. # Set libcurl static lib, dll and import lib
  23. LIBCURL_LIB = libcurl.lib
  24. LIBCURL_DLL = libcurl.dll
  25. LIBCURL_IMPLIB = libcurl_imp.lib
  26. # Setup environment
  27. CXX = bcc32
  28. LD = bcc32
  29. CP = copy
  30. RM = del
  31. LIB = tlib
  32. IMPLIB = implib
  33. CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
  34. LIBFLAGS = /C /P32
  35. LDFLAGS = -q -lq -laa -tWD
  36. INCDIRS = -I.;../include
  37. LINKLIB = $(BCCDIR)/lib/cw32mt.lib
  38. # If you build with SSL support, set WITH_SSL=1
  39. DEFINES = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL
  40. !ifdef WITH_ZLIB
  41. DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
  42. INCDIRS = $(INCDIRS);$(ZLIB_PATH)
  43. LINKLIB = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
  44. !endif
  45. !ifdef WITH_SSL
  46. DEFINES = $(DEFINES) -DUSE_SSLEAY
  47. INCDIRS = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
  48. LINKLIB = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
  49. !endif
  50. .autodepend
  51. # Makefile.inc provides the CSOURCES and HHEADERS defines
  52. !include Makefile.inc
  53. OBJECTS = $(CSOURCES:.c=.obj)
  54. .c.obj:
  55. $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
  56. all: $(LIBCURL_LIB) $(LIBCURL_DLL)
  57. clean:
  58. -$(RM) $(LIBCURL_LIB)
  59. -$(RM) $(LIBCURL_IMPLIB)
  60. -$(RM) libcurl.tds
  61. -$(RM) *.obj
  62. $(LIBCURL_LIB): $(OBJECTS)
  63. @-$(RM) $@
  64. $(LIB) $(LIBFLAGS) $@ @&&!
  65. +$(**: = &^
  66. +)
  67. !
  68. $(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
  69. @-$(RM) $(LIBCURL_DLL)
  70. @-$(RM) $(LIBCURL_IMPLIB)
  71. $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) $**
  72. $(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)