summaryrefslogtreecommitdiff
path: root/msdos/Makefile.bor
diff options
context:
space:
mode:
Diffstat (limited to 'msdos/Makefile.bor')
-rw-r--r--msdos/Makefile.bor86
1 files changed, 53 insertions, 33 deletions
diff --git a/msdos/Makefile.bor b/msdos/Makefile.bor
index 2116563..f5651b4 100644
--- a/msdos/Makefile.bor
+++ b/msdos/Makefile.bor
@@ -2,24 +2,40 @@
2# Borland C++ ************ UNTESTED *********** 2# Borland C++ ************ UNTESTED ***********
3 3
4# To use, do "make -fmakefile.bor" 4# To use, do "make -fmakefile.bor"
5# To compile in small model, set below: MODEL=-ms 5# To compile in small model, set below: MODEL=s
6 6
7# WARNING: the small model is supported but only for small values of 7# WARNING: the small model is supported but only for small values of
8# MAX_WBITS and MAX_MEM_LEVEL. For example: 8# MAX_WBITS and MAX_MEM_LEVEL. For example:
9# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 9# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
10# If you wish to reduce the memory requirements (default 256K for big 10# If you wish to reduce the memory requirements (default 256K for big
11# objects plus a few K), you can add to CFLAGS below: 11# objects plus a few K), you can add to the LOC macro below:
12# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 12# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
13# See zconf.h for details about the memory requirements. 13# See zconf.h for details about the memory requirements.
14 14
15# ------------- Turbo C++, Borland C++ ------------- 15# ------------- Turbo C++, Borland C++ -------------
16MODEL=-ml 16
17CFLAGS=-O2 -Z $(MODEL) 17# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
18# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
19# to the declaration of LOC here:
20LOC = $(LOCAL_ZLIB)
21
22# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
23CPU_TYP = 0
24
25# Memory model: one of s, m, c, l (small, medium, compact, large)
26MODEL=l
27
18CC=bcc 28CC=bcc
19LD=bcc
20LIB=tlib
21# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version 29# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version
22LDFLAGS=$(MODEL) 30LD=$(CC)
31AR=tlib
32
33# compiler flags
34CFLAGS=-O2 -Z -m$(MODEL) $(LOC)
35# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0
36
37LDFLAGS=-m$(MODEL)
38
23O=.obj 39O=.obj
24 40
25# variables 41# variables
@@ -32,69 +48,73 @@ OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
32OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ 48OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
33 infutil$(O)+inffast$(O) 49 infutil$(O)+inffast$(O)
34 50
51ZLIB_H = zlib.h zconf.h
52ZUTIL_H = zutil.h $(ZLIB_H)
53
54ZLIB_LIB = zlib_$(MODEL).lib
55
35all: test 56all: test
36 57
37adler32.obj: adler32.c zutil.h zlib.h zconf.h 58# individual dependencies and action rules:
59adler32.obj: adler32.c $(ZLIB_H)
38 $(CC) -c $(CFLAGS) $*.c 60 $(CC) -c $(CFLAGS) $*.c
39 61
40compress.obj: compress.c zlib.h zconf.h 62compress.obj: compress.c $(ZLIB_H)
41 $(CC) -c $(CFLAGS) $*.c 63 $(CC) -c $(CFLAGS) $*.c
42 64
43crc32.obj: crc32.c zutil.h zlib.h zconf.h 65crc32.obj: crc32.c $(ZLIB_H)
44 $(CC) -c $(CFLAGS) $*.c 66 $(CC) -c $(CFLAGS) $*.c
45 67
46deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h 68deflate.obj: deflate.c deflate.h $(ZUTIL_H)
47 $(CC) -c $(CFLAGS) $*.c 69 $(CC) -c $(CFLAGS) $*.c
48 70
49gzio.obj: gzio.c zutil.h zlib.h zconf.h 71gzio.obj: gzio.c $(ZUTIL_H)
50 $(CC) -c $(CFLAGS) $*.c 72 $(CC) -c $(CFLAGS) $*.c
51 73
52infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ 74infblock.obj: infblock.c $(ZUTIL_H) infblock.h inftrees.h infcodes.h infutil.h
53 infcodes.h infutil.h
54 $(CC) -c $(CFLAGS) $*.c 75 $(CC) -c $(CFLAGS) $*.c
55 76
56infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ 77infcodes.obj: infcodes.c $(ZUTIL_H) inftrees.h infutil.h infcodes.h inffast.h
57 infcodes.h inffast.h
58 $(CC) -c $(CFLAGS) $*.c 78 $(CC) -c $(CFLAGS) $*.c
59 79
60inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h 80inflate.obj: inflate.c $(ZUTIL_H) infblock.h
61 $(CC) -c $(CFLAGS) $*.c 81 $(CC) -c $(CFLAGS) $*.c
62 82
63inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h 83inftrees.obj: inftrees.c $(ZUTIL_H) inftrees.h
64 $(CC) -c $(CFLAGS) $*.c 84 $(CC) -c $(CFLAGS) $*.c
65 85
66infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h 86infutil.obj: infutil.c $(ZUTIL_H) inftrees.h infutil.h
67 $(CC) -c $(CFLAGS) $*.c 87 $(CC) -c $(CFLAGS) $*.c
68 88
69inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h 89inffast.obj: inffast.c $(ZUTIL_H) inftrees.h infutil.h inffast.h
70 $(CC) -c $(CFLAGS) $*.c 90 $(CC) -c $(CFLAGS) $*.c
71 91
72trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h 92trees.obj: trees.c deflate.h $(ZUTIL_H)
73 $(CC) -c $(CFLAGS) $*.c 93 $(CC) -c $(CFLAGS) $*.c
74 94
75uncompr.obj: uncompr.c zlib.h zconf.h 95uncompr.obj: uncompr.c $(ZLIB_H)
76 $(CC) -c $(CFLAGS) $*.c 96 $(CC) -c $(CFLAGS) $*.c
77 97
78zutil.obj: zutil.c zutil.h zlib.h zconf.h 98zutil.obj: zutil.c $(ZUTIL_H)
79 $(CC) -c $(CFLAGS) $*.c 99 $(CC) -c $(CFLAGS) $*.c
80 100
81example.obj: example.c zlib.h zconf.h 101example.obj: example.c $(ZLIB_H)
82 $(CC) -c $(CFLAGS) $*.c 102 $(CC) -c $(CFLAGS) $*.c
83 103
84minigzip.obj: minigzip.c zlib.h zconf.h 104minigzip.obj: minigzip.c $(ZLIB_H)
85 $(CC) -c $(CFLAGS) $*.c 105 $(CC) -c $(CFLAGS) $*.c
86 106
87# we must cut the command line to fit in the MS/DOS 128 byte limit: 107# we must cut the command line to fit in the MS/DOS 128 byte limit:
88zlib.lib: $(OBJ1) $(OBJ2) 108$(ZLIB_LIB): $(OBJ1) $(OBJ2)
89 del zlib.lib 109 del $(ZLIB_LIB)
90 $(LIB) zlib +$(OBJP1) 110 $(AR) $(ZLIB_LIB) +$(OBJP1)
91 $(LIB) zlib +$(OBJP2) 111 $(AR) $(ZLIB_LIB) +$(OBJP2)
92 112
93example.exe: example.obj zlib.lib 113example.exe: example.obj $(ZLIB_LIB)
94 $(LD) $(LDFLAGS) example.obj zlib.lib 114 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
95 115
96minigzip.exe: minigzip.obj zlib.lib 116minigzip.exe: minigzip.obj $(ZLIB_LIB)
97 $(LD) $(LDFLAGS) minigzip.obj zlib.lib 117 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
98 118
99test: example.exe minigzip.exe 119test: example.exe minigzip.exe
100 example 120 example