# Zlib buffered i/o functions
#

# this probably shouldn't change unless you use a different version of zlib
INCLUDES=	-I. -I../zlib

# you might want more flags here, i.e. -O2, -g, or equivalent
CFLAGS=	${INCLUDES}

# if your system doesn't have ranlib, change this to /bin/true
RANLIB = ranlib

# if you are not using gcc, change this
CC= gcc

# if your C compiler isn't ansi-compliant, change this
DEFS= -DANSI_COMPLIANT=1


# shouldn't need to edit below this

SRCS=	zfunc.c
OBJS=	zfunc.o
HDRS=

all:	libzf.a

libzf.a: ${OBJS}
	  ar cru libzf.a ${OBJS}
	  $(RANLIB) libzf.a

.c.o:
	${CC} ${CFLAGS} ${DEFS} -c $*.c

clean:
	rm -f *.o core *.a 

distclean: clean
	rm -f libzf.a Makefile

# make dependencies
depend:	${SRCS}
	for i in ${SRCS}; do \
	    g++ -MM ${CFLAGS} $$i >> makedep; done
#	    cc -M ${CFLAGS} $$i | sort | uniq >> makedep; done
	echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
	echo '$$r makedep' >>eddep
	echo 'w' >>eddep
	cp Makefile Makefile.bak
	ed - Makefile < eddep
	rm eddep makedep
	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
	echo '# see make depend above' >> Makefile

# DO NOT DELETE THIS LINE
zfunc.o: zfunc.c zfunc.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
