LIBNAME=	libz
#
# ZMailer routines destined for the system C library
#
SHELL=		/bin/sh
CC=		cc # gcc -Wall -pedantic
COPTS=		-g
DEFS=
RANLIB=		ranlib # : ar does the work of ranlib under System V
LIBZ_INCL=	
#
INCL=		-I../include -I../router
CFLAGS=		$(COPTS) $(DEFS) $(INCL) $(LIBZ_INCL)
#
OBJS=	esyslib.o stringlib.o rfc822date.o detach.o \
	killprev.o linebuffer.o loginit.o die.o \
	ranny.o trusted.o allocate.o prversion.o \
	cleanenv.o splay.o rfc822scan.o token.o symbol.o \
	strmatch.o nobody.o pwdgrp.o dottedquad.o hostent.o
SOURCE=	esyslib.c stringlib.c rfc822date.c detach.c \
	killprev.c linebuffer.c loginit.c die.c \
	ranny.c trusted.c allocate.c prversion.c \
	cleanenv.c splay.c rfc822scan.c token.c symbol.c \
	strmatch.c nobody.c pwdgrp.c dottedquad.c hostent.c

$(LIBNAME).a:	$(SOURCE)
	$(CC) $(CFLAGS) -c $?
	ar rv $@ *.o
	-rm -f *.o
	$(RANLIB) $@

lintlib:	llib-l$(LIBNAME).ln

llib-l$(LIBNAME).ln:	$(SOURCE)
	lint -o $(LIBNAME) $(INCL) *.c

lint:
	lint -u $(DEFS) $(INCL) $(SOURCE)

clean:
	-rm -f $(LIBNAME).a make.log Makefile.bak
	-rm -f *.o *.out *.ln

depend:
	../bin/mklibdep $(CFLAGS) $(SOURCE)

# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

esyslib.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
esyslib.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
esyslib.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
	@touch $@
rfc822date.c: ../include/mailer.h ../include/sysprotos.h
rfc822date.c: ../include/libsupport.h ../include/malloc.h
rfc822date.c: ../include/listutils.h ../include/malloc.h ../include/token.h
rfc822date.c: ../include/splay.h ../include/rfc822.entry
	@touch $@
detach.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
detach.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
detach.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
	@touch $@
killprev.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
killprev.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
killprev.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
	@touch $@
linebuffer.c: ../include/mailer.h ../include/sysprotos.h
linebuffer.c: ../include/libsupport.h ../include/malloc.h
linebuffer.c: ../include/listutils.h ../include/malloc.h ../include/token.h
linebuffer.c: ../include/splay.h ../include/rfc822.entry ../libsh/io.h
	@touch $@
loginit.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
loginit.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
loginit.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
	@touch $@
die.c: ../include/sysprotos.h
	@touch $@
ranny.c: ../include/sysprotos.h
	@touch $@
trusted.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
trusted.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
trusted.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
	@touch $@
allocate.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
allocate.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
allocate.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
	@touch $@
prversion.c: ../include/sysprotos.h
	@touch $@
cleanenv.c: ../include/sysprotos.h
	@touch $@
splay.c: ../include/sysprotos.h ../include/splay.h ../include/malloc.h
	@touch $@
rfc822scan.c: ../include/mailer.h ../include/sysprotos.h
rfc822scan.c: ../include/libsupport.h ../include/malloc.h
rfc822scan.c: ../include/listutils.h ../include/malloc.h ../include/token.h
rfc822scan.c: ../include/splay.h ../include/rfc822.entry
	@touch $@
token.c: ../include/mailer.h ../include/sysprotos.h ../include/libsupport.h
token.c: ../include/malloc.h ../include/listutils.h ../include/malloc.h
token.c: ../include/token.h ../include/splay.h ../include/rfc822.entry
token.c: ../libsh/io.h
	@touch $@
symbol.c: ../include/sysprotos.h ../include/splay.h ../include/malloc.h
	@touch $@
nobody.c: ../include/sysprotos.h ../include/libsupport.h
	@touch $@
pwdgrp.c: ../include/libsupport.h ../include/sysprotos.h
	@touch $@
dottedquad.c: ../include/libsupport.h ../include/sysprotos.h
	@touch $@
hostent.c: ../include/libsupport.h
	@touch $@

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
