2 # For use with Delphi and C++ Builder under Win32
3 # Updated for zlib 1.2.x by Cosmin Truta
5 # ------------ Borland C++ ------------
7 # This project uses the Delphi (fastcall/register) calling convention:
8 LOC
= -DZEXPORT
=__fastcall
-DZEXPORTVA
=__cdecl
13 # do not use "-pr" in CFLAGS
14 CFLAGS
= -a
-d
-k-
-O2
$(LOC
)
21 OBJ1
= adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
22 OBJ2
= gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
23 OBJP1
= +adler32.obj
+compress.obj
+crc32.obj
+deflate.obj
+gzclose.obj
+gzlib.obj
+gzread.obj
24 OBJP2
= +gzwrite.obj
+infback.obj
+inffast.obj
+inflate.obj
+inftrees.obj
+trees.obj
+uncompr.obj
+zutil.obj
28 all: $(ZLIB_LIB
) example.exe minigzip.exe
31 $(CC
) -c
$(CFLAGS
) $*.c
33 adler32.obj
: adler32.c zlib.h zconf.h
35 compress.obj
: compress.c zlib.h zconf.h
37 crc32.obj
: crc32.c zlib.h zconf.h crc32.h
39 deflate.obj
: deflate.c deflate.h zutil.h zlib.h zconf.h
41 gzclose.obj
: gzclose.c zlib.h zconf.h gzguts.h
43 gzlib.obj
: gzlib.c zlib.h zconf.h gzguts.h
45 gzread.obj
: gzread.c zlib.h zconf.h gzguts.h
47 gzwrite.obj
: gzwrite.c zlib.h zconf.h gzguts.h
49 infback.obj
: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
52 inffast.obj
: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
55 inflate.obj
: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
58 inftrees.obj
: inftrees.c zutil.h zlib.h zconf.h inftrees.h
60 trees.obj
: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
62 uncompr.obj
: uncompr.c zlib.h zconf.h
64 zutil.obj
: zutil.c zutil.h zlib.h zconf.h
66 example.obj
: test/example.c zlib.h zconf.h
68 minigzip.obj
: test/minigzip.c zlib.h zconf.h
71 # For the sake of the old Borland make,
72 # the command line is cut to fit in the MS-DOS 128 byte limit:
73 $(ZLIB_LIB
): $(OBJ1
) $(OBJ2
)
75 $(AR
) $(ZLIB_LIB
) $(OBJP1
)
76 $(AR
) $(ZLIB_LIB
) $(OBJP2
)
80 test: example.exe minigzip.exe
82 echo hello world | minigzip | minigzip
-d
84 example.exe
: example.obj
$(ZLIB_LIB
)
85 $(LD
) $(LDFLAGS
) example.obj
$(ZLIB_LIB
)
87 minigzip.exe
: minigzip.obj
$(ZLIB_LIB
)
88 $(LD
) $(LDFLAGS
) minigzip.obj
$(ZLIB_LIB
)