diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:06:52 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:06:52 -0700 |
commit | 64b2e892035cf6ea98800c54dce0d63730d50272 (patch) | |
tree | e3b569f87e413eaef4a13469acfd4224b2a63d3a /Makefile | |
parent | 4ca984fb447ac57120c394cf2fbba23837ed31c2 (diff) | |
download | zlib-0.9.tar.gz zlib-0.9.tar.bz2 zlib-0.9.zip |
zlib 0.9v0.9
Diffstat (limited to '')
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | Makefile.bak | 59 | ||||
-rw-r--r-- | Makefile.bor | 98 | ||||
-rw-r--r-- | Makefile.msc | 95 | ||||
-rw-r--r-- | Makefile.tc | 97 |
5 files changed, 351 insertions, 2 deletions
@@ -33,11 +33,11 @@ clean: | |||
33 | rm -f *.o example minigzip inftest libgz.a foo.gz | 33 | rm -f *.o example minigzip inftest libgz.a foo.gz |
34 | 34 | ||
35 | zip: | 35 | zip: |
36 | zip -ul9 zlib README ChangeLog Makefile *.[ch] | 36 | zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch] |
37 | 37 | ||
38 | tgz: | 38 | tgz: |
39 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | 39 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ |
40 | zlib/*.[ch] | 40 | zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch] |
41 | 41 | ||
42 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 42 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
43 | 43 | ||
diff --git a/Makefile.bak b/Makefile.bak new file mode 100644 index 0000000..bfe1b74 --- /dev/null +++ b/Makefile.bak | |||
@@ -0,0 +1,59 @@ | |||
1 | CC=gcc | ||
2 | CFLAGS=-O2 | ||
3 | #CFLAGS=-g -DDEBUG | ||
4 | LDFLAGS=-L. -lgz | ||
5 | |||
6 | RANLIB=ranlib | ||
7 | |||
8 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
9 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
10 | |||
11 | TEST_OBJS = example.o minigzip.o inftest.o | ||
12 | |||
13 | all: example minigzip inftest | ||
14 | |||
15 | test: all | ||
16 | ./example | ||
17 | echo hello world | ./minigzip | ./minigzip -d | ||
18 | |||
19 | libgz.a: $(OBJS) | ||
20 | ar rc $@ $(OBJS) | ||
21 | $(RANLIB) $@ | ||
22 | |||
23 | example: example.o libgz.a | ||
24 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
25 | |||
26 | minigzip: minigzip.o libgz.a | ||
27 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
28 | |||
29 | inftest: inftest.o libgz.a | ||
30 | $(CC) $(CFLAGS) -o $@ inftest.o $(LDFLAGS) | ||
31 | |||
32 | clean: | ||
33 | rm -f *.o example minigzip inftest libgz.a foo.gz | ||
34 | |||
35 | zip: | ||
36 | zip -ul9 zlib README ChangeLog Makefile *.[ch] | ||
37 | |||
38 | tgz: | ||
39 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | ||
40 | zlib/*.[ch] | ||
41 | |||
42 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
43 | |||
44 | adler32.o: zutil.h zlib.h zconf.h | ||
45 | compress.o: zlib.h zconf.h | ||
46 | crc32.o: zutil.h zlib.h zconf.h | ||
47 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
48 | example.o: zlib.h zconf.h | ||
49 | gzio.o: zutil.h zlib.h zconf.h | ||
50 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
51 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h | ||
52 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
53 | inftest.o: zutil.h zlib.h zconf.h | ||
54 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
55 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
56 | minigzip.o: zlib.h zconf.h | ||
57 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
58 | uncompr.o: zlib.h zconf.h | ||
59 | zutil.o: zutil.h zlib.h zconf.h | ||
diff --git a/Makefile.bor b/Makefile.bor new file mode 100644 index 0000000..877ed62 --- /dev/null +++ b/Makefile.bor | |||
@@ -0,0 +1,98 @@ | |||
1 | # Makefile for zlib | ||
2 | # Borland C++ ************ UNTESTED *********** | ||
3 | |||
4 | # To use, do "make -fmakefile.bor" | ||
5 | |||
6 | # WARNING: the small model is supported but only for small values of | ||
7 | # MAX_WBITS and MAX_MEM_LEVEL | ||
8 | |||
9 | # ------------- Turbo C++, Borland C++ ------------- | ||
10 | MODEL=-ml | ||
11 | CFLAGS=-O2 -Z $(MODEL) | ||
12 | CC=bcc | ||
13 | LD=bcc | ||
14 | LIB=tlib | ||
15 | # replace bcc with tcc for Turbo C++ 1.0 | ||
16 | LDFLAGS=$(MODEL) | ||
17 | O=.obj | ||
18 | |||
19 | # variables | ||
20 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | ||
21 | trees$(O) | ||
22 | OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ | ||
23 | trees$(O) | ||
24 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | ||
25 | infutil$(O) inffast$(O) | ||
26 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | ||
27 | infutil$(O)+inffast$(O) | ||
28 | |||
29 | all: test | ||
30 | |||
31 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | ||
32 | $(CC) -c $(CFLAGS) $*.c | ||
33 | |||
34 | compress.obj: compress.c zlib.h zconf.h | ||
35 | $(CC) -c $(CFLAGS) $*.c | ||
36 | |||
37 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | ||
38 | $(CC) -c $(CFLAGS) $*.c | ||
39 | |||
40 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | ||
41 | $(CC) -c $(CFLAGS) $*.c | ||
42 | |||
43 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | ||
44 | $(CC) -c $(CFLAGS) $*.c | ||
45 | |||
46 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | ||
47 | infcodes.h infutil.h | ||
48 | $(CC) -c $(CFLAGS) $*.c | ||
49 | |||
50 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | ||
51 | infcodes.h inffast.h | ||
52 | $(CC) -c $(CFLAGS) $*.c | ||
53 | |||
54 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | ||
55 | $(CC) -c $(CFLAGS) $*.c | ||
56 | |||
57 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | ||
58 | $(CC) -c $(CFLAGS) $*.c | ||
59 | |||
60 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
61 | $(CC) -c $(CFLAGS) $*.c | ||
62 | |||
63 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
64 | $(CC) -c $(CFLAGS) $*.c | ||
65 | |||
66 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | ||
67 | $(CC) -c $(CFLAGS) $*.c | ||
68 | |||
69 | uncompr.obj: uncompr.c zlib.h zconf.h | ||
70 | $(CC) -c $(CFLAGS) $*.c | ||
71 | |||
72 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | ||
73 | $(CC) -c $(CFLAGS) $*.c | ||
74 | |||
75 | example.obj: example.c zlib.h zconf.h | ||
76 | $(CC) -c $(CFLAGS) $*.c | ||
77 | |||
78 | minigzip.obj: minigzip.c zlib.h zconf.h | ||
79 | $(CC) -c $(CFLAGS) $*.c | ||
80 | |||
81 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | ||
82 | zlib.lib: $(OBJ1) $(OBJ2) | ||
83 | $(LIB) zlib +$(OBJP1) | ||
84 | $(LIB) zlib +$(OBJP2) | ||
85 | |||
86 | example.exe: example.obj zlib.lib | ||
87 | $(LD) $(LDFLAGS) example.obj zlib.lib | ||
88 | |||
89 | minigzip.exe: minigzip.obj zlib.lib | ||
90 | $(LD) $(LDFLAGS) minigzip.obj zlib.lib | ||
91 | |||
92 | test: example.exe minigzip.exe | ||
93 | example | ||
94 | echo hello world | minigzip | minigzip -d | ||
95 | |||
96 | #clean: | ||
97 | # del *.obj | ||
98 | # del *.exe | ||
diff --git a/Makefile.msc b/Makefile.msc new file mode 100644 index 0000000..375d21c --- /dev/null +++ b/Makefile.msc | |||
@@ -0,0 +1,95 @@ | |||
1 | # Makefile for zlib | ||
2 | # Microsoft C 5.1 or later | ||
3 | |||
4 | # To use, do "make makefile.msc" | ||
5 | |||
6 | # WARNING: the small model is supported but only for small values of | ||
7 | # MAX_WBITS and MAX_MEM_LEVEL | ||
8 | |||
9 | # ------------- Microsoft C 5.1 and later ------------- | ||
10 | MODEL=-AL | ||
11 | CFLAGS=-Oait -Gs -nologo -W3 $(MODEL) | ||
12 | #-Ox generates bad code with MSC 5.1 | ||
13 | CC=cl | ||
14 | LD=link | ||
15 | LDFLAGS=/e/st:0x1000/noe | ||
16 | O=.obj | ||
17 | |||
18 | # variables | ||
19 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | ||
20 | trees$(O) | ||
21 | OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ | ||
22 | trees$(O) | ||
23 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | ||
24 | infutil$(O) inffast$(O) | ||
25 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | ||
26 | infutil$(O)+inffast$(O) | ||
27 | |||
28 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | ||
29 | $(CC) -c $(CFLAGS) $*.c | ||
30 | |||
31 | compress.obj: compress.c zlib.h zconf.h | ||
32 | $(CC) -c $(CFLAGS) $*.c | ||
33 | |||
34 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | ||
35 | $(CC) -c $(CFLAGS) $*.c | ||
36 | |||
37 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | ||
38 | $(CC) -c $(CFLAGS) $*.c | ||
39 | |||
40 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | ||
41 | $(CC) -c $(CFLAGS) $*.c | ||
42 | |||
43 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | ||
44 | infcodes.h infutil.h | ||
45 | $(CC) -c $(CFLAGS) $*.c | ||
46 | |||
47 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | ||
48 | infcodes.h inffast.h | ||
49 | $(CC) -c $(CFLAGS) $*.c | ||
50 | |||
51 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | ||
52 | $(CC) -c $(CFLAGS) $*.c | ||
53 | |||
54 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | ||
55 | $(CC) -c $(CFLAGS) $*.c | ||
56 | |||
57 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
58 | $(CC) -c $(CFLAGS) $*.c | ||
59 | |||
60 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
61 | $(CC) -c $(CFLAGS) $*.c | ||
62 | |||
63 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | ||
64 | $(CC) -c $(CFLAGS) $*.c | ||
65 | |||
66 | uncompr.obj: uncompr.c zlib.h zconf.h | ||
67 | $(CC) -c $(CFLAGS) $*.c | ||
68 | |||
69 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | ||
70 | $(CC) -c $(CFLAGS) $*.c | ||
71 | |||
72 | example.obj: example.c zlib.h zconf.h | ||
73 | $(CC) -c $(CFLAGS) $*.c | ||
74 | |||
75 | minigzip.obj: minigzip.c zlib.h zconf.h | ||
76 | $(CC) -c $(CFLAGS) $*.c | ||
77 | |||
78 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | ||
79 | zlib.lib: $(OBJ1) $(OBJ2) | ||
80 | lib zlib $(OBJ1); | ||
81 | lib zlib $(OBJ2); | ||
82 | |||
83 | example.exe: example.obj zlib.lib | ||
84 | $(LD) $(LDFLAGS) example.obj,,,zlib.lib; | ||
85 | |||
86 | minigzip.exe: minigzip.obj zlib.lib | ||
87 | $(LD) $(LDFLAGS) minigzip.obj,,,zlib.lib; | ||
88 | |||
89 | test: example.exe minigzip.exe | ||
90 | example | ||
91 | echo hello world | minigzip | minigzip -d | ||
92 | |||
93 | #clean: | ||
94 | # del *.obj | ||
95 | # del *.exe | ||
diff --git a/Makefile.tc b/Makefile.tc new file mode 100644 index 0000000..51075f7 --- /dev/null +++ b/Makefile.tc | |||
@@ -0,0 +1,97 @@ | |||
1 | # Makefile for zlib | ||
2 | # TurboC 2.0 | ||
3 | |||
4 | # To use, do "make -fmakefile.tc" | ||
5 | |||
6 | # WARNING: the small model is supported but only for small values of | ||
7 | # MAX_WBITS and MAX_MEM_LEVEL | ||
8 | |||
9 | # ------------- Turbo C 2.0 ------------- | ||
10 | MODEL=-ml | ||
11 | CFLAGS=-O2 -Z $(MODEL) | ||
12 | CC=tcc | ||
13 | LD=tcc | ||
14 | LIB=tlib | ||
15 | LDFLAGS=$(MODEL) | ||
16 | O=.obj | ||
17 | |||
18 | # variables | ||
19 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | ||
20 | trees$(O) | ||
21 | OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ | ||
22 | trees$(O) | ||
23 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | ||
24 | infutil$(O) inffast$(O) | ||
25 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | ||
26 | infutil$(O)+inffast$(O) | ||
27 | |||
28 | all: test | ||
29 | |||
30 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | ||
31 | $(CC) -c $(CFLAGS) $*.c | ||
32 | |||
33 | compress.obj: compress.c zlib.h zconf.h | ||
34 | $(CC) -c $(CFLAGS) $*.c | ||
35 | |||
36 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | ||
37 | $(CC) -c $(CFLAGS) $*.c | ||
38 | |||
39 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | ||
40 | $(CC) -c $(CFLAGS) $*.c | ||
41 | |||
42 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | ||
43 | $(CC) -c $(CFLAGS) $*.c | ||
44 | |||
45 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | ||
46 | infcodes.h infutil.h | ||
47 | $(CC) -c $(CFLAGS) $*.c | ||
48 | |||
49 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | ||
50 | infcodes.h inffast.h | ||
51 | $(CC) -c $(CFLAGS) $*.c | ||
52 | |||
53 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | ||
54 | $(CC) -c $(CFLAGS) $*.c | ||
55 | |||
56 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | ||
57 | $(CC) -c $(CFLAGS) $*.c | ||
58 | |||
59 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
60 | $(CC) -c $(CFLAGS) $*.c | ||
61 | |||
62 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | ||
63 | $(CC) -c $(CFLAGS) $*.c | ||
64 | |||
65 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | ||
66 | $(CC) -c $(CFLAGS) $*.c | ||
67 | |||
68 | uncompr.obj: uncompr.c zlib.h zconf.h | ||
69 | $(CC) -c $(CFLAGS) $*.c | ||
70 | |||
71 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | ||
72 | $(CC) -c $(CFLAGS) $*.c | ||
73 | |||
74 | example.obj: example.c zlib.h zconf.h | ||
75 | $(CC) -c $(CFLAGS) $*.c | ||
76 | |||
77 | minigzip.obj: minigzip.c zlib.h zconf.h | ||
78 | $(CC) -c $(CFLAGS) $*.c | ||
79 | |||
80 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | ||
81 | zlib.lib: $(OBJ1) $(OBJ2) | ||
82 | $(LIB) zlib +$(OBJP1) | ||
83 | $(LIB) zlib +$(OBJP2) | ||
84 | |||
85 | example.exe: example.obj zlib.lib | ||
86 | $(LD) $(LDFLAGS) -eexample.exe example.obj zlib.lib | ||
87 | |||
88 | minigzip.exe: minigzip.obj zlib.lib | ||
89 | $(LD) $(LDFLAGS) -eminigzip.exe minigzip.obj zlib.lib | ||
90 | |||
91 | test: example.exe minigzip.exe | ||
92 | example | ||
93 | echo hello world | minigzip | minigzip -d | ||
94 | |||
95 | #clean: | ||
96 | # del *.obj | ||
97 | # del *.exe | ||