Static lib is libcurl.lib and import lib libcurl_imp.lib.
[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 static lib, dll and import lib
26 LIBCURL_LIB    = libcurl.lib
27 LIBCURL_DLL    = libcurl.dll
28 LIBCURL_IMPLIB = libcurl_imp.lib
29
30 # Setup environment
31 CXX      = bcc32
32 LD       = bcc32
33 CP       = copy
34 RM       = del
35 LIB      = tlib
36 IMPLIB   = implib
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 LIBFLAGS = /C /P32
40 LDFLAGS  = -q -lq -laa -tWD
41
42 INCDIRS  = -I.;../include
43 LINKLIB  = $(BCCDIR)/lib/cw32mt.lib
44
45 # If you build with SSL support, set WITH_SSL=1
46 DEFINES  = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL
47
48 !ifdef WITH_ZLIB
49 DEFINES  = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
50 INCDIRS  = $(INCDIRS);$(ZLIB_PATH)
51 LINKLIB  = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
52 !endif
53
54 !ifdef WITH_SSL
55 DEFINES  = $(DEFINES) -DUSE_SSLEAY
56 INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
57 LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
58 !endif
59
60 .autodepend
61
62 # Makefile.inc provides the CSOURCES and HHEADERS defines
63 !include Makefile.inc
64
65 OBJECTS = $(CSOURCES:.c=.obj)
66
67 .c.obj:
68         $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
69
70 all:    $(LIBCURL_LIB) $(LIBCURL_DLL)
71
72 clean:
73         -$(RM) $(LIBCURL_LIB)
74         -$(RM) $(LIBCURL_IMPLIB)
75         -$(RM) libcurl.tds
76         -$(RM) *.obj
77
78 $(LIBCURL_LIB): $(OBJECTS)
79         @-$(RM) $@
80         $(LIB) $(LIBFLAGS) $@ @&&!
81 +$(**: = &^
82 +)
83 !
84
85 $(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
86         @-$(RM) $(LIBCURL_DLL)
87         @-$(RM) $(LIBCURL_IMPLIB)
88         $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) $**
89         $(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)
90