]> git.lizzy.rs Git - zlib.git/blob - win32/Makefile.bor
zlib 1.2.3.5
[zlib.git] / win32 / Makefile.bor
1 # Makefile for zlib
2 # Borland C++ for Win32
3 #
4 # Usage:
5 #  make -f win32/Makefile.bor
6 #  make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
7
8 # ------------ Borland C++ ------------
9
10 # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
11 # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
12 # added to the declaration of LOC here:
13 LOC = $(LOCAL_ZLIB)
14
15 CC = bcc32
16 AS = bcc32
17 LD = bcc32
18 AR = tlib
19 CFLAGS  = -a -d -k- -O2 $(LOC)
20 ASFLAGS = $(LOC)
21 LDFLAGS = $(LOC)
22
23
24 # variables
25 ZLIB_LIB = zlib.lib
26
27 OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzio.obj gzlib.obj gzread.obj
28 OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
29 #OBJA =
30 OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzio.obj+gzlib.obj+gzread.obj
31 OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
32 #OBJPA=
33
34
35 # targets
36 all: $(ZLIB_LIB) example.exe minigzip.exe
37
38 .c.obj:
39         $(CC) -c $(CFLAGS) $<
40
41 .asm.obj:
42         $(AS) -c $(ASFLAGS) $<
43
44 adler32.obj: adler32.c zlib.h zconf.h
45
46 compress.obj: compress.c zlib.h zconf.h
47
48 crc32.obj: crc32.c zlib.h zconf.h crc32.h
49
50 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
51
52 gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
53
54 gzio.obj: gzio.c zutil.h zlib.h zconf.h
55
56 gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
57
58 gzread.obj: gzread.c zlib.h zconf.h gzguts.h
59
60 gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
61
62 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
63  inffast.h inffixed.h
64
65 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
66  inffast.h
67
68 inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
69  inffast.h inffixed.h
70
71 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
72
73 trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
74
75 uncompr.obj: uncompr.c zlib.h zconf.h
76
77 zutil.obj: zutil.c zutil.h zlib.h zconf.h
78
79 example.obj: example.c zlib.h zconf.h
80
81 minigzip.obj: minigzip.c zlib.h zconf.h
82
83
84 # For the sake of the old Borland make,
85 # the command line is cut to fit in the MS-DOS 128 byte limit:
86 $(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
87         -del $(ZLIB_LIB)
88         $(AR) $(ZLIB_LIB) $(OBJP1)
89         $(AR) $(ZLIB_LIB) $(OBJP2)
90         $(AR) $(ZLIB_LIB) $(OBJPA)
91
92
93 # testing
94 test: example.exe minigzip.exe
95         example
96         echo hello world | minigzip | minigzip -d
97
98 example.exe: example.obj $(ZLIB_LIB)
99         $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
100
101 minigzip.exe: minigzip.obj $(ZLIB_LIB)
102         $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
103
104
105 # cleanup
106 clean:
107         -del $(ZLIB_LIB)
108         -del *.obj
109         -del *.exe
110         -del *.tds
111         -del zlib.bak
112         -del foo.gz