# mkfile for zlib
# Copyright (C) 1995-2005 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h

# To compile and test, type:
#    ./configure; make test
# The call of configure is optional if you don't have special requirements
# If you wish to build zlib as a shared library, use: ./configure -s

# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
#    make install
# To install in $HOME instead of /usr/local, use:
#    make install prefix=$HOME
APE=/sys/src/ape
<$APE/config

LIB=../../libpython.a$O
OFILES=adler32.$O compress.$O crc32.$O gzio.$O uncompr.$O deflate.$O trees.$O \
       zutil.$O inflate.$O infback.$O inftrees.$O inffast.$O

CC=pcc -c
LD=pcc
CFLAGS=-D_C99_SNPRINTF_EXTENSION
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-g -DDEBUG
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
#           -Wstrict-prototypes -Wmissing-prototypes
CPP=$CC -E
EXE=

TEST_OBJS=example.$O minigzip.$O

</sys/src/cmd/mksyslib

progs:V: example$EXE minigzip$EXE

example$EXE: example.$O $LIBS
	$CC $CFLAGS -o $target example.$O $LDFLAGS

minigzip$EXE: minigzip.$O $LIBS
	$CC $CFLAGS -o $target minigzip.$O $LDFLAGS

mostlyclean:V: clean
maintainer-clean:V: distclean
distclean:V: clean
	cp -x Makefile.in Makefile
	cp -x zconf.in.h zconf.h
	rm -f .DS_Store

# DO NOT DELETE THIS LINE -- make depend depends on it.

adler32.$O: zlib.h zconf.h
compress.$O: zlib.h zconf.h
crc32.$O: crc32.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
inffast.$O: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.$O: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
infback.$O: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.$O: zutil.h zlib.h zconf.h inftrees.h
minigzip.$O: zlib.h zconf.h
trees.$O: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.$O: zlib.h zconf.h
zutil.$O: zutil.h zlib.h zconf.h
