Updated dependency libary versions.
[platform/upstream/curl.git] / src / Makefile.b32
1 ############################################################
2 #
3 #  Makefile.b32 - Borland's C++ Compiler 5.X
4 #
5 #  'src' 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 #
10 #  Initially written by Jaepil Kim, pit@paradise.net.nz
11 ############################################################
12
13 !if "$(__MAKE__)" == ""
14 !error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
15 !endif
16
17 # Borland's $(MAKEDIR) expands to the path where make.exe is located,
18 # use this feature to define BCCDIR when user has not defined BCCDIR.
19 !ifndef BCCDIR
20 BCCDIR = $(MAKEDIR)\..
21 !endif
22
23 # Edit the path below to point to the base of your Zlib sources.
24 !ifndef ZLIB_PATH
25 ZLIB_PATH = ..\..\zlib-1.2.7
26 !endif
27
28 # Edit the path below to point to the base of your OpenSSL package.
29 !ifndef OPENSSL_PATH
30 OPENSSL_PATH = ..\..\openssl-0.9.8x
31 !endif
32
33 # Set program's name
34 PROGNAME = curl.exe
35
36 # Setup environment
37 CC_CMD   = bcc32 -q -c
38 LD       = bcc32
39 RM       = del 2>NUL
40 MKDIR    = md
41 RMDIR    = rd /q 2>nul
42 COPY     = $(COMSPEC) /c copy /y
43
44 CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
45 LDFLAGS  = -q -lq -lap
46
47 SRCDIRS  = .;..\lib
48 OBJDIR   = .\BCC_objs
49 INCDIRS  = -I.;..\include;..\lib
50 LINKLIB  = $(BCCDIR)\lib\cw32mt.lib
51 DEFINES  = -DNDEBUG -DWIN32
52
53 !ifdef DYNAMIC
54 LIBCURL_LIB = ..\lib\libcurl_imp.lib
55 !else
56 LIBCURL_LIB = ..\lib\libcurl.lib
57 DEFINES = $(DEFINES) -DCURL_STATICLIB
58 !endif
59
60 # ZLIB support is enabled setting WITH_ZLIB=1
61 !ifdef WITH_ZLIB
62 DEFINES  = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
63 INCDIRS  = $(INCDIRS);$(ZLIB_PATH)
64 LINKLIB  = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
65 !endif
66
67 # SSL support is enabled setting WITH_SSL=1
68 !ifdef WITH_SSL
69 DEFINES  = $(DEFINES) -DUSE_SSLEAY
70 INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
71 LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
72 !endif
73
74 .autodepend
75
76 .path.c   = $(SRCDIRS)
77 .path.obj = $(OBJDIR)
78
79 # Makefile.inc provides the CSOURCES and HHEADERS defines
80 !undef top_srcdir
81 !include Makefile.inc
82
83 CSOURCES = $(CURL_CFILES) $(CURLX_ONES:/lib/=)
84 OBJECTS  = $(CSOURCES:.c=.obj)
85
86 .c.obj:
87         $(CC_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$@ $<
88
89 all:    $(OBJDIR) hugehelp $(PROGNAME)
90
91 clean:
92         cd $(OBJDIR)
93         @-$(RM) $(OBJECTS)
94         cd ..
95         @-$(RMDIR) $(OBJDIR)
96         @-$(RM) $(PROGNAME)
97         @-$(RM) curl.tds
98
99 $(OBJDIR):
100         @-$(RMDIR) $(OBJDIR)
101         @-$(MKDIR) $(OBJDIR)
102
103 !ifdef WITH_ZLIB
104 hugehelp: ..\docs\MANUAL ..\docs\curl.1 mkhelp.pl
105         groff -Tascii -man -P -c ../docs/curl.1 > hugehelp.tmp
106         perl -w mkhelp.pl -c ../docs/MANUAL < hugehelp.tmp > hugehelp.c
107         @-$(RM) hugehelp.tmp
108 !else
109 hugehelp:
110         $(COPY) hugehelp.c.cvs hugehelp.c
111 !endif
112
113 $(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
114         @-$(RM) $(PROGNAME)
115         $(LD) $(LDFLAGS) -e$@ $**
116
117
118 # End of Makefile.b32