#
# install script
#
PERMSMTPDIR	= /usr/local/etc
DEAPOPDIR	= /usr/local/sbin
BINDIR		= /usr/local/bin
CGIDIR		= /usr/local/apache/cgi-bin


all:	apopcall

LDFLAGS	= -lcrypt

apopcall:	apopcall.c


install:
	-@[ -d ${PERMSMTPDIR} ] || mkdir -p ${PERMSMTPDIR}
	install -c -m 700 pop3-record ${PERMSMTPDIR}
	csh -c 'ln -f ${PERMSMTPDIR}/pop3-{record,age}'
	csh -c 'ln -f ${PERMSMTPDIR}/pop3-{record,update}'
	-@[ -d ${DEAPOPDIR} ] || mkdir -p ${DEAPOPDIR}
	install -c -m 700 deapop ${DEAPOPDIR}
	install -c -m 755 apoppasswd ${BINDIR}

install-cgi:	apopcall
	install -cs -m 4755 -o 0 apopcall ${CGIDIR}/apopcall.cgi

clean:
	rm apopcall
