diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:20:29 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:20:29 -0700 |
commit | 14763ac7c6c03bca62c39e35c03cf5bfc7728802 (patch) | |
tree | f1055d11ef7b282b698ce7c40e1a9c061413cbdf /msdos/Makefile.bor | |
parent | c34c1fcbb19852ca35216ad66276f4f86af3fc22 (diff) | |
download | zlib-1.1.3.tar.gz zlib-1.1.3.tar.bz2 zlib-1.1.3.zip |
zlib 1.1.3v1.1.3
Diffstat (limited to 'msdos/Makefile.bor')
-rw-r--r-- | msdos/Makefile.bor | 86 |
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++ ------------- |
16 | MODEL=-ml | 16 | |
17 | CFLAGS=-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: | ||
20 | LOC = $(LOCAL_ZLIB) | ||
21 | |||
22 | # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. | ||
23 | CPU_TYP = 0 | ||
24 | |||
25 | # Memory model: one of s, m, c, l (small, medium, compact, large) | ||
26 | MODEL=l | ||
27 | |||
18 | CC=bcc | 28 | CC=bcc |
19 | LD=bcc | ||
20 | LIB=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 |
22 | LDFLAGS=$(MODEL) | 30 | LD=$(CC) |
31 | AR=tlib | ||
32 | |||
33 | # compiler flags | ||
34 | CFLAGS=-O2 -Z -m$(MODEL) $(LOC) | ||
35 | # replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0 | ||
36 | |||
37 | LDFLAGS=-m$(MODEL) | ||
38 | |||
23 | O=.obj | 39 | O=.obj |
24 | 40 | ||
25 | # variables | 41 | # variables |
@@ -32,69 +48,73 @@ OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | |||
32 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | 48 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ |
33 | infutil$(O)+inffast$(O) | 49 | infutil$(O)+inffast$(O) |
34 | 50 | ||
51 | ZLIB_H = zlib.h zconf.h | ||
52 | ZUTIL_H = zutil.h $(ZLIB_H) | ||
53 | |||
54 | ZLIB_LIB = zlib_$(MODEL).lib | ||
55 | |||
35 | all: test | 56 | all: test |
36 | 57 | ||
37 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | 58 | # individual dependencies and action rules: |
59 | adler32.obj: adler32.c $(ZLIB_H) | ||
38 | $(CC) -c $(CFLAGS) $*.c | 60 | $(CC) -c $(CFLAGS) $*.c |
39 | 61 | ||
40 | compress.obj: compress.c zlib.h zconf.h | 62 | compress.obj: compress.c $(ZLIB_H) |
41 | $(CC) -c $(CFLAGS) $*.c | 63 | $(CC) -c $(CFLAGS) $*.c |
42 | 64 | ||
43 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | 65 | crc32.obj: crc32.c $(ZLIB_H) |
44 | $(CC) -c $(CFLAGS) $*.c | 66 | $(CC) -c $(CFLAGS) $*.c |
45 | 67 | ||
46 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | 68 | deflate.obj: deflate.c deflate.h $(ZUTIL_H) |
47 | $(CC) -c $(CFLAGS) $*.c | 69 | $(CC) -c $(CFLAGS) $*.c |
48 | 70 | ||
49 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | 71 | gzio.obj: gzio.c $(ZUTIL_H) |
50 | $(CC) -c $(CFLAGS) $*.c | 72 | $(CC) -c $(CFLAGS) $*.c |
51 | 73 | ||
52 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | 74 | infblock.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 | ||
56 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | 77 | infcodes.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 | ||
60 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | 80 | inflate.obj: inflate.c $(ZUTIL_H) infblock.h |
61 | $(CC) -c $(CFLAGS) $*.c | 81 | $(CC) -c $(CFLAGS) $*.c |
62 | 82 | ||
63 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | 83 | inftrees.obj: inftrees.c $(ZUTIL_H) inftrees.h |
64 | $(CC) -c $(CFLAGS) $*.c | 84 | $(CC) -c $(CFLAGS) $*.c |
65 | 85 | ||
66 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | 86 | infutil.obj: infutil.c $(ZUTIL_H) inftrees.h infutil.h |
67 | $(CC) -c $(CFLAGS) $*.c | 87 | $(CC) -c $(CFLAGS) $*.c |
68 | 88 | ||
69 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | 89 | inffast.obj: inffast.c $(ZUTIL_H) inftrees.h infutil.h inffast.h |
70 | $(CC) -c $(CFLAGS) $*.c | 90 | $(CC) -c $(CFLAGS) $*.c |
71 | 91 | ||
72 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | 92 | trees.obj: trees.c deflate.h $(ZUTIL_H) |
73 | $(CC) -c $(CFLAGS) $*.c | 93 | $(CC) -c $(CFLAGS) $*.c |
74 | 94 | ||
75 | uncompr.obj: uncompr.c zlib.h zconf.h | 95 | uncompr.obj: uncompr.c $(ZLIB_H) |
76 | $(CC) -c $(CFLAGS) $*.c | 96 | $(CC) -c $(CFLAGS) $*.c |
77 | 97 | ||
78 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 98 | zutil.obj: zutil.c $(ZUTIL_H) |
79 | $(CC) -c $(CFLAGS) $*.c | 99 | $(CC) -c $(CFLAGS) $*.c |
80 | 100 | ||
81 | example.obj: example.c zlib.h zconf.h | 101 | example.obj: example.c $(ZLIB_H) |
82 | $(CC) -c $(CFLAGS) $*.c | 102 | $(CC) -c $(CFLAGS) $*.c |
83 | 103 | ||
84 | minigzip.obj: minigzip.c zlib.h zconf.h | 104 | minigzip.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: |
88 | zlib.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 | ||
93 | example.exe: example.obj zlib.lib | 113 | example.exe: example.obj $(ZLIB_LIB) |
94 | $(LD) $(LDFLAGS) example.obj zlib.lib | 114 | $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) |
95 | 115 | ||
96 | minigzip.exe: minigzip.obj zlib.lib | 116 | minigzip.exe: minigzip.obj $(ZLIB_LIB) |
97 | $(LD) $(LDFLAGS) minigzip.obj zlib.lib | 117 | $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) |
98 | 118 | ||
99 | test: example.exe minigzip.exe | 119 | test: example.exe minigzip.exe |
100 | example | 120 | example |