#### insert configury here
BUILDTOP=../..
CSRCS		=	pop_dele.c pop_dropcopy.c pop_dropinfo.c \
			pop_get_command.c pop_get_subcommand.c pop_init.c \
			pop_last.c pop_list.c pop_log.c pop_lower.c \
			pop_msg.c pop_parse.c pop_pass.c pop_quit.c \
			pop_rset.c pop_send.c pop_stat.c pop_updt.c \
			pop_user.c pop_xtnd.c pop_xmit.c popper.c

OBJS		=	pop_dele.o pop_dropcopy.o pop_dropinfo.o \
			pop_get_command.o pop_get_subcommand.o pop_init.o \
			pop_last.o pop_list.o pop_log.o pop_lower.o \
			pop_msg.o pop_parse.o pop_pass.o pop_quit.o \
			pop_rset.o pop_send.o pop_stat.o pop_updt.o \
			pop_user.o pop_xtnd.o pop_xmit.o popper.o

DOCS		=	README pop3.rfc1081 pop3e.rfc1082 popper.8

INCLUDES	=	popper.h version.h

SRCS		=	${CSRCS} ${INCLUDES}


#               Options are:
#               BIND43HACK      -	If you are using BSD 4.3 domain 
#					name service and you want it to
#				 	resolve each name after reverse
#					resolving the address. This is 
#					silliness.
#		DEBUG		-	Include the debugging code.  Note:  You
#					still have to use the -d or -t flag to
#					enable debugging.
#               HAVE_VSPRINTF   -	If the vsprintf functions are availabl 
#					on your system.
#               SYSLOG42        -	For BSD 4.2 syslog (default is BSD 4.3 
#					syslog).
#               STRNCASECMP     -	If you do not have strncasecmp()
#		KERBEROS  	-       If you want authentication vis Kerberos
#									tom
#		KERBEROS_PASSWD_HSCK -  Use popper as passwd server
#									jon
#		NOSTATUS	-	suppress status lines (RO, U, etc.)
#									tom
#		MH_COMPAT	-	Use the mh style passwd file. Only
#					usefule with -DKERBEROS_PASSWD_HACK
#									tom
#

DEFINES = -DPOP_MAILDIR=\"/usr/spool/mail\" -DPOP_PASSFILE=\"/etc/passwd\" -DPOP_DROP=\"/usr/spool/mail/.%s.temp\" -DKERBEROS 

LIBS=${KRB_LIB} ${DES_LIB}
DEPLIBS=${KRB_LIBDEP} ${DES_LIBDEP}

all:: popper

# program(popper,$(OBJS),${DEPLIBS},${LIBS},${DAEMDIR})
popper: $(OBJS) ${DEPLIBS}
	$(CC) $(CFLAGS) -o $@ $(OBJS) ${LIBS}

install::
	$(INSTALLPROG) popper ${DESTDIR}${DAEMDIR}/popper

install:: popper.8
	$(INSTALLFILE) $(srcdir)/popper.8 ${DESTDIR}${MANDIR}/man8/popper.8

clean::
	$(RM) popper $(OBJS)

clean::
	rm -f core *~ *.o *.Z*

# manpage(8,popper.8)

${OBJS}:    popper.h version.h
