3
|
1 # Makefile for zlib
|
|
2 # Borland C++ ************ UNTESTED ***********
|
|
3
|
|
4 # To use, do "make -fmakefile.bor"
|
|
5
|
|
6 # WARNING: the small model is supported but only for small values of
|
|
7 # MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
|
|
8 # requirements (default 256K for big objects plus a few K), you can add
|
|
9 # to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
|
|
10 # See zconf.h for details about the memory requirements.
|
|
11
|
|
12 # ------------- Turbo C++, Borland C++ -------------
|
|
13 MODEL=-ml
|
|
14 CFLAGS=-O2 -Z $(MODEL)
|
|
15 CC=bcc
|
|
16 LD=bcc
|
|
17 LIB=tlib
|
|
18 # replace bcc with tcc for Turbo C++ 1.0
|
|
19 LDFLAGS=$(MODEL)
|
|
20 O=.obj
|
|
21
|
|
22 # variables
|
|
23 OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
|
|
24 trees$(O)
|
|
25 OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\
|
|
26 trees$(O)
|
|
27 OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
|
|
28 infutil$(O) inffast$(O)
|
|
29 OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
|
|
30 infutil$(O)+inffast$(O)
|
|
31
|
|
32 all: test
|
|
33
|
|
34 adler32.obj: adler32.c zutil.h zlib.h zconf.h
|
|
35 $(CC) -c $(CFLAGS) $*.c
|
|
36
|
|
37 compress.obj: compress.c zlib.h zconf.h
|
|
38 $(CC) -c $(CFLAGS) $*.c
|
|
39
|
|
40 crc32.obj: crc32.c zutil.h zlib.h zconf.h
|
|
41 $(CC) -c $(CFLAGS) $*.c
|
|
42
|
|
43 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
|
|
44 $(CC) -c $(CFLAGS) $*.c
|
|
45
|
|
46 gzio.obj: gzio.c zutil.h zlib.h zconf.h
|
|
47 $(CC) -c $(CFLAGS) $*.c
|
|
48
|
|
49 infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
|
|
50 infcodes.h infutil.h
|
|
51 $(CC) -c $(CFLAGS) $*.c
|
|
52
|
|
53 infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
|
|
54 infcodes.h inffast.h
|
|
55 $(CC) -c $(CFLAGS) $*.c
|
|
56
|
|
57 inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
|
|
58 $(CC) -c $(CFLAGS) $*.c
|
|
59
|
|
60 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
|
|
61 $(CC) -c $(CFLAGS) $*.c
|
|
62
|
|
63 infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
|
|
64 $(CC) -c $(CFLAGS) $*.c
|
|
65
|
|
66 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
|
|
67 $(CC) -c $(CFLAGS) $*.c
|
|
68
|
|
69 trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
|
|
70 $(CC) -c $(CFLAGS) $*.c
|
|
71
|
|
72 uncompr.obj: uncompr.c zlib.h zconf.h
|
|
73 $(CC) -c $(CFLAGS) $*.c
|
|
74
|
|
75 zutil.obj: zutil.c zutil.h zlib.h zconf.h
|
|
76 $(CC) -c $(CFLAGS) $*.c
|
|
77
|
|
78 example.obj: example.c zlib.h zconf.h
|
|
79 $(CC) -c $(CFLAGS) $*.c
|
|
80
|
|
81 minigzip.obj: minigzip.c zlib.h zconf.h
|
|
82 $(CC) -c $(CFLAGS) $*.c
|
|
83
|
|
84 # we must cut the command line to fit in the MS/DOS 128 byte limit:
|
|
85 zlib.lib: $(OBJ1) $(OBJ2)
|
|
86 $(LIB) zlib +$(OBJP1)
|
|
87 $(LIB) zlib +$(OBJP2)
|
|
88
|
|
89 example.exe: example.obj zlib.lib
|
|
90 $(LD) $(LDFLAGS) example.obj zlib.lib
|
|
91
|
|
92 minigzip.exe: minigzip.obj zlib.lib
|
|
93 $(LD) $(LDFLAGS) minigzip.obj zlib.lib
|
|
94
|
|
95 test: example.exe minigzip.exe
|
|
96 example
|
|
97 echo hello world | minigzip | minigzip -d
|
|
98
|
|
99 #clean:
|
|
100 # del *.obj
|
|
101 # del *.exe
|