#Makefile for NeXTStep 3.X
# This configuration has not been verified by Stan Barber
# $Id: Makefile.nx3,v 1.4 1997/08/11 08:04:38 sob Exp $
#
CC       = cc
IFLAGS   = -I..
LFLAGS   = -L../support
CFLAGS   = -O2 ${IFLAGS} ${LFLAGS}
LIBES    = -lsupport
LIBC     = 
LINTFLAGS=	
LKERB    = -lauth -lckrb -lkrb -ldes
MKDEP    = ../util/mkdep

SRCS   = ftpd.c ftpcmd.c glob.c logwtmp.c popen.c vers.c access.c extensions.c \
	 realpath.c acl.c private.c authenticate.c conversions.c hostacc.c \
	 sigfix.c
OBJS   = ftpd.o ftpcmd.o glob.o logwtmp.o popen.o vers.o access.o extensions.o \
	 realpath.o acl.o private.o authenticate.o conversions.o hostacc.o \
	 sigfix.o

all: ftpd ftpcount ftpshut ckconfig

ftpcount:	ftpcount.c pathnames.h vers.o
	${CC} ${CFLAGS} -o $@ ftpcount.c vers.o ${LIBES}

ftpshut:    ftpshut.c pathnames.h vers.o
	${CC} ${CFLAGS} -o $@ ftpshut.c vers.o ${LIBES}

ftpd: ${OBJS} ${LIBC}
	${CC} ${CFLAGS} -o $@ ${OBJS} ${LIBES}

ckconfig:   ckconfig.c
	${CC} ${CFLAGS} -o $@ ckconfig.c

index:	index.o ${LIBC}
	${CC} -Bstatic -o $@ index.o

vers.c: ftpcmd.c
	sh newvers.sh

vers.o: vers.c
	${CC} ${CFLAGS} -c vers.c

clean:
	rm -f ${OBJS} ftpd ftpcmd.c ftpshut ftpshut.o ftpcount ftpcount.o
	rm -f core index index.o ckconfig ckconfig.o

cleandir: clean
	rm -f tags .depend

depend: ${SRCS}
	${MKDEP} ${CFLAGS} ${SRCS}

lint: ${SRCS}
	lint ${CFLAGS} ${LINTFLAGS} ${SRCS}

tags: ${SRCS}
	ctags ${SRCS}
