A massively spiffy yet delicately unobtrusive compression library. (grpc依赖)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.1 KiB

13 years ago
# Makefile for zlib
13 years ago
# Copyright (C) 1995-1996 Jean-loup Gailly.
13 years ago
# For conditions of distribution and use, see copyright notice in zlib.h
13 years ago
CC=cc
CFLAGS=-O
13 years ago
#use -O3 for gcc
#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
13 years ago
#CFLAGS=-g -DDEBUG
13 years ago
LDFLAGS=-L. -lz
13 years ago
RANLIB=ranlib
13 years ago
prefix=/usr/local
13 years ago
exec_prefix = ${prefix}
13 years ago
13 years ago
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
13 years ago
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
13 years ago
13 years ago
TEST_OBJS = example.o minigzip.o
13 years ago
13 years ago
all: example minigzip
13 years ago
test: all
./example
echo hello world | ./minigzip | ./minigzip -d
13 years ago
install: libz.a
-@mkdir $(prefix)/include
-@mkdir $(exec_prefix)/lib
cp zlib.h zconf.h $(prefix)/include
chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
cp libz.a $(exec_prefix)/lib
chmod 644 $(exec_prefix)/lib/libz.a
-@$(RANLIB) $(prefix)/lib/libz.a
# This second ranlib is needed on NeXTSTEP which checks file times
13 years ago
13 years ago
libz.a: $(OBJS)
ar rc $@ $(OBJS)
-@$(RANLIB) $@
13 years ago
13 years ago
example: example.o libz.a
13 years ago
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
13 years ago
minigzip: minigzip.o libz.a
13 years ago
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
clean:
13 years ago
rm -f *.o example minigzip libz.a foo.gz
13 years ago
zip:
13 years ago
zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
descrip.mms *.[ch]
13 years ago
13 years ago
tgz:
cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
TAGS:
etags *.[ch]
13 years ago
# DO NOT DELETE THIS LINE -- make depend depends on it.
13 years ago
adler32.o: zutil.h zlib.h zconf.h
13 years ago
compress.o: zlib.h zconf.h
13 years ago
crc32.o: zutil.h zlib.h zconf.h
13 years ago
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
gzio.o: zutil.h zlib.h zconf.h
13 years ago
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 inffast.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
13 years ago
inflate.o: zutil.h zlib.h zconf.h infblock.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
13 years ago
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
13 years ago
uncompr.o: zlib.h zconf.h
13 years ago
zutil.o: zutil.h zlib.h zconf.h