# make file for the IP/TCP/POP3 server for VAX/UNIX 4.3BSD, SVR3.2 && SVR4

# add -DSYSV  for SVR3.2 support
# add -DTLI   for TLI support
# add -DSVR4  for SVR4 support
# add -DANSIC for an ANSIC compiler
# add -DDEBUG for debugging output in logfile
# add -DMBOX_CMD if you want to use the MBOX command
# add -DLOG_SESSIONS for syslog tracking of POP3 sessions
DEFS	=-DLOG_SESSIONS -DANSIC -DHAVE_STRERROR -DSHADOW_PWD
# for the 'gcc' copiler under SVR4 uncomment the following
CC	=gcc
CFLAGS=-O2 -fno-strength-reduce $(DEFS)

# for socket libraries under SVR4 uncomment the following
#LFLAGS	=-lsocket -lnsl
# for socket libraries under SVR3.2 uncomment the following
#LFLAGS =-lsocket -linet -lnsl -lsec
# for Linux uncomment the following
LFLAGS  =

OBJS	= main.o folder.o util.o xcreat.o lock.o

all: pop3d

install: all
	install -o root -g mail -m 2755 -s pop3d ${DEBDIR}/usr/sbin/in.pop3d
	install -o root -g root -m 0644 pop3d.8 ${DEBDIR}/usr/man/man8
	install -o root -g root -m 0644 in.pop3d.8 ${DEBDIR}/usr/man/man8

clean::
	rm -f *.o core pop3d

pop3d: $(OBJS)
	cc -o pop3d $(OBJS) $(LFLAGS)

main.o:	main.c pop3.h
folder.o: folder.c pop3.h
util.o: util.c pop3.h

