summaryrefslogtreecommitdiff
path: root/win32/Makefile.bor
diff options
context:
space:
mode:
Diffstat (limited to 'win32/Makefile.bor')
-rw-r--r--win32/Makefile.bor52
1 files changed, 34 insertions, 18 deletions
diff --git a/win32/Makefile.bor b/win32/Makefile.bor
index f1a1c46..b802519 100644
--- a/win32/Makefile.bor
+++ b/win32/Makefile.bor
@@ -1,37 +1,48 @@
1# Makefile for zlib 1# Makefile for zlib
2# Borland C++ for Win32 2# Borland C++ for Win32
3# Updated for zlib-1.2.x by Cosmin Truta, 11-Mar-2003. 3#
4 4# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003
5# Usage: "make -f win32/makefile.bor" 5# Last updated: 28-Aug-2003
6 6#
7# ------------ Borland C++ for Win32 ------------ 7# Usage:
8 8# make -f win32/Makefile.bor
9# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) 9# make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
10# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added 10
11# to the declaration of LOC here: 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:
12LOC = $(LOCAL_ZLIB) 16LOC = $(LOCAL_ZLIB)
13 17
14CC = bcc32 18CC = bcc32
19AS = bcc32
15LD = bcc32 20LD = bcc32
16AR = tlib 21AR = tlib
17CFLAGS = -O2 -d -k- $(LOC) 22CFLAGS = -a -d -k- -O2 $(LOC)
23ASFLAGS = $(LOC)
18LDFLAGS = $(LOC) 24LDFLAGS = $(LOC)
19 25
20 26
21# variables 27# variables
22ZLIB_LIB = zlib.lib 28ZLIB_LIB = zlib.lib
23 29
24OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj 30OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
25OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj 31OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
32#OBJA =
26OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj 33OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
27OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj 34OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
35#OBJPA=
28 36
29 37
30# targets 38# targets
31all: $(ZLIB_LIB) example.exe minigzip.exe 39all: $(ZLIB_LIB) example.exe minigzip.exe
32 40
33.c.obj: 41.c.obj:
34 $(CC) -c $(CFLAGS) $*.c 42 $(CC) -c $(CFLAGS) $<
43
44.asm.obj:
45 $(AS) -c $(ASFLAGS) $<
35 46
36adler32.obj: adler32.c zlib.h zconf.h 47adler32.obj: adler32.c zlib.h zconf.h
37 48
@@ -67,10 +78,17 @@ minigzip.obj: minigzip.c zlib.h zconf.h
67 78
68# For the sake of the old Borland make, 79# For the sake of the old Borland make,
69# the command line is cut to fit in the MS-DOS 128 byte limit: 80# the command line is cut to fit in the MS-DOS 128 byte limit:
70$(ZLIB_LIB): $(OBJ1) $(OBJ2) 81$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
71 -del $(ZLIB_LIB) 82 -del $(ZLIB_LIB)
72 $(AR) $(ZLIB_LIB) $(OBJP1) 83 $(AR) $(ZLIB_LIB) $(OBJP1)
73 $(AR) $(ZLIB_LIB) $(OBJP2) 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
74 92
75example.exe: example.obj $(ZLIB_LIB) 93example.exe: example.obj $(ZLIB_LIB)
76 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) 94 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
@@ -78,14 +96,12 @@ example.exe: example.obj $(ZLIB_LIB)
78minigzip.exe: minigzip.obj $(ZLIB_LIB) 96minigzip.exe: minigzip.obj $(ZLIB_LIB)
79 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) 97 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
80 98
81test: example.exe minigzip.exe
82 example
83 echo hello world | minigzip | minigzip -d
84 99
100# cleanup
85clean: 101clean:
86 -del *.obj 102 -del *.obj
87 -del *.exe
88 -del *.lib 103 -del *.lib
104 -del *.exe
89 -del *.tds 105 -del *.tds
90 -del zlib.bak 106 -del zlib.bak
91 -del foo.gz 107 -del foo.gz