# If you do not have the shadow-3.3.1 package installed do:
# - remove "-DSHADOW_PWD" in this Makefile
# - remove "-lshadow" in this Makefile


#
# The linux libc maintainers discourage accesses into struct dirent;
# for libc5 -DDIRENT_ILLEGAL_ACCESS is needed - Ray
# not if you use dirfd() as recommended in libc release notes.
# libc5 supports shadow passwords, no need for -lshadow.  --marekm
#
CFLAGS = -O2 -fomit-frame-pointer \
	-include /usr/include/bsd/bsd.h -I/usr/include/bsd \
	-include ftphack.h -I../main/ -DSETPROCTITLE -I../ftp \
	-DFTP_DATA_BOTTOM=40000 -DFTP_DATA_TOP=44999 -DUNIX\
	# -DDIRENT_ILLEGAL_ACCESS

YACC = bison -y
LDFLAGS = -s -v
LDLIBS = -lbsd # -lshadow

all:  ftpd

ftpd: ftpd.o ftpcmd.o glob.o logwtmp.o popen.o vers.o glob.o md5.o

install: ftpd
	install -o root -g root -m 0755 ftpd ${DEBDIR}/usr/sbin/ddftpd

clean:
	rm -f *.o ftpd

