mirror of https://github.com/madler/zlib.git
parent
4ca984fb44
commit
64b2e89203
23 changed files with 774 additions and 191 deletions
@ -0,0 +1,59 @@ |
||||
CC=gcc
|
||||
CFLAGS=-O2
|
||||
#CFLAGS=-g -DDEBUG
|
||||
LDFLAGS=-L. -lgz
|
||||
|
||||
RANLIB=ranlib
|
||||
|
||||
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
|
||||
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
|
||||
|
||||
TEST_OBJS = example.o minigzip.o inftest.o
|
||||
|
||||
all: example minigzip inftest |
||||
|
||||
test: all |
||||
./example
|
||||
echo hello world | ./minigzip | ./minigzip -d
|
||||
|
||||
libgz.a: $(OBJS) |
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
example: example.o libgz.a |
||||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
|
||||
|
||||
minigzip: minigzip.o libgz.a |
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
|
||||
|
||||
inftest: inftest.o libgz.a |
||||
$(CC) $(CFLAGS) -o $@ inftest.o $(LDFLAGS)
|
||||
|
||||
clean: |
||||
rm -f *.o example minigzip inftest libgz.a foo.gz
|
||||
|
||||
zip: |
||||
zip -ul9 zlib README ChangeLog Makefile *.[ch]
|
||||
|
||||
tgz: |
||||
cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
|
||||
zlib/*.[ch]
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
adler32.o: zutil.h zlib.h zconf.h |
||||
compress.o: zlib.h zconf.h |
||||
crc32.o: zutil.h zlib.h zconf.h |
||||
deflate.o: deflate.h zutil.h zlib.h zconf.h |
||||
example.o: zlib.h zconf.h |
||||
gzio.o: zutil.h zlib.h zconf.h |
||||
infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h |
||||
infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h |
||||
inflate.o: zutil.h zlib.h zconf.h infblock.h |
||||
inftest.o: zutil.h zlib.h zconf.h |
||||
inftrees.o: zutil.h zlib.h zconf.h inftrees.h |
||||
infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
minigzip.o: zlib.h zconf.h |
||||
trees.o: deflate.h zutil.h zlib.h zconf.h |
||||
uncompr.o: zlib.h zconf.h |
||||
zutil.o: zutil.h zlib.h zconf.h |
@ -0,0 +1,98 @@ |
||||
# Makefile for zlib
|
||||
# Borland C++ ************ UNTESTED ***********
|
||||
|
||||
# To use, do "make -fmakefile.bor"
|
||||
|
||||
# WARNING: the small model is supported but only for small values of
|
||||
# MAX_WBITS and MAX_MEM_LEVEL
|
||||
|
||||
# ------------- Turbo C++, Borland C++ -------------
|
||||
MODEL=-ml
|
||||
CFLAGS=-O2 -Z $(MODEL)
|
||||
CC=bcc
|
||||
LD=bcc
|
||||
LIB=tlib
|
||||
# replace bcc with tcc for Turbo C++ 1.0
|
||||
LDFLAGS=$(MODEL)
|
||||
O=.obj
|
||||
|
||||
# variables
|
||||
OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
|
||||
trees$(O)
|
||||
OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\
|
||||
trees$(O)
|
||||
OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
|
||||
infutil$(O) inffast$(O)
|
||||
OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
|
||||
infutil$(O)+inffast$(O)
|
||||
|
||||
all: test |
||||
|
||||
adler32.obj: adler32.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
compress.obj: compress.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
crc32.obj: crc32.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
gzio.obj: gzio.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
|
||||
infcodes.h infutil.h
|
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
|
||||
infcodes.h inffast.h
|
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
uncompr.obj: uncompr.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
zutil.obj: zutil.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
example.obj: example.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
minigzip.obj: minigzip.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
# we must cut the command line to fit in the MS/DOS 128 byte limit:
|
||||
zlib.lib: $(OBJ1) $(OBJ2) |
||||
$(LIB) zlib +$(OBJP1)
|
||||
$(LIB) zlib +$(OBJP2)
|
||||
|
||||
example.exe: example.obj zlib.lib |
||||
$(LD) $(LDFLAGS) example.obj zlib.lib
|
||||
|
||||
minigzip.exe: minigzip.obj zlib.lib |
||||
$(LD) $(LDFLAGS) minigzip.obj zlib.lib
|
||||
|
||||
test: example.exe minigzip.exe |
||||
example
|
||||
echo hello world | minigzip | minigzip -d
|
||||
|
||||
#clean:
|
||||
# del *.obj
|
||||
# del *.exe
|
@ -0,0 +1,95 @@ |
||||
# Makefile for zlib
|
||||
# Microsoft C 5.1 or later
|
||||
|
||||
# To use, do "make makefile.msc"
|
||||
|
||||
# WARNING: the small model is supported but only for small values of
|
||||
# MAX_WBITS and MAX_MEM_LEVEL
|
||||
|
||||
# ------------- Microsoft C 5.1 and later -------------
|
||||
MODEL=-AL
|
||||
CFLAGS=-Oait -Gs -nologo -W3 $(MODEL)
|
||||
#-Ox generates bad code with MSC 5.1
|
||||
CC=cl
|
||||
LD=link
|
||||
LDFLAGS=/e/st:0x1000/noe
|
||||
O=.obj
|
||||
|
||||
# variables
|
||||
OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
|
||||
trees$(O)
|
||||
OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\
|
||||
trees$(O)
|
||||
OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
|
||||
infutil$(O) inffast$(O)
|
||||
OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
|
||||
infutil$(O)+inffast$(O)
|
||||
|
||||
adler32.obj: adler32.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
compress.obj: compress.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
crc32.obj: crc32.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
gzio.obj: gzio.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
|
||||
infcodes.h infutil.h
|
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
|
||||
infcodes.h inffast.h
|
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
uncompr.obj: uncompr.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
zutil.obj: zutil.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
example.obj: example.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
minigzip.obj: minigzip.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
# we must cut the command line to fit in the MS/DOS 128 byte limit:
|
||||
zlib.lib: $(OBJ1) $(OBJ2) |
||||
lib zlib $(OBJ1);
|
||||
lib zlib $(OBJ2);
|
||||
|
||||
example.exe: example.obj zlib.lib |
||||
$(LD) $(LDFLAGS) example.obj,,,zlib.lib;
|
||||
|
||||
minigzip.exe: minigzip.obj zlib.lib |
||||
$(LD) $(LDFLAGS) minigzip.obj,,,zlib.lib;
|
||||
|
||||
test: example.exe minigzip.exe |
||||
example
|
||||
echo hello world | minigzip | minigzip -d
|
||||
|
||||
#clean:
|
||||
# del *.obj
|
||||
# del *.exe
|
@ -0,0 +1,97 @@ |
||||
# Makefile for zlib
|
||||
# TurboC 2.0
|
||||
|
||||
# To use, do "make -fmakefile.tc"
|
||||
|
||||
# WARNING: the small model is supported but only for small values of
|
||||
# MAX_WBITS and MAX_MEM_LEVEL
|
||||
|
||||
# ------------- Turbo C 2.0 -------------
|
||||
MODEL=-ml
|
||||
CFLAGS=-O2 -Z $(MODEL)
|
||||
CC=tcc
|
||||
LD=tcc
|
||||
LIB=tlib
|
||||
LDFLAGS=$(MODEL)
|
||||
O=.obj
|
||||
|
||||
# variables
|
||||
OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
|
||||
trees$(O)
|
||||
OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\
|
||||
trees$(O)
|
||||
OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
|
||||
infutil$(O) inffast$(O)
|
||||
OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
|
||||
infutil$(O)+inffast$(O)
|
||||
|
||||
all: test |
||||
|
||||
adler32.obj: adler32.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
compress.obj: compress.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
crc32.obj: crc32.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
gzio.obj: gzio.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
|
||||
infcodes.h infutil.h
|
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
|
||||
infcodes.h inffast.h
|
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
uncompr.obj: uncompr.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
zutil.obj: zutil.c zutil.h zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
example.obj: example.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
minigzip.obj: minigzip.c zlib.h zconf.h |
||||
$(CC) -c $(CFLAGS) $*.c
|
||||
|
||||
# we must cut the command line to fit in the MS/DOS 128 byte limit:
|
||||
zlib.lib: $(OBJ1) $(OBJ2) |
||||
$(LIB) zlib +$(OBJP1)
|
||||
$(LIB) zlib +$(OBJP2)
|
||||
|
||||
example.exe: example.obj zlib.lib |
||||
$(LD) $(LDFLAGS) -eexample.exe example.obj zlib.lib
|
||||
|
||||
minigzip.exe: minigzip.obj zlib.lib |
||||
$(LD) $(LDFLAGS) -eminigzip.exe minigzip.obj zlib.lib
|
||||
|
||||
test: example.exe minigzip.exe |
||||
example
|
||||
echo hello world | minigzip | minigzip -d
|
||||
|
||||
#clean:
|
||||
# del *.obj
|
||||
# del *.exe
|
Loading…
Reference in new issue