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 | |
parent | c34c1fcbb19852ca35216ad66276f4f86af3fc22 (diff) | |
download | zlib-14763ac7c6c03bca62c39e35c03cf5bfc7728802.tar.gz zlib-14763ac7c6c03bca62c39e35c03cf5bfc7728802.tar.bz2 zlib-14763ac7c6c03bca62c39e35c03cf5bfc7728802.zip |
zlib 1.1.3v1.1.3
Diffstat (limited to 'msdos')
-rw-r--r-- | msdos/Makefile.b32 | 4 | ||||
-rw-r--r-- | msdos/Makefile.bor | 86 | ||||
-rw-r--r-- | msdos/Makefile.emx | 69 | ||||
-rw-r--r-- | msdos/Makefile.msc | 114 | ||||
-rw-r--r-- | msdos/Makefile.tc | 67 | ||||
-rw-r--r-- | msdos/Makefile.w32 | 4 | ||||
-rw-r--r-- | msdos/Makefile.wat | 4 | ||||
-rw-r--r-- | msdos/zlib.def | 2 | ||||
-rw-r--r-- | msdos/zlib.rc | 6 |
9 files changed, 234 insertions, 122 deletions
diff --git a/msdos/Makefile.b32 b/msdos/Makefile.b32 index fc3ac68..f476da9 100644 --- a/msdos/Makefile.b32 +++ b/msdos/Makefile.b32 | |||
@@ -33,13 +33,13 @@ OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | |||
33 | 33 | ||
34 | all: test | 34 | all: test |
35 | 35 | ||
36 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | 36 | adler32.obj: adler32.c zlib.h zconf.h |
37 | $(CC) -c $(CFLAGS) $*.c | 37 | $(CC) -c $(CFLAGS) $*.c |
38 | 38 | ||
39 | compress.obj: compress.c zlib.h zconf.h | 39 | compress.obj: compress.c zlib.h zconf.h |
40 | $(CC) -c $(CFLAGS) $*.c | 40 | $(CC) -c $(CFLAGS) $*.c |
41 | 41 | ||
42 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | 42 | crc32.obj: crc32.c zlib.h zconf.h |
43 | $(CC) -c $(CFLAGS) $*.c | 43 | $(CC) -c $(CFLAGS) $*.c |
44 | 44 | ||
45 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | 45 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h |
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 |
diff --git a/msdos/Makefile.emx b/msdos/Makefile.emx new file mode 100644 index 0000000..0e5e5cc --- /dev/null +++ b/msdos/Makefile.emx | |||
@@ -0,0 +1,69 @@ | |||
1 | # Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98. | ||
2 | # Copyright (C) 1995-1998 Jean-loup Gailly. | ||
3 | # For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | |||
5 | # To compile, or to compile and test, type: | ||
6 | # | ||
7 | # make -fmakefile.emx; make test -fmakefile.emx | ||
8 | # | ||
9 | |||
10 | CC=gcc | ||
11 | |||
12 | #CFLAGS=-MMD -O | ||
13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
14 | #CFLAGS=-MMD -g -DDEBUG | ||
15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
16 | -Wstrict-prototypes -Wmissing-prototypes | ||
17 | |||
18 | # If cp.exe is available, replace "copy /Y" with "cp -fp" . | ||
19 | CP=copy /Y | ||
20 | # If gnu install.exe is available, replace $(CP) with ginstall. | ||
21 | INSTALL=$(CP) | ||
22 | # The default value of RM is "rm -f." If "rm.exe" is found, comment out: | ||
23 | RM=del | ||
24 | LDLIBS=-L. -lzlib | ||
25 | LD=$(CC) -s -o | ||
26 | LDSHARED=$(CC) | ||
27 | |||
28 | INCL=zlib.h zconf.h | ||
29 | LIBS=zlib.a | ||
30 | |||
31 | AR=ar rcs | ||
32 | |||
33 | prefix=/usr/local | ||
34 | exec_prefix = $(prefix) | ||
35 | |||
36 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
37 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
38 | |||
39 | TEST_OBJS = example.o minigzip.o | ||
40 | |||
41 | all: example.exe minigzip.exe | ||
42 | |||
43 | test: all | ||
44 | ./example | ||
45 | echo hello world | .\minigzip | .\minigzip -d | ||
46 | |||
47 | %.o : %.c | ||
48 | $(CC) $(CFLAGS) -c $< -o $@ | ||
49 | |||
50 | zlib.a: $(OBJS) | ||
51 | $(AR) $@ $(OBJS) | ||
52 | |||
53 | %.exe : %.o $(LIBS) | ||
54 | $(LD) $@ $< $(LDLIBS) | ||
55 | |||
56 | |||
57 | .PHONY : clean | ||
58 | |||
59 | clean: | ||
60 | $(RM) *.d | ||
61 | $(RM) *.o | ||
62 | $(RM) *.exe | ||
63 | $(RM) zlib.a | ||
64 | $(RM) foo.gz | ||
65 | |||
66 | DEPS := $(wildcard *.d) | ||
67 | ifneq ($(DEPS),) | ||
68 | include $(DEPS) | ||
69 | endif | ||
diff --git a/msdos/Makefile.msc b/msdos/Makefile.msc index 1a6d663..562201d 100644 --- a/msdos/Makefile.msc +++ b/msdos/Makefile.msc | |||
@@ -2,20 +2,36 @@ | |||
2 | # Microsoft C 5.1 or later | 2 | # Microsoft C 5.1 or later |
3 | 3 | ||
4 | # To use, do "make makefile.msc" | 4 | # To use, do "make makefile.msc" |
5 | # To compile in small model, set below: MODEL=-AS | 5 | # To compile in small model, set below: MODEL=S |
6 | 6 | ||
7 | # If you wish to reduce the memory requirements (default 256K for big | 7 | # If you wish to reduce the memory requirements (default 256K for big |
8 | # objects plus a few K), you can add to CFLAGS below: | 8 | # objects plus a few K), you can add to the LOC macro below: |
9 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | 9 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 |
10 | # See zconf.h for details about the memory requirements. | 10 | # See zconf.h for details about the memory requirements. |
11 | 11 | ||
12 | # ------------- Microsoft C 5.1 and later ------------- | 12 | # ------------- Microsoft C 5.1 and later ------------- |
13 | MODEL=-AL | 13 | |
14 | CFLAGS=-Oait -Gs -nologo -W3 $(MODEL) | 14 | # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) |
15 | #-Ox generates bad code with MSC 5.1 | 15 | # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added |
16 | # to the declaration of LOC here: | ||
17 | LOC = $(LOCAL_ZLIB) | ||
18 | |||
19 | # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. | ||
20 | CPU_TYP = 0 | ||
21 | |||
22 | # Memory model: one of S, M, C, L (small, medium, compact, large) | ||
23 | MODEL=L | ||
24 | |||
16 | CC=cl | 25 | CC=cl |
26 | CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC) | ||
27 | #-Ox generates bad code with MSC 5.1 | ||
28 | LIB_CFLAGS=-Zl $(CFLAGS) | ||
29 | |||
17 | LD=link | 30 | LD=link |
18 | LDFLAGS=/e/st:0x1500/noe | 31 | LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode |
32 | # "/farcall/packcode" are only useful for `large code' memory models | ||
33 | # but should be a "no-op" for small code models. | ||
34 | |||
19 | O=.obj | 35 | O=.obj |
20 | 36 | ||
21 | # variables | 37 | # variables |
@@ -28,69 +44,73 @@ OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | |||
28 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | 44 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ |
29 | infutil$(O)+inffast$(O) | 45 | infutil$(O)+inffast$(O) |
30 | 46 | ||
31 | all: zlib.lib example.exe minigzip.exe | 47 | ZLIB_H = zlib.h zconf.h |
48 | ZUTIL_H = zutil.h $(ZLIB_H) | ||
32 | 49 | ||
33 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | 50 | ZLIB_LIB = zlib_$(MODEL).lib |
34 | $(CC) -c $(CFLAGS) $*.c | ||
35 | 51 | ||
36 | compress.obj: compress.c zlib.h zconf.h | 52 | all: $(ZLIB_LIB) example.exe minigzip.exe |
37 | $(CC) -c $(CFLAGS) $*.c | ||
38 | 53 | ||
39 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | 54 | # individual dependencies and action rules: |
40 | $(CC) -c $(CFLAGS) $*.c | 55 | adler32.obj: adler32.c $(ZLIB_H) |
56 | $(CC) -c $(LIB_CFLAGS) $*.c | ||
41 | 57 | ||
42 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | 58 | compress.obj: compress.c $(ZLIB_H) |
43 | $(CC) -c $(CFLAGS) $*.c | 59 | $(CC) -c $(LIB_CFLAGS) $*.c |
44 | 60 | ||
45 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | 61 | crc32.obj: crc32.c $(ZLIB_H) |
46 | $(CC) -c $(CFLAGS) $*.c | 62 | $(CC) -c $(LIB_CFLAGS) $*.c |
47 | 63 | ||
48 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | 64 | deflate.obj: deflate.c deflate.h $(ZUTIL_H) |
49 | infcodes.h infutil.h | 65 | $(CC) -c $(LIB_CFLAGS) $*.c |
50 | $(CC) -c $(CFLAGS) $*.c | ||
51 | 66 | ||
52 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | 67 | gzio.obj: gzio.c $(ZUTIL_H) |
53 | infcodes.h inffast.h | 68 | $(CC) -c $(LIB_CFLAGS) $*.c |
54 | $(CC) -c $(CFLAGS) $*.c | ||
55 | 69 | ||
56 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | 70 | infblock.obj: infblock.c $(ZUTIL_H) infblock.h inftrees.h infcodes.h infutil.h |
57 | $(CC) -c $(CFLAGS) $*.c | 71 | $(CC) -c $(LIB_CFLAGS) $*.c |
58 | 72 | ||
59 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | 73 | infcodes.obj: infcodes.c $(ZUTIL_H) inftrees.h infutil.h infcodes.h inffast.h |
60 | $(CC) -c $(CFLAGS) $*.c | 74 | $(CC) -c $(LIB_CFLAGS) $*.c |
61 | 75 | ||
62 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | 76 | inflate.obj: inflate.c $(ZUTIL_H) infblock.h |
63 | $(CC) -c $(CFLAGS) $*.c | 77 | $(CC) -c $(LIB_CFLAGS) $*.c |
64 | 78 | ||
65 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | 79 | inftrees.obj: inftrees.c $(ZUTIL_H) inftrees.h |
66 | $(CC) -c $(CFLAGS) $*.c | 80 | $(CC) -c $(LIB_CFLAGS) $*.c |
67 | 81 | ||
68 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | 82 | infutil.obj: infutil.c $(ZUTIL_H) inftrees.h infutil.h |
69 | $(CC) -c $(CFLAGS) $*.c | 83 | $(CC) -c $(LIB_CFLAGS) $*.c |
70 | 84 | ||
71 | uncompr.obj: uncompr.c zlib.h zconf.h | 85 | inffast.obj: inffast.c $(ZUTIL_H) inftrees.h infutil.h inffast.h |
72 | $(CC) -c $(CFLAGS) $*.c | 86 | $(CC) -c $(LIB_CFLAGS) $*.c |
73 | 87 | ||
74 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 88 | trees.obj: trees.c deflate.h $(ZUTIL_H) |
75 | $(CC) -c $(CFLAGS) $*.c | 89 | $(CC) -c $(LIB_CFLAGS) $*.c |
90 | |||
91 | uncompr.obj: uncompr.c $(ZLIB_H) | ||
92 | $(CC) -c $(LIB_CFLAGS) $*.c | ||
93 | |||
94 | zutil.obj: zutil.c $(ZUTIL_H) | ||
95 | $(CC) -c $(LIB_CFLAGS) $*.c | ||
76 | 96 | ||
77 | example.obj: example.c zlib.h zconf.h | 97 | example.obj: example.c $(ZLIB_H) |
78 | $(CC) -c $(CFLAGS) $*.c | 98 | $(CC) -c $(CFLAGS) $*.c |
79 | 99 | ||
80 | minigzip.obj: minigzip.c zlib.h zconf.h | 100 | minigzip.obj: minigzip.c $(ZLIB_H) |
81 | $(CC) -c $(CFLAGS) $*.c | 101 | $(CC) -c $(CFLAGS) $*.c |
82 | 102 | ||
83 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | 103 | # we must cut the command line to fit in the MS/DOS 128 byte limit: |
84 | zlib.lib: $(OBJ1) $(OBJ2) | 104 | $(ZLIB_LIB): $(OBJ1) $(OBJ2) |
85 | if exist zlib.lib del zlib.lib | 105 | if exist $(ZLIB_LIB) del $(ZLIB_LIB) |
86 | lib zlib $(OBJ1); | 106 | lib $(ZLIB_LIB) $(OBJ1); |
87 | lib zlib $(OBJ2); | 107 | lib $(ZLIB_LIB) $(OBJ2); |
88 | 108 | ||
89 | example.exe: example.obj zlib.lib | 109 | example.exe: example.obj $(ZLIB_LIB) |
90 | $(LD) $(LDFLAGS) example.obj,,,zlib.lib; | 110 | $(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB); |
91 | 111 | ||
92 | minigzip.exe: minigzip.obj zlib.lib | 112 | minigzip.exe: minigzip.obj $(ZLIB_LIB) |
93 | $(LD) $(LDFLAGS) minigzip.obj,,,zlib.lib; | 113 | $(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB); |
94 | 114 | ||
95 | test: example.exe minigzip.exe | 115 | test: example.exe minigzip.exe |
96 | example | 116 | example |
diff --git a/msdos/Makefile.tc b/msdos/Makefile.tc index a46ce73..63e0550 100644 --- a/msdos/Makefile.tc +++ b/msdos/Makefile.tc | |||
@@ -8,18 +8,18 @@ | |||
8 | # MAX_WBITS and MAX_MEM_LEVEL. For example: | 8 | # MAX_WBITS and MAX_MEM_LEVEL. For example: |
9 | # -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 | 9 | # -DMAX_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 CFLAGS 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 2.0 ------------- | 15 | # ------------- Turbo C 2.0 ------------- |
16 | MODEL=-ml | 16 | MODEL=l |
17 | # CFLAGS=-O2 -G -Z $(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 | 17 | # CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 |
18 | CFLAGS=-O2 -G -Z $(MODEL) | 18 | CFLAGS=-O2 -G -Z -m$(MODEL) |
19 | CC=tcc -I\tc\include | 19 | CC=tcc -I\tc\include |
20 | LD=tcc -L\tc\lib | 20 | LD=tcc -L\tc\lib |
21 | LIB=tlib | 21 | AR=tlib |
22 | LDFLAGS=$(MODEL) -f- | 22 | LDFLAGS=-m$(MODEL) -f- |
23 | O=.obj | 23 | O=.obj |
24 | 24 | ||
25 | # variables | 25 | # variables |
@@ -32,69 +32,72 @@ OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | |||
32 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | 32 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ |
33 | infutil$(O)+inffast$(O) | 33 | infutil$(O)+inffast$(O) |
34 | 34 | ||
35 | ZLIB_H = zlib.h zconf.h | ||
36 | ZUTIL_H = zutil.h $(ZLIB_H) | ||
37 | |||
38 | ZLIB_LIB = zlib_$(MODEL).lib | ||
39 | |||
35 | all: test | 40 | all: test |
36 | 41 | ||
37 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | 42 | adler32.obj: adler32.c $(ZLIB_H) |
38 | $(CC) -c $(CFLAGS) $*.c | 43 | $(CC) -c $(CFLAGS) $*.c |
39 | 44 | ||
40 | compress.obj: compress.c zlib.h zconf.h | 45 | compress.obj: compress.c $(ZLIB_H) |
41 | $(CC) -c $(CFLAGS) $*.c | 46 | $(CC) -c $(CFLAGS) $*.c |
42 | 47 | ||
43 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | 48 | crc32.obj: crc32.c $(ZLIB_H) |
44 | $(CC) -c $(CFLAGS) $*.c | 49 | $(CC) -c $(CFLAGS) $*.c |
45 | 50 | ||
46 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | 51 | deflate.obj: deflate.c deflate.h $(ZUTIL_H) |
47 | $(CC) -c $(CFLAGS) $*.c | 52 | $(CC) -c $(CFLAGS) $*.c |
48 | 53 | ||
49 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | 54 | gzio.obj: gzio.c $(ZUTIL_H) |
50 | $(CC) -c $(CFLAGS) $*.c | 55 | $(CC) -c $(CFLAGS) $*.c |
51 | 56 | ||
52 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | 57 | infblock.obj: infblock.c $(ZUTIL_H) infblock.h inftrees.h infcodes.h infutil.h |
53 | infcodes.h infutil.h | ||
54 | $(CC) -c $(CFLAGS) $*.c | 58 | $(CC) -c $(CFLAGS) $*.c |
55 | 59 | ||
56 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | 60 | infcodes.obj: infcodes.c $(ZUTIL_H) inftrees.h infutil.h infcodes.h inffast.h |
57 | infcodes.h inffast.h | ||
58 | $(CC) -c $(CFLAGS) $*.c | 61 | $(CC) -c $(CFLAGS) $*.c |
59 | 62 | ||
60 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | 63 | inflate.obj: inflate.c $(ZUTIL_H) infblock.h |
61 | $(CC) -c $(CFLAGS) $*.c | 64 | $(CC) -c $(CFLAGS) $*.c |
62 | 65 | ||
63 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | 66 | inftrees.obj: inftrees.c $(ZUTIL_H) inftrees.h |
64 | $(CC) -c $(CFLAGS) $*.c | 67 | $(CC) -c $(CFLAGS) $*.c |
65 | 68 | ||
66 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | 69 | infutil.obj: infutil.c $(ZUTIL_H) inftrees.h infutil.h |
67 | $(CC) -c $(CFLAGS) $*.c | 70 | $(CC) -c $(CFLAGS) $*.c |
68 | 71 | ||
69 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | 72 | inffast.obj: inffast.c $(ZUTIL_H) inftrees.h infutil.h inffast.h |
70 | $(CC) -c $(CFLAGS) $*.c | 73 | $(CC) -c $(CFLAGS) $*.c |
71 | 74 | ||
72 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | 75 | trees.obj: trees.c deflate.h $(ZUTIL_H) |
73 | $(CC) -c $(CFLAGS) $*.c | 76 | $(CC) -c $(CFLAGS) $*.c |
74 | 77 | ||
75 | uncompr.obj: uncompr.c zlib.h zconf.h | 78 | uncompr.obj: uncompr.c $(ZLIB_H) |
76 | $(CC) -c $(CFLAGS) $*.c | 79 | $(CC) -c $(CFLAGS) $*.c |
77 | 80 | ||
78 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 81 | zutil.obj: zutil.c $(ZUTIL_H) |
79 | $(CC) -c $(CFLAGS) $*.c | 82 | $(CC) -c $(CFLAGS) $*.c |
80 | 83 | ||
81 | example.obj: example.c zlib.h zconf.h | 84 | example.obj: example.c $(ZLIB_H) |
82 | $(CC) -c $(CFLAGS) $*.c | 85 | $(CC) -c $(CFLAGS) $*.c |
83 | 86 | ||
84 | minigzip.obj: minigzip.c zlib.h zconf.h | 87 | minigzip.obj: minigzip.c $(ZLIB_H) |
85 | $(CC) -c $(CFLAGS) $*.c | 88 | $(CC) -c $(CFLAGS) $*.c |
86 | 89 | ||
87 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | 90 | # we must cut the command line to fit in the MS/DOS 128 byte limit: |
88 | zlib.lib: $(OBJ1) $(OBJ2) | 91 | $(ZLIB_LIB): $(OBJ1) $(OBJ2) |
89 | del zlib.lib | 92 | del $(ZLIB_LIB) |
90 | $(LIB) zlib +$(OBJP1) | 93 | $(AR) $(ZLIB_LIB) +$(OBJP1) |
91 | $(LIB) zlib +$(OBJP2) | 94 | $(AR) $(ZLIB_LIB) +$(OBJP2) |
92 | 95 | ||
93 | example.exe: example.obj zlib.lib | 96 | example.exe: example.obj $(ZLIB_LIB) |
94 | $(LD) $(LDFLAGS) -eexample.exe example.obj zlib.lib | 97 | $(LD) $(LDFLAGS) -eexample.exe example.obj $(ZLIB_LIB) |
95 | 98 | ||
96 | minigzip.exe: minigzip.obj zlib.lib | 99 | minigzip.exe: minigzip.obj $(ZLIB_LIB) |
97 | $(LD) $(LDFLAGS) -eminigzip.exe minigzip.obj zlib.lib | 100 | $(LD) $(LDFLAGS) -eminigzip.exe minigzip.obj $(ZLIB_LIB) |
98 | 101 | ||
99 | test: example.exe minigzip.exe | 102 | test: example.exe minigzip.exe |
100 | example | 103 | example |
diff --git a/msdos/Makefile.w32 b/msdos/Makefile.w32 index d513c81..0a05fa9 100644 --- a/msdos/Makefile.w32 +++ b/msdos/Makefile.w32 | |||
@@ -28,13 +28,13 @@ OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | |||
28 | 28 | ||
29 | all: zlib.lib example.exe minigzip.exe | 29 | all: zlib.lib example.exe minigzip.exe |
30 | 30 | ||
31 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | 31 | adler32.obj: adler32.c zlib.h zconf.h |
32 | $(CC) -c $(CFLAGS) $*.c | 32 | $(CC) -c $(CFLAGS) $*.c |
33 | 33 | ||
34 | compress.obj: compress.c zlib.h zconf.h | 34 | compress.obj: compress.c zlib.h zconf.h |
35 | $(CC) -c $(CFLAGS) $*.c | 35 | $(CC) -c $(CFLAGS) $*.c |
36 | 36 | ||
37 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | 37 | crc32.obj: crc32.c zlib.h zconf.h |
38 | $(CC) -c $(CFLAGS) $*.c | 38 | $(CC) -c $(CFLAGS) $*.c |
39 | 39 | ||
40 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | 40 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h |
diff --git a/msdos/Makefile.wat b/msdos/Makefile.wat index 2a3b629..44bf860 100644 --- a/msdos/Makefile.wat +++ b/msdos/Makefile.wat | |||
@@ -30,13 +30,13 @@ OBJP3=infutil$(O)+inffast$(O) | |||
30 | 30 | ||
31 | all: test | 31 | all: test |
32 | 32 | ||
33 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | 33 | adler32.obj: adler32.c zlib.h zconf.h |
34 | $(CC) $(CFLAGS) $*.c | 34 | $(CC) $(CFLAGS) $*.c |
35 | 35 | ||
36 | compress.obj: compress.c zlib.h zconf.h | 36 | compress.obj: compress.c zlib.h zconf.h |
37 | $(CC) $(CFLAGS) $*.c | 37 | $(CC) $(CFLAGS) $*.c |
38 | 38 | ||
39 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | 39 | crc32.obj: crc32.c zlib.h zconf.h |
40 | $(CC) $(CFLAGS) $*.c | 40 | $(CC) $(CFLAGS) $*.c |
41 | 41 | ||
42 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | 42 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h |
diff --git a/msdos/zlib.def b/msdos/zlib.def index e4edaad..6c04412 100644 --- a/msdos/zlib.def +++ b/msdos/zlib.def | |||
@@ -8,7 +8,7 @@ SUBSYSTEM WINDOWS | |||
8 | 8 | ||
9 | STUB 'WINSTUB.EXE' | 9 | STUB 'WINSTUB.EXE' |
10 | 10 | ||
11 | VERSION 1.11 | 11 | VERSION 1.13 |
12 | 12 | ||
13 | CODE EXECUTE READ | 13 | CODE EXECUTE READ |
14 | 14 | ||
diff --git a/msdos/zlib.rc b/msdos/zlib.rc index 0a38186..556d4ff 100644 --- a/msdos/zlib.rc +++ b/msdos/zlib.rc | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | #define IDR_VERSION1 1 | 3 | #define IDR_VERSION1 1 |
4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE |
5 | FILEVERSION 1,1,2,0 | 5 | FILEVERSION 1,1,3,0 |
6 | PRODUCTVERSION 1,1,2,0 | 6 | PRODUCTVERSION 1,1,3,0 |
7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK |
8 | FILEFLAGS 0 | 8 | FILEFLAGS 0 |
9 | FILEOS VOS_DOS_WINDOWS32 | 9 | FILEOS VOS_DOS_WINDOWS32 |
@@ -17,7 +17,7 @@ BEGIN | |||
17 | 17 | ||
18 | BEGIN | 18 | BEGIN |
19 | VALUE "FileDescription", "zlib data compression library\0" | 19 | VALUE "FileDescription", "zlib data compression library\0" |
20 | VALUE "FileVersion", "1.1.2\0" | 20 | VALUE "FileVersion", "1.1.3\0" |
21 | VALUE "InternalName", "zlib\0" | 21 | VALUE "InternalName", "zlib\0" |
22 | VALUE "OriginalFilename", "zlib.dll\0" | 22 | VALUE "OriginalFilename", "zlib.dll\0" |
23 | VALUE "ProductName", "ZLib.DLL\0" | 23 | VALUE "ProductName", "ZLib.DLL\0" |