Makefile.b32 2.1 KB

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