diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:09:18 -0700 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:09:18 -0700 |
| commit | 23c69f10698301ae97709eb0bbfb371d66b99a08 (patch) | |
| tree | 1956b671b3df8d12c315a38f33b190677ccd659e /Makefile | |
| parent | 6b834a58bdef976383cff6e2a83f353e668a9cf1 (diff) | |
| download | zlib-0.94.tar.gz zlib-0.94.tar.bz2 zlib-0.94.zip | |
zlib 0.94v0.94
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 21 | ||||
| -rw-r--r-- | Makefile.bor | 9 | ||||
| -rw-r--r-- | Makefile.msc | 8 | ||||
| -rw-r--r-- | Makefile.qnx | 75 | ||||
| -rw-r--r-- | Makefile.tc | 17 |
5 files changed, 106 insertions, 24 deletions
| @@ -7,7 +7,7 @@ CFLAGS=-O | |||
| 7 | #use -O3 for gcc to take advantage of inlining | 7 | #use -O3 for gcc to take advantage of inlining |
| 8 | #CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" | 8 | #CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" |
| 9 | #CFLAGS=-g -DDEBUG | 9 | #CFLAGS=-g -DDEBUG |
| 10 | LDFLAGS=-L. -lgz | 10 | LDFLAGS=-L. -lz |
| 11 | 11 | ||
| 12 | RANLIB=ranlib | 12 | RANLIB=ranlib |
| 13 | 13 | ||
| @@ -24,33 +24,34 @@ test: all | |||
| 24 | ./example | 24 | ./example |
| 25 | echo hello world | ./minigzip | ./minigzip -d | 25 | echo hello world | ./minigzip | ./minigzip -d |
| 26 | 26 | ||
| 27 | install: libgz.a | 27 | install: libz.a |
| 28 | -@mkdir $(prefix)/include | 28 | -@mkdir $(prefix)/include |
| 29 | -@mkdir $(prefix)/lib | 29 | -@mkdir $(prefix)/lib |
| 30 | cp zlib.h zconf.h $(prefix)/include | 30 | cp zlib.h zconf.h $(prefix)/include |
| 31 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | 31 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h |
| 32 | cp libgz.a $(prefix)/lib | 32 | cp libz.a $(prefix)/lib |
| 33 | chmod 644 $(prefix)/lib/libgz.a | 33 | chmod 644 $(prefix)/lib/libz.a |
| 34 | 34 | ||
| 35 | libgz.a: $(OBJS) | 35 | libz.a: $(OBJS) |
| 36 | ar rc $@ $(OBJS) | 36 | ar rc $@ $(OBJS) |
| 37 | $(RANLIB) $@ | 37 | $(RANLIB) $@ |
| 38 | 38 | ||
| 39 | example: example.o libgz.a | 39 | example: example.o libz.a |
| 40 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | 40 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) |
| 41 | 41 | ||
| 42 | minigzip: minigzip.o libgz.a | 42 | minigzip: minigzip.o libz.a |
| 43 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | 43 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
| 44 | 44 | ||
| 45 | clean: | 45 | clean: |
| 46 | rm -f *.o example minigzip libgz.a foo.gz | 46 | rm -f *.o example minigzip libz.a foo.gz |
| 47 | 47 | ||
| 48 | zip: | 48 | zip: |
| 49 | zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch] | 49 | zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \ |
| 50 | descrip.mms *.[ch] | ||
| 50 | 51 | ||
| 51 | tgz: | 52 | tgz: |
| 52 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | 53 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ |
| 53 | zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch] | 54 | zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch] |
| 54 | 55 | ||
| 55 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 56 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 56 | 57 | ||
diff --git a/Makefile.bor b/Makefile.bor index 732ea5dd..3a823d0a 100644 --- a/Makefile.bor +++ b/Makefile.bor | |||
| @@ -4,9 +4,11 @@ | |||
| 4 | # To use, do "make -fmakefile.bor" | 4 | # To use, do "make -fmakefile.bor" |
| 5 | 5 | ||
| 6 | # WARNING: the small model is supported but only for small values of | 6 | # WARNING: the small model is supported but only for small values of |
| 7 | # MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory | 7 | # MAX_WBITS and MAX_MEM_LEVEL. For example: |
| 8 | # requirements (default 256K for big objects plus a few K), you can add | 8 | # -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 |
| 9 | # to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | 9 | # If you wish to reduce the memory requirements (default 256K for big |
| 10 | # objects plus a few K), you can add to CFLAGS below: | ||
| 11 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | ||
| 10 | # See zconf.h for details about the memory requirements. | 12 | # See zconf.h for details about the memory requirements. |
| 11 | 13 | ||
| 12 | # ------------- Turbo C++, Borland C++ ------------- | 14 | # ------------- Turbo C++, Borland C++ ------------- |
| @@ -83,6 +85,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h | |||
| 83 | 85 | ||
| 84 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | 86 | # we must cut the command line to fit in the MS/DOS 128 byte limit: |
| 85 | zlib.lib: $(OBJ1) $(OBJ2) | 87 | zlib.lib: $(OBJ1) $(OBJ2) |
| 88 | del zlib.lib | ||
| 86 | $(LIB) zlib +$(OBJP1) | 89 | $(LIB) zlib +$(OBJP1) |
| 87 | $(LIB) zlib +$(OBJP2) | 90 | $(LIB) zlib +$(OBJP2) |
| 88 | 91 | ||
diff --git a/Makefile.msc b/Makefile.msc index d6899d82..335a4e1b 100644 --- a/Makefile.msc +++ b/Makefile.msc | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | # To use, do "make makefile.msc" | 4 | # To use, do "make makefile.msc" |
| 5 | 5 | ||
| 6 | # WARNING: the small model is supported but only for small values of | 6 | # If you wish to reduce the memory requirements (default 256K for big |
| 7 | # MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory | 7 | # objects plus a few K), you can add to CFLAGS below: |
| 8 | # requirements (default 256K for big objects plus a few K), you can add | 8 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 |
| 9 | # to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | ||
| 10 | # See zconf.h for details about the memory requirements. | 9 | # See zconf.h for details about the memory requirements. |
| 11 | 10 | ||
| 12 | # ------------- Microsoft C 5.1 and later ------------- | 11 | # ------------- Microsoft C 5.1 and later ------------- |
| @@ -80,6 +79,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h | |||
| 80 | 79 | ||
| 81 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | 80 | # we must cut the command line to fit in the MS/DOS 128 byte limit: |
| 82 | zlib.lib: $(OBJ1) $(OBJ2) | 81 | zlib.lib: $(OBJ1) $(OBJ2) |
| 82 | del zlib.lib | ||
| 83 | lib zlib $(OBJ1); | 83 | lib zlib $(OBJ1); |
| 84 | lib zlib $(OBJ2); | 84 | lib zlib $(OBJ2); |
| 85 | 85 | ||
diff --git a/Makefile.qnx b/Makefile.qnx new file mode 100644 index 00000000..22b1a234 --- /dev/null +++ b/Makefile.qnx | |||
| @@ -0,0 +1,75 @@ | |||
| 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.tc b/Makefile.tc index e173a559..ceed87dc 100644 --- a/Makefile.tc +++ b/Makefile.tc | |||
| @@ -4,18 +4,20 @@ | |||
| 4 | # To use, do "make -fmakefile.tc" | 4 | # To use, do "make -fmakefile.tc" |
| 5 | 5 | ||
| 6 | # WARNING: the small model is supported but only for small values of | 6 | # WARNING: the small model is supported but only for small values of |
| 7 | # MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory | 7 | # MAX_WBITS and MAX_MEM_LEVEL. For example: |
| 8 | # requirements (default 256K for big objects plus a few K), you can add | 8 | # -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 |
| 9 | # to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | 9 | # If you wish to reduce the memory requirements (default 256K for big |
| 10 | # objects plus a few K), you can add to CFLAGS below: | ||
| 11 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | ||
| 10 | # See zconf.h for details about the memory requirements. | 12 | # See zconf.h for details about the memory requirements. |
| 11 | 13 | ||
| 12 | # ------------- Turbo C 2.0 ------------- | 14 | # ------------- Turbo C 2.0 ------------- |
| 13 | MODEL=-ml | 15 | MODEL=-ml |
| 14 | CFLAGS=-O2 -Z $(MODEL) | 16 | CFLAGS=-O2 -G -Z $(MODEL) |
| 15 | CC=tcc | 17 | CC=tcc -I\tc\include |
| 16 | LD=tcc | 18 | LD=tcc -L\tc\lib |
| 17 | LIB=tlib | 19 | LIB=tlib |
| 18 | LDFLAGS=$(MODEL) | 20 | LDFLAGS=$(MODEL) -f- |
| 19 | O=.obj | 21 | O=.obj |
| 20 | 22 | ||
| 21 | # variables | 23 | # variables |
| @@ -82,6 +84,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h | |||
| 82 | 84 | ||
| 83 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | 85 | # we must cut the command line to fit in the MS/DOS 128 byte limit: |
| 84 | zlib.lib: $(OBJ1) $(OBJ2) | 86 | zlib.lib: $(OBJ1) $(OBJ2) |
| 87 | del zlib.lib | ||
| 85 | $(LIB) zlib +$(OBJP1) | 88 | $(LIB) zlib +$(OBJP1) |
| 86 | $(LIB) zlib +$(OBJP2) | 89 | $(LIB) zlib +$(OBJP2) |
| 87 | 90 | ||
