some more tweaks, fixed zlib suport.
[platform/upstream/curl.git] / lib / Makefile.b32
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
15 # Edit the path below to point to the base of your Zlib sources.
16 !ifndef ZLIB_PATH
17 ZLIB_PATH = ../../zlib-1.2.1
18 !endif
19
20 # Edit the path below to point to the base of your OpenSSL package.
21 !ifndef OPENSSL_PATH
22 OPENSSL_PATH = ../../openssl-0.9.7d
23 !endif
24
25 # Set libcurl's name
26 LIBCURLLIB = libcurl.lib
27 LIBCURLDLL = libcurl.dll
28
29 # Setup environment
30 CXX      = bcc32
31 LD       = bcc32
32 CP       = copy
33 RM       = del
34 LIB      = tlib
35 TOPDIR   = ..
36 CURNTDIR = .
37
38 CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
39 LDFLAGS  = -q -lq -laa -tWD
40
41 INCDIRS  = -I$(CURNTDIR);$(TOPDIR)/include
42 LINKLIB  = $(BCCDIR)/lib/cw32mt.lib
43
44 # If you build with SSL support, set WITH_SSL=1
45 DEFINES  = -DLIBCURL_BIGENDIAN=0 -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS
46 !ifdef WITH_ZLIB
47 DEFINES  = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
48 INCDIRS  = $(INCDIRS);$(ZLIB_PATH)
49 # LINKLIB  = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
50 !endif
51 !ifdef WITH_SSL
52 DEFINES  = $(DEFINES) -DUSE_SSLEAY 
53 INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
54 # LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
55 !endif
56
57 .autodepend
58
59 # Makefile.inc provides the CSOURCES and HHEADERS defines
60 !include Makefile.inc
61
62 OBJECTS = $(CSOURCES:.c=.obj)
63
64 .c.obj:
65         $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
66
67 all:    $(LIBCURLLIB)
68
69 clean:
70         -$(RM) $(LIBCURLLIB)
71         -$(RM) *.obj
72         -$(RM) getdate.c
73
74 $(LIBCURLLIB): $(OBJECTS)
75         @-$(RM) $@
76         $(LIB) $@ /a $**
77
78 $(LIBCURLDLL): $(OBJECTS) $(LINKLIB)
79         @-$(RM) $@
80         $(LD) $(LDFLAGS) -e$@ $**
81
82 getdate.c: getdate.c.cvs
83         @echo Creating $@
84         @-$(RM) getdate.y
85         @$(CP) $** $@
86
87