diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:11:37 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:11:37 -0700 |
commit | 56bcb184fac036a45cb8937238d51778d0a796aa (patch) | |
tree | 7b127418b30e135f8ce27ec136038b5090540820 /Makefile | |
parent | 25e5325501edade156e897f95afdaa2be78ad9a3 (diff) | |
download | zlib-0.99.tar.gz zlib-0.99.tar.bz2 zlib-0.99.zip |
zlib 0.99v0.99
Diffstat (limited to '')
-rw-r--r-- | Makefile | 119 | ||||
-rw-r--r-- | Makefile.bor | 2 | ||||
-rw-r--r-- | Makefile.in | 130 | ||||
-rw-r--r-- | Makefile.qnx | 75 |
4 files changed, 219 insertions, 107 deletions
@@ -1,73 +1,130 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Copyright (C) 1995 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 to take advantage of inlining | 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 | ||
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 |
33 | exec_prefix = $(prefix) | ||
15 | 34 | ||
16 | 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 \ |
17 | 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 |
18 | 37 | ||
19 | TEST_OBJS = example.o minigzip.o | 38 | TEST_OBJS = example.o minigzip.o |
20 | 39 | ||
40 | DISTFILES = README ChangeLog configure Makefile.in Makefile Makefile.msc \ | ||
41 | Makefile.bor Makefile.tc Make_vms.com descrip.mms *.[ch] | ||
42 | |||
21 | all: example minigzip | 43 | all: example minigzip |
22 | 44 | ||
23 | test: all | 45 | test: all |
24 | ./example | 46 | ./example |
25 | echo hello world | ./minigzip | ./minigzip -d | 47 | echo hello world | ./minigzip | ./minigzip -d |
26 | 48 | ||
27 | install: libz.a | ||
28 | -@mkdir $(prefix)/include | ||
29 | -@mkdir $(prefix)/lib | ||
30 | cp zlib.h zconf.h $(prefix)/include | ||
31 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
32 | cp libz.a $(prefix)/lib | ||
33 | chmod 644 $(prefix)/lib/libz.a | ||
34 | |||
35 | libz.a: $(OBJS) | 49 | libz.a: $(OBJS) |
36 | ar rc $@ $(OBJS) | 50 | $(AR) $@ $(OBJS) |
37 | $(RANLIB) $@ | 51 | -@ ($(RANLIB) $@ || true) 2>/dev/null |
38 | 52 | ||
39 | example: example.o libz.a | 53 | libz.so.$(VER): $(OBJS) |
54 | $(LDSHARED) -o $@ $(OBJS) | ||
55 | rm -f libz.so; ln -s $@ libz.so | ||
56 | |||
57 | example: example.o $(LIBS) | ||
40 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | 58 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) |
41 | 59 | ||
42 | minigzip: minigzip.o libz.a | 60 | minigzip: minigzip.o $(LIBS) |
43 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | 61 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
44 | 62 | ||
63 | install: $(LIBS) | ||
64 | -@if [ ! $(prefix)/include ]; then mkdir $(prefix)/include; fi | ||
65 | -@if [ ! $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi | ||
66 | cp zlib.h zconf.h $(prefix)/include | ||
67 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
68 | cp $(LIBS) $(exec_prefix)/lib | ||
69 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | ||
70 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | ||
71 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | ||
72 | ln -s libz.so.$(VER) libz.so; \ | ||
73 | fi | ||
74 | # The ranlib in install is needed on NeXTSTEP which checks file times | ||
75 | |||
76 | uninstall: | ||
77 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | ||
78 | if test -f libz.so; then \ | ||
79 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | ||
80 | rm -f libz.so.$$v libz.so; \ | ||
81 | fi | ||
82 | cd $(prefix)/include; rm -f zlib.h zconf.h | ||
83 | |||
45 | clean: | 84 | clean: |
46 | rm -f *.o example minigzip libz.a foo.gz | 85 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz |
47 | 86 | ||
48 | zip: | 87 | zip: |
49 | zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \ | 88 | mv Makefile Makefile~; cp -p Makefile.in Makefile |
50 | descrip.mms *.[ch] | 89 | v=`sed -n -e 's/\./-/' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ |
51 | 90 | zip -ul9 zlib-$$v $(DISTFILES) | |
52 | tgz: | 91 | mv Makefile~ Makefile |
53 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | 92 | |
54 | zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch] | 93 | dist: |
94 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
95 | d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
96 | rm -f $$d.tar.gz; \ | ||
97 | if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ | ||
98 | files=""; \ | ||
99 | for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ | ||
100 | cd ..; \ | ||
101 | GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ | ||
102 | if test ! -d $$d; then rm -f $$d; fi | ||
103 | mv Makefile~ Makefile | ||
104 | |||
105 | tags: | ||
106 | etags *.[ch] | ||
107 | |||
108 | depend: | ||
109 | makedepend -- $(CFLAGS) -- *.[ch] | ||
55 | 110 | ||
56 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 111 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
57 | 112 | ||
58 | adler32.o: zutil.h zlib.h zconf.h | 113 | adler32.o: zlib.h zconf.h |
59 | compress.o: zlib.h zconf.h | 114 | compress.o: zlib.h zconf.h |
60 | crc32.o: zutil.h zlib.h zconf.h | 115 | crc32.o: zlib.h zconf.h |
61 | deflate.o: deflate.h zutil.h zlib.h zconf.h | 116 | deflate.o: deflate.h zutil.h zlib.h zconf.h |
62 | example.o: zlib.h zconf.h | 117 | example.o: zlib.h zconf.h |
63 | gzio.o: zutil.h zlib.h zconf.h | 118 | gzio.o: zutil.h zlib.h zconf.h |
64 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | 119 | infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h |
65 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h | 120 | infcodes.o: zutil.h zlib.h zconf.h |
66 | inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | 121 | infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h |
122 | inffast.o: zutil.h zlib.h zconf.h inftrees.h | ||
123 | inffast.o: infblock.h infcodes.h infutil.h inffast.h | ||
67 | inflate.o: zutil.h zlib.h zconf.h infblock.h | 124 | inflate.o: zutil.h zlib.h zconf.h infblock.h |
68 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | 125 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h |
69 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | 126 | infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h |
70 | minigzip.o: zlib.h zconf.h | 127 | minigzip.o: zlib.h zconf.h |
71 | trees.o: deflate.h zutil.h zlib.h zconf.h | 128 | trees.o: deflate.h zutil.h zlib.h zconf.h |
72 | uncompr.o: zlib.h zconf.h | 129 | uncompr.o: zlib.h zconf.h |
73 | zutil.o: zutil.h zlib.h zconf.h | 130 | zutil.o: zutil.h zlib.h zconf.h |
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.in b/Makefile.in new file mode 100644 index 0000000..fe5b372 --- /dev/null +++ b/Makefile.in | |||
@@ -0,0 +1,130 @@ | |||
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 | ||
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 ChangeLog configure Makefile.in Makefile Makefile.msc \ | ||
41 | Makefile.bor Makefile.tc Make_vms.com descrip.mms *.[ch] | ||
42 | |||
43 | all: example minigzip | ||
44 | |||
45 | test: all | ||
46 | ./example | ||
47 | echo hello world | ./minigzip | ./minigzip -d | ||
48 | |||
49 | libz.a: $(OBJS) | ||
50 | $(AR) $@ $(OBJS) | ||
51 | -@ ($(RANLIB) $@ || true) 2>/dev/null | ||
52 | |||
53 | libz.so.$(VER): $(OBJS) | ||
54 | $(LDSHARED) -o $@ $(OBJS) | ||
55 | rm -f libz.so; ln -s $@ libz.so | ||
56 | |||
57 | example: example.o $(LIBS) | ||
58 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
59 | |||
60 | minigzip: minigzip.o $(LIBS) | ||
61 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
62 | |||
63 | install: $(LIBS) | ||
64 | -@if [ ! $(prefix)/include ]; then mkdir $(prefix)/include; fi | ||
65 | -@if [ ! $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi | ||
66 | cp zlib.h zconf.h $(prefix)/include | ||
67 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
68 | cp $(LIBS) $(exec_prefix)/lib | ||
69 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | ||
70 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | ||
71 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | ||
72 | ln -s libz.so.$(VER) libz.so; \ | ||
73 | fi | ||
74 | # The ranlib in install is needed on NeXTSTEP which checks file times | ||
75 | |||
76 | uninstall: | ||
77 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | ||
78 | if test -f libz.so; then \ | ||
79 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | ||
80 | rm -f libz.so.$$v libz.so; \ | ||
81 | fi | ||
82 | cd $(prefix)/include; rm -f zlib.h zconf.h | ||
83 | |||
84 | clean: | ||
85 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz | ||
86 | |||
87 | zip: | ||
88 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
89 | v=`sed -n -e 's/\./-/' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
90 | zip -ul9 zlib-$$v $(DISTFILES) | ||
91 | mv Makefile~ Makefile | ||
92 | |||
93 | dist: | ||
94 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
95 | d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
96 | rm -f $$d.tar.gz; \ | ||
97 | if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ | ||
98 | files=""; \ | ||
99 | for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ | ||
100 | cd ..; \ | ||
101 | GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ | ||
102 | if test ! -d $$d; then rm -f $$d; fi | ||
103 | mv Makefile~ Makefile | ||
104 | |||
105 | tags: | ||
106 | etags *.[ch] | ||
107 | |||
108 | depend: | ||
109 | makedepend -- $(CFLAGS) -- *.[ch] | ||
110 | |||
111 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
112 | |||
113 | adler32.o: zlib.h zconf.h | ||
114 | compress.o: zlib.h zconf.h | ||
115 | crc32.o: zlib.h zconf.h | ||
116 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
117 | example.o: zlib.h zconf.h | ||
118 | gzio.o: zutil.h zlib.h zconf.h | ||
119 | infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h | ||
120 | infcodes.o: zutil.h zlib.h zconf.h | ||
121 | infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h | ||
122 | inffast.o: zutil.h zlib.h zconf.h inftrees.h | ||
123 | inffast.o: infblock.h infcodes.h infutil.h inffast.h | ||
124 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
125 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
126 | infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
127 | minigzip.o: zlib.h zconf.h | ||
128 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
129 | uncompr.o: zlib.h zconf.h | ||
130 | 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 | ||