diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:14:39 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:14:39 -0700 |
commit | 423eb40306489f9c88f7dba32c2f69179166730b (patch) | |
tree | b5a83b0b1e52bbe0de973dcbc7ec008c1d7cf7d9 /Makefile | |
parent | 8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2 (diff) | |
download | zlib-1.0.1.tar.gz zlib-1.0.1.tar.bz2 zlib-1.0.1.zip |
zlib 1.0.1v1.0.1
Diffstat (limited to '')
-rw-r--r-- | Makefile | 120 | ||||
-rw-r--r-- | Makefile.b32 | 104 | ||||
-rw-r--r-- | Makefile.bor | 2 | ||||
-rw-r--r-- | Makefile.dj2 | 79 | ||||
-rw-r--r-- | Makefile.in | 129 | ||||
-rw-r--r-- | Makefile.qnx | 75 | ||||
-rw-r--r-- | Makefile.sas | 64 | ||||
-rw-r--r-- | Makefile.wat | 103 |
8 files changed, 565 insertions, 111 deletions
@@ -2,78 +2,128 @@ | |||
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | 2 | # Copyright (C) 1995-1996 Jean-loup Gailly. |
3 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
4 | 4 | ||
5 | # To compile and test, type: | ||
6 | # ./configure; make test | ||
7 | # The call of configure is optional if you don't have special requirements | ||
8 | |||
9 | # To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: | ||
10 | # make install | ||
11 | # To install in $HOME instead of /usr/local, use: | ||
12 | # make install prefix=$HOME | ||
13 | |||
5 | CC=cc | 14 | CC=cc |
15 | |||
6 | CFLAGS=-O | 16 | CFLAGS=-O |
7 | #use -O3 for gcc | 17 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
8 | #CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" | ||
9 | #CFLAGS=-g -DDEBUG | 18 | #CFLAGS=-g -DDEBUG |
19 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
20 | # -Wstrict-prototypes -Wmissing-prototypes | ||
21 | |||
10 | LDFLAGS=-L. -lz | 22 | LDFLAGS=-L. -lz |
23 | LDSHARED=$(CC) | ||
11 | 24 | ||
25 | VER=1.0.1 | ||
26 | LIBS=libz.a | ||
27 | |||
28 | AR=ar rc | ||
12 | RANLIB=ranlib | 29 | RANLIB=ranlib |
30 | TAR=tar | ||
13 | 31 | ||
14 | prefix=/usr/local | 32 | prefix=/usr/local |
15 | exec_prefix = ${prefix} | 33 | exec_prefix = $(prefix) |
16 | 34 | ||
17 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | 35 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ |
18 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | 36 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o |
19 | 37 | ||
20 | TEST_OBJS = example.o minigzip.o | 38 | TEST_OBJS = example.o minigzip.o |
21 | 39 | ||
40 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms *.[ch] | ||
41 | |||
22 | all: example minigzip | 42 | all: example minigzip |
23 | 43 | ||
24 | test: all | 44 | test: all |
25 | ./example | 45 | ./example |
26 | echo hello world | ./minigzip | ./minigzip -d | 46 | echo hello world | ./minigzip | ./minigzip -d |
27 | 47 | ||
28 | install: libz.a | ||
29 | -@mkdir $(prefix)/include | ||
30 | -@mkdir $(exec_prefix)/lib | ||
31 | cp zlib.h zconf.h $(prefix)/include | ||
32 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
33 | cp libz.a $(exec_prefix)/lib | ||
34 | chmod 644 $(exec_prefix)/lib/libz.a | ||
35 | -@$(RANLIB) $(prefix)/lib/libz.a | ||
36 | # This second ranlib is needed on NeXTSTEP which checks file times | ||
37 | |||
38 | libz.a: $(OBJS) | 48 | libz.a: $(OBJS) |
39 | ar rc $@ $(OBJS) | 49 | $(AR) $@ $(OBJS) |
40 | -@$(RANLIB) $@ | 50 | -@ ($(RANLIB) $@ || true) 2>/dev/null |
51 | |||
52 | libz.so.$(VER): $(OBJS) | ||
53 | $(LDSHARED) -o $@ $(OBJS) | ||
54 | rm -f libz.so; ln -s $@ libz.so | ||
41 | 55 | ||
42 | example: example.o libz.a | 56 | example: example.o $(LIBS) |
43 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | 57 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) |
44 | 58 | ||
45 | minigzip: minigzip.o libz.a | 59 | minigzip: minigzip.o $(LIBS) |
46 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | 60 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
47 | 61 | ||
62 | install: $(LIBS) | ||
63 | -@if [ ! $(prefix)/include ]; then mkdir $(prefix)/include; fi | ||
64 | -@if [ ! $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi | ||
65 | cp zlib.h zconf.h $(prefix)/include | ||
66 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
67 | cp $(LIBS) $(exec_prefix)/lib | ||
68 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | ||
69 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | ||
70 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | ||
71 | ln -s libz.so.$(VER) libz.so; \ | ||
72 | fi | ||
73 | # The ranlib in install is needed on NeXTSTEP which checks file times | ||
74 | |||
75 | uninstall: | ||
76 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | ||
77 | if test -f libz.so; then \ | ||
78 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | ||
79 | rm -f libz.so.$$v libz.so; \ | ||
80 | fi | ||
81 | cd $(prefix)/include; rm -f zlib.h zconf.h | ||
82 | |||
48 | clean: | 83 | clean: |
49 | rm -f *.o example minigzip libz.a foo.gz | 84 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz |
50 | 85 | ||
51 | zip: | 86 | zip: |
52 | zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \ | 87 | mv Makefile Makefile~; cp -p Makefile.in Makefile |
53 | descrip.mms *.[ch] | 88 | v=`sed -n -e 's/\./-/g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ |
54 | 89 | zip -ul9 zlib-$$v $(DISTFILES) | |
55 | tgz: | 90 | mv Makefile~ Makefile |
56 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | 91 | |
57 | zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch] | 92 | dist: |
58 | 93 | mv Makefile Makefile~; cp -p Makefile.in Makefile | |
59 | TAGS: | 94 | d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ |
95 | rm -f $$d.tar.gz; \ | ||
96 | if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ | ||
97 | files=""; \ | ||
98 | for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ | ||
99 | cd ..; \ | ||
100 | GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ | ||
101 | if test ! -d $$d; then rm -f $$d; fi | ||
102 | mv Makefile~ Makefile | ||
103 | |||
104 | tags: | ||
60 | etags *.[ch] | 105 | etags *.[ch] |
61 | 106 | ||
107 | depend: | ||
108 | makedepend -- $(CFLAGS) -- *.[ch] | ||
109 | |||
62 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 110 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
63 | 111 | ||
64 | adler32.o: zutil.h zlib.h zconf.h | 112 | adler32.o: zlib.h zconf.h |
65 | compress.o: zlib.h zconf.h | 113 | compress.o: zlib.h zconf.h |
66 | crc32.o: zutil.h zlib.h zconf.h | 114 | crc32.o: zlib.h zconf.h |
67 | deflate.o: deflate.h zutil.h zlib.h zconf.h | 115 | deflate.o: deflate.h zutil.h zlib.h zconf.h |
68 | example.o: zlib.h zconf.h | 116 | example.o: zlib.h zconf.h |
69 | gzio.o: zutil.h zlib.h zconf.h | 117 | gzio.o: zutil.h zlib.h zconf.h |
70 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | 118 | infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h |
71 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h | 119 | infcodes.o: zutil.h zlib.h zconf.h |
72 | inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | 120 | infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h |
121 | inffast.o: zutil.h zlib.h zconf.h inftrees.h | ||
122 | inffast.o: infblock.h infcodes.h infutil.h inffast.h | ||
73 | inflate.o: zutil.h zlib.h zconf.h infblock.h | 123 | inflate.o: zutil.h zlib.h zconf.h infblock.h |
74 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | 124 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h |
75 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | 125 | infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h |
76 | minigzip.o: zlib.h zconf.h | 126 | minigzip.o: zlib.h zconf.h |
77 | trees.o: deflate.h zutil.h zlib.h zconf.h | 127 | trees.o: deflate.h zutil.h zlib.h zconf.h |
78 | uncompr.o: zlib.h zconf.h | 128 | uncompr.o: zlib.h zconf.h |
79 | zutil.o: zutil.h zlib.h zconf.h | 129 | zutil.o: zutil.h zlib.h zconf.h |
diff --git a/Makefile.b32 b/Makefile.b32 new file mode 100644 index 0000000..fc3ac68 --- /dev/null +++ b/Makefile.b32 | |||
@@ -0,0 +1,104 @@ | |||
1 | # Makefile for zlib | ||
2 | # Borland C++ | ||
3 | |||
4 | # This version of the zlib makefile was adapted by Chris Young for use | ||
5 | # with Borland C 4.5x with the Dos Power Pack for a 32-bit protected mode | ||
6 | # flat memory model. It was created for use with POV-Ray ray tracer and | ||
7 | # you may choose to edit the CFLAGS to suit your needs but the | ||
8 | # switches -WX and -DMSDOS are required. | ||
9 | # -- Chris Young 76702.1655@compuserve.com | ||
10 | |||
11 | # To use, do "make -fmakefile.b32" | ||
12 | |||
13 | # See zconf.h for details about the memory requirements. | ||
14 | |||
15 | # ------------- Borland C++ ------------- | ||
16 | MODEL=-WX | ||
17 | CFLAGS= $(MODEL) -P-C -K -N- -k- -d -3 -r- -v- -f -DMSDOS | ||
18 | CC=bcc32 | ||
19 | LD=bcc32 | ||
20 | LIB=tlib | ||
21 | LDFLAGS= $(MODEL) | ||
22 | O=.obj | ||
23 | |||
24 | # variables | ||
25 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | ||
26 | trees$(O) | ||
27 | OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ | ||
28 | trees$(O) | ||
29 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | ||
30 | infutil$(O) inffast$(O) | ||
31 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | ||
32 | infutil$(O)+inffast$(O) | ||
33 | |||
34 | all: test | ||
35 | |||
36 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | ||
37 | $(CC) -c $(CFLAGS) $*.c | ||
38 | |||
39 | compress.obj: compress.c zlib.h zconf.h | ||
40 | $(CC) -c $(CFLAGS) $*.c | ||
41 | |||
42 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | ||
43 | $(CC) -c $(CFLAGS) $*.c | ||
44 | |||
45 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | ||
46 | $(CC) -c $(CFLAGS) $*.c | ||
47 | |||
48 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | ||
49 | $(CC) -c $(CFLAGS) $*.c | ||
50 | |||
51 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | ||
52 | infcodes.h infutil.h | ||
53 | $(CC) -c $(CFLAGS) $*.c | ||
54 | |||
55 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | ||
56 | infcodes.h inffast.h | ||
57 | $(CC) -c $(CFLAGS) $*.c | ||
58 | |||
59 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | ||
60 | $(CC) -c $(CFLAGS) $*.c | ||
61 | |||
62 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | ||
63 | $(CC) -c $(CFLAGS) $*.c | ||
64 | |||
65 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
66 | $(CC) -c $(CFLAGS) $*.c | ||
67 | |||
68 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
69 | $(CC) -c $(CFLAGS) $*.c | ||
70 | |||
71 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | ||
72 | $(CC) -c $(CFLAGS) $*.c | ||
73 | |||
74 | uncompr.obj: uncompr.c zlib.h zconf.h | ||
75 | $(CC) -c $(CFLAGS) $*.c | ||
76 | |||
77 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | ||
78 | $(CC) -c $(CFLAGS) $*.c | ||
79 | |||
80 | example.obj: example.c zlib.h zconf.h | ||
81 | $(CC) -c $(CFLAGS) $*.c | ||
82 | |||
83 | minigzip.obj: minigzip.c zlib.h zconf.h | ||
84 | $(CC) -c $(CFLAGS) $*.c | ||
85 | |||
86 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | ||
87 | zlib.lib: $(OBJ1) $(OBJ2) | ||
88 | del zlib.lib | ||
89 | $(LIB) zlib +$(OBJP1) | ||
90 | $(LIB) zlib +$(OBJP2) | ||
91 | |||
92 | example.exe: example.obj zlib.lib | ||
93 | $(LD) $(LDFLAGS) example.obj zlib.lib | ||
94 | |||
95 | minigzip.exe: minigzip.obj zlib.lib | ||
96 | $(LD) $(LDFLAGS) minigzip.obj zlib.lib | ||
97 | |||
98 | test: example.exe minigzip.exe | ||
99 | example | ||
100 | echo hello world | minigzip | minigzip -d | ||
101 | |||
102 | #clean: | ||
103 | # del *.obj | ||
104 | # del *.exe | ||
diff --git a/Makefile.bor b/Makefile.bor index 536b76d..2116563 100644 --- a/Makefile.bor +++ b/Makefile.bor | |||
@@ -18,7 +18,7 @@ CFLAGS=-O2 -Z $(MODEL) | |||
18 | CC=bcc | 18 | CC=bcc |
19 | LD=bcc | 19 | LD=bcc |
20 | LIB=tlib | 20 | LIB=tlib |
21 | # replace bcc with tcc for Turbo C++ 1.0 | 21 | # replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version |
22 | LDFLAGS=$(MODEL) | 22 | LDFLAGS=$(MODEL) |
23 | O=.obj | 23 | O=.obj |
24 | 24 | ||
diff --git a/Makefile.dj2 b/Makefile.dj2 new file mode 100644 index 0000000..82f55ea --- /dev/null +++ b/Makefile.dj2 | |||
@@ -0,0 +1,79 @@ | |||
1 | # Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. | ||
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | ||
3 | # For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | |||
5 | # To compile and test, type: | ||
6 | # make -fmakefile.dj2; make test -fmakefile.dj2 | ||
7 | |||
8 | # To install libz.a, zconf.h and zlib.h in the djgpp directories, type: | ||
9 | # make install -fmakefile.dj2 | ||
10 | # after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env for [make]. | ||
11 | # Alternately these variables may be defined below. | ||
12 | |||
13 | CC=gcc | ||
14 | |||
15 | #CFLAGS=-MMD -O | ||
16 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
17 | #CFLAGS=-MMD -g -DDEBUG | ||
18 | CFLAGS=-MMD -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
19 | -Wstrict-prototypes -Wmissing-prototypes | ||
20 | INSTALL=install | ||
21 | LDLIBS=-L. -lz | ||
22 | LD=$(CC) -s -o | ||
23 | LDSHARED=$(CC) | ||
24 | |||
25 | VER=1.0 | ||
26 | LIBS=libz.a | ||
27 | |||
28 | AR=ar rcs | ||
29 | # The default value of RM is "rm -f." If "rm.exe" is not found, uncomment: | ||
30 | # RM=del | ||
31 | |||
32 | prefix=/usr/local | ||
33 | exec_prefix = $(prefix) | ||
34 | |||
35 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
36 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
37 | |||
38 | TEST_OBJS = example.o minigzip.o | ||
39 | |||
40 | DISTFILES = README Change.Log configur Makefile.in Makefile Makefile.msc \ | ||
41 | Makefile.bor Makefile.tc Make_vms.com descrip.mms zlib099.pat \ | ||
42 | *.bak *.old *.[ch] | ||
43 | |||
44 | all: example.exe minigzip.exe | ||
45 | |||
46 | test: all | ||
47 | ./example | ||
48 | echo hello world | .\minigzip | .\minigzip -d | ||
49 | |||
50 | %.o : %.c | ||
51 | $(CC) $(CFLAGS) -c $< -o $@ | ||
52 | |||
53 | libz.a: $(OBJS) | ||
54 | $(AR) $@ $(OBJS) | ||
55 | |||
56 | libz.so.$(VER): $(OBJS) | ||
57 | $(LDSHARED) -o $@ $(OBJS) | ||
58 | rm -f libz.so; ln -s $@ libz.so | ||
59 | |||
60 | %.exe : %.o $(LIBS) | ||
61 | $(LD) $@ $< $(LDLIBS) | ||
62 | |||
63 | # INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env | ||
64 | |||
65 | install: $(LIBS) | ||
66 | $(INSTALL) zlib.h zconf.h $(INCLUDE_PATH) | ||
67 | $(INSTALL) $(LIBS) $(LIBRARY_PATH) | ||
68 | |||
69 | uninstall: | ||
70 | $(RM) $(LIBRARY_PATH)/$(LIBS) | ||
71 | $(RM) $(INCLUDE_PATH)/zlib.h $(INCLUDE_PATH)/zconf.h | ||
72 | |||
73 | clean: | ||
74 | $(RM) *.d *.o *.~ *.exe libz.a libz.so* foo.gz | ||
75 | |||
76 | DEPS := $(wildcard *.d) | ||
77 | ifneq ($(DEPS),) | ||
78 | include $(DEPS) | ||
79 | endif | ||
diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..3b41059 --- /dev/null +++ b/Makefile.in | |||
@@ -0,0 +1,129 @@ | |||
1 | # Makefile for zlib | ||
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | ||
3 | # For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | |||
5 | # To compile and test, type: | ||
6 | # ./configure; make test | ||
7 | # The call of configure is optional if you don't have special requirements | ||
8 | |||
9 | # To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: | ||
10 | # make install | ||
11 | # To install in $HOME instead of /usr/local, use: | ||
12 | # make install prefix=$HOME | ||
13 | |||
14 | CC=cc | ||
15 | |||
16 | CFLAGS=-O | ||
17 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
18 | #CFLAGS=-g -DDEBUG | ||
19 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
20 | # -Wstrict-prototypes -Wmissing-prototypes | ||
21 | |||
22 | LDFLAGS=-L. -lz | ||
23 | LDSHARED=$(CC) | ||
24 | |||
25 | VER=1.0.1 | ||
26 | LIBS=libz.a | ||
27 | |||
28 | AR=ar rc | ||
29 | RANLIB=ranlib | ||
30 | TAR=tar | ||
31 | |||
32 | prefix=/usr/local | ||
33 | exec_prefix = $(prefix) | ||
34 | |||
35 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
36 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
37 | |||
38 | TEST_OBJS = example.o minigzip.o | ||
39 | |||
40 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms *.[ch] | ||
41 | |||
42 | all: example minigzip | ||
43 | |||
44 | test: all | ||
45 | ./example | ||
46 | echo hello world | ./minigzip | ./minigzip -d | ||
47 | |||
48 | libz.a: $(OBJS) | ||
49 | $(AR) $@ $(OBJS) | ||
50 | -@ ($(RANLIB) $@ || true) 2>/dev/null | ||
51 | |||
52 | libz.so.$(VER): $(OBJS) | ||
53 | $(LDSHARED) -o $@ $(OBJS) | ||
54 | rm -f libz.so; ln -s $@ libz.so | ||
55 | |||
56 | example: example.o $(LIBS) | ||
57 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
58 | |||
59 | minigzip: minigzip.o $(LIBS) | ||
60 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
61 | |||
62 | install: $(LIBS) | ||
63 | -@if [ ! $(prefix)/include ]; then mkdir $(prefix)/include; fi | ||
64 | -@if [ ! $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi | ||
65 | cp zlib.h zconf.h $(prefix)/include | ||
66 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
67 | cp $(LIBS) $(exec_prefix)/lib | ||
68 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | ||
69 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | ||
70 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | ||
71 | ln -s libz.so.$(VER) libz.so; \ | ||
72 | fi | ||
73 | # The ranlib in install is needed on NeXTSTEP which checks file times | ||
74 | |||
75 | uninstall: | ||
76 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | ||
77 | if test -f libz.so; then \ | ||
78 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | ||
79 | rm -f libz.so.$$v libz.so; \ | ||
80 | fi | ||
81 | cd $(prefix)/include; rm -f zlib.h zconf.h | ||
82 | |||
83 | clean: | ||
84 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz | ||
85 | |||
86 | zip: | ||
87 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
88 | v=`sed -n -e 's/\./-/g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
89 | zip -ul9 zlib-$$v $(DISTFILES) | ||
90 | mv Makefile~ Makefile | ||
91 | |||
92 | dist: | ||
93 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
94 | d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
95 | rm -f $$d.tar.gz; \ | ||
96 | if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ | ||
97 | files=""; \ | ||
98 | for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ | ||
99 | cd ..; \ | ||
100 | GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ | ||
101 | if test ! -d $$d; then rm -f $$d; fi | ||
102 | mv Makefile~ Makefile | ||
103 | |||
104 | tags: | ||
105 | etags *.[ch] | ||
106 | |||
107 | depend: | ||
108 | makedepend -- $(CFLAGS) -- *.[ch] | ||
109 | |||
110 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
111 | |||
112 | adler32.o: zlib.h zconf.h | ||
113 | compress.o: zlib.h zconf.h | ||
114 | crc32.o: zlib.h zconf.h | ||
115 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
116 | example.o: zlib.h zconf.h | ||
117 | gzio.o: zutil.h zlib.h zconf.h | ||
118 | infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h | ||
119 | infcodes.o: zutil.h zlib.h zconf.h | ||
120 | infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h | ||
121 | inffast.o: zutil.h zlib.h zconf.h inftrees.h | ||
122 | inffast.o: infblock.h infcodes.h infutil.h inffast.h | ||
123 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
124 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
125 | infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
126 | minigzip.o: zlib.h zconf.h | ||
127 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
128 | uncompr.o: zlib.h zconf.h | ||
129 | zutil.o: zutil.h zlib.h zconf.h | ||
diff --git a/Makefile.qnx b/Makefile.qnx deleted file mode 100644 index 22b1a23..0000000 --- a/Makefile.qnx +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | # Makefile for zlib | ||
2 | # Copyright (C) 1995 Jean-loup Gailly. | ||
3 | # For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | |||
5 | # Modified slightly for QNX by Chris Herborth (chrish@qnx.com) | ||
6 | |||
7 | CC=cc | ||
8 | CFLAGS=-4 -O -Q | ||
9 | #use -O3 for gcc to take advantage of inlining | ||
10 | #CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" | ||
11 | #CFLAGS=-g -DDEBUG | ||
12 | LDFLAGS=-L. -lz | ||
13 | |||
14 | #RANLIB=ranlib | ||
15 | |||
16 | prefix=/usr/local | ||
17 | |||
18 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
19 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
20 | |||
21 | TEST_OBJS = example.o minigzip.o | ||
22 | |||
23 | all: example minigzip | ||
24 | |||
25 | test: all | ||
26 | ./example | ||
27 | echo hello world | ./minigzip | ./minigzip -d | ||
28 | |||
29 | install: zlib.lib | ||
30 | -@mkdir $(prefix)/include | ||
31 | -@mkdir $(prefix)/lib | ||
32 | cp zlib.h zconf.h $(prefix)/include | ||
33 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
34 | cp zlib.lib $(prefix)/lib | ||
35 | chmod 644 $(prefix)/lib/zlib.lib | ||
36 | |||
37 | zlib.lib: $(OBJS) | ||
38 | cc -A $@ $(OBJS) | ||
39 | # ar rc $@ $(OBJS) | ||
40 | # $(RANLIB) $@ | ||
41 | |||
42 | example: example.o zlib.lib | ||
43 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
44 | |||
45 | minigzip: minigzip.o zlib.lib | ||
46 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
47 | |||
48 | clean: | ||
49 | rm -f *.o example minigzip zlib.lib foo.gz | ||
50 | |||
51 | zip: | ||
52 | zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch] | ||
53 | |||
54 | tgz: | ||
55 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | ||
56 | zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch] | ||
57 | |||
58 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
59 | |||
60 | adler32.o: zutil.h zlib.h zconf.h | ||
61 | compress.o: zlib.h zconf.h | ||
62 | crc32.o: zutil.h zlib.h zconf.h | ||
63 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
64 | example.o: zlib.h zconf.h | ||
65 | gzio.o: zutil.h zlib.h zconf.h | ||
66 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
67 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h | ||
68 | inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
69 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
70 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
71 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
72 | minigzip.o: zlib.h zconf.h | ||
73 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
74 | uncompr.o: zlib.h zconf.h | ||
75 | zutil.o: zutil.h zlib.h zconf.h | ||
diff --git a/Makefile.sas b/Makefile.sas new file mode 100644 index 0000000..5323e82 --- /dev/null +++ b/Makefile.sas | |||
@@ -0,0 +1,64 @@ | |||
1 | # SMakefile for zlib | ||
2 | # Modified from the standard UNIX Makefile Copyright Jean-loup Gailly | ||
3 | # Osma Ahvenlampi <Osma.Ahvenlampi@hut.fi> | ||
4 | # Amiga, SAS/C 6.56 & Smake | ||
5 | |||
6 | CC=sc | ||
7 | CFLAGS=OPT | ||
8 | #CFLAGS=OPT CPU=68030 | ||
9 | #CFLAGS=DEBUG=LINE | ||
10 | LDFLAGS=LIB z.lib | ||
11 | |||
12 | SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \ | ||
13 | NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX | ||
14 | |||
15 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
16 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
17 | |||
18 | TEST_OBJS = example.o minigzip.o | ||
19 | |||
20 | all: SCOPTIONS example minigzip | ||
21 | |||
22 | test: all | ||
23 | `cd`/example | ||
24 | echo hello world | minigzip | minigzip -d | ||
25 | |||
26 | install: z.lib | ||
27 | copy zlib.h zconf.h INCLUDE: clone | ||
28 | copy z.lib LIB: clone | ||
29 | |||
30 | z.lib: $(OBJS) | ||
31 | oml z.lib r $(OBJS) | ||
32 | |||
33 | example: example.o z.lib | ||
34 | $(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS) | ||
35 | |||
36 | minigzip: minigzip.o z.lib | ||
37 | $(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS) | ||
38 | |||
39 | clean: | ||
40 | -delete force quiet *.o example minigzip z.lib foo.gz *.lnk SCOPTIONS | ||
41 | |||
42 | SCOPTIONS: Smakefile | ||
43 | copy to $@ <from < | ||
44 | $(SCOPTIONS) | ||
45 | < | ||
46 | |||
47 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
48 | |||
49 | adler32.o: zutil.h zlib.h zconf.h | ||
50 | compress.o: zlib.h zconf.h | ||
51 | crc32.o: zutil.h zlib.h zconf.h | ||
52 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
53 | example.o: zlib.h zconf.h | ||
54 | gzio.o: zutil.h zlib.h zconf.h | ||
55 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
56 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h | ||
57 | inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
58 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
59 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
60 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
61 | minigzip.o: zlib.h zconf.h | ||
62 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
63 | uncompr.o: zlib.h zconf.h | ||
64 | zutil.o: zutil.h zlib.h zconf.h | ||
diff --git a/Makefile.wat b/Makefile.wat new file mode 100644 index 0000000..2a3b629 --- /dev/null +++ b/Makefile.wat | |||
@@ -0,0 +1,103 @@ | |||
1 | # Makefile for zlib | ||
2 | # Watcom 10a | ||
3 | |||
4 | # This version of the zlib makefile was adapted by Chris Young for use | ||
5 | # with Watcom 10a 32-bit protected mode flat memory model. It was created | ||
6 | # for use with POV-Ray ray tracer and you may choose to edit the CFLAGS to | ||
7 | # suit your needs but the -DMSDOS is required. | ||
8 | # -- Chris Young 76702.1655@compuserve.com | ||
9 | |||
10 | # To use, do "wmake -f makefile.wat" | ||
11 | |||
12 | # See zconf.h for details about the memory requirements. | ||
13 | |||
14 | # ------------- Watcom 10a ------------- | ||
15 | MODEL=-mf | ||
16 | CFLAGS= $(MODEL) -fpi87 -fp5 -zp4 -5r -w5 -oneatx -DMSDOS | ||
17 | CC=wcc386 | ||
18 | LD=wcl386 | ||
19 | LIB=wlib -b -c | ||
20 | LDFLAGS= | ||
21 | O=.obj | ||
22 | |||
23 | # variables | ||
24 | OBJ1=adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) | ||
25 | OBJ2=trees$(O) zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) | ||
26 | OBJ3=infutil$(O) inffast$(O) | ||
27 | OBJP1=adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O) | ||
28 | OBJP2=trees$(O)+zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O) | ||
29 | OBJP3=infutil$(O)+inffast$(O) | ||
30 | |||
31 | all: test | ||
32 | |||
33 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | ||
34 | $(CC) $(CFLAGS) $*.c | ||
35 | |||
36 | compress.obj: compress.c zlib.h zconf.h | ||
37 | $(CC) $(CFLAGS) $*.c | ||
38 | |||
39 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | ||
40 | $(CC) $(CFLAGS) $*.c | ||
41 | |||
42 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | ||
43 | $(CC) $(CFLAGS) $*.c | ||
44 | |||
45 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | ||
46 | $(CC) $(CFLAGS) $*.c | ||
47 | |||
48 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h & | ||
49 | infcodes.h infutil.h | ||
50 | $(CC) $(CFLAGS) $*.c | ||
51 | |||
52 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h & | ||
53 | infcodes.h inffast.h | ||
54 | $(CC) $(CFLAGS) $*.c | ||
55 | |||
56 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | ||
57 | $(CC) $(CFLAGS) $*.c | ||
58 | |||
59 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | ||
60 | $(CC) $(CFLAGS) $*.c | ||
61 | |||
62 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
63 | $(CC) $(CFLAGS) $*.c | ||
64 | |||
65 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
66 | $(CC) $(CFLAGS) $*.c | ||
67 | |||
68 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | ||
69 | $(CC) $(CFLAGS) $*.c | ||
70 | |||
71 | uncompr.obj: uncompr.c zlib.h zconf.h | ||
72 | $(CC) $(CFLAGS) $*.c | ||
73 | |||
74 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | ||
75 | $(CC) $(CFLAGS) $*.c | ||
76 | |||
77 | example.obj: example.c zlib.h zconf.h | ||
78 | $(CC) $(CFLAGS) $*.c | ||
79 | |||
80 | minigzip.obj: minigzip.c zlib.h zconf.h | ||
81 | $(CC) $(CFLAGS) $*.c | ||
82 | |||
83 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | ||
84 | zlib.lib: $(OBJ1) $(OBJ2) $(OBJ3) | ||
85 | del zlib.lib | ||
86 | $(LIB) zlib.lib +$(OBJP1) | ||
87 | $(LIB) zlib.lib +$(OBJP2) | ||
88 | $(LIB) zlib.lib +$(OBJP3) | ||
89 | |||
90 | example.exe: example.obj zlib.lib | ||
91 | $(LD) $(LDFLAGS) example.obj zlib.lib | ||
92 | |||
93 | minigzip.exe: minigzip.obj zlib.lib | ||
94 | $(LD) $(LDFLAGS) minigzip.obj zlib.lib | ||
95 | |||
96 | test: minigzip.exe example.exe | ||
97 | example | ||
98 | echo hello world | minigzip | minigzip -d >test | ||
99 | type test | ||
100 | |||
101 | #clean: | ||
102 | # del *.obj | ||
103 | # del *.exe | ||