2 # Turbo C 2.01, Turbo C++ 1.01
3 # Last updated: 15-Mar-2003
5 # To use, do "make -fmakefile.tc"
6 # To compile in small model, set below: MODEL=s
8 # WARNING: the small model is supported but only for small values of
9 # MAX_WBITS and MAX_MEM_LEVEL. For example:
10 # -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
11 # If you wish to reduce the memory requirements (default 256K for big
12 # objects plus a few K), you can add to CFLAGS below:
13 # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
14 # See zconf.h for details about the memory requirements.
16 # ------------ Turbo C 2.01, Turbo C++ 1.01 ------------
21 # CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
22 CFLAGS=-O2 -G -Z -m$(MODEL)
23 LDFLAGS=-m$(MODEL) -f-
27 ZLIB_LIB = zlib_$(MODEL).lib
29 OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
30 OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
31 OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
32 OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
36 all: $(ZLIB_LIB) example.exe minigzip.exe
39 $(CC) -c $(CFLAGS) $*.c
41 adler32.obj: adler32.c zlib.h zconf.h
43 compress.obj: compress.c zlib.h zconf.h
45 crc32.obj: crc32.c zlib.h zconf.h crc32.h
47 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
49 gzio.obj: gzio.c zutil.h zlib.h zconf.h
51 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
54 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
57 inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
60 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
62 trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
64 uncompr.obj: uncompr.c zlib.h zconf.h
66 zutil.obj: zutil.c zutil.h zlib.h zconf.h
68 example.obj: example.c zlib.h zconf.h
70 minigzip.obj: minigzip.c zlib.h zconf.h
73 # the command line is cut to fit in the MS-DOS 128 byte limit:
74 $(ZLIB_LIB): $(OBJ1) $(OBJ2)
76 $(AR) $(ZLIB_LIB) $(OBJP1)
77 $(AR) $(ZLIB_LIB) $(OBJP2)
79 example.exe: example.obj $(ZLIB_LIB)
80 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
82 minigzip.exe: minigzip.obj $(ZLIB_LIB)
83 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
85 test: example.exe minigzip.exe
87 echo hello world | minigzip | minigzip -d