source: trunk/minix/lib/zlib-1.2.3/win32/Makefile.bor@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

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