# Remove "-D__USE_READLINE__" and "-lreadline", if you do not 
# want to have GNU readline and history support.
# (Use cursor keys for the last ftp commands.)

#
# 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.
# BTW it's struct DIR, not dirent.  --marekm
#
CFLAGS=-O2 -fomit-frame-pointer -I/usr/include/bsd -D__USE_READLINE__ \
		-include /usr/include/bsd/bsd.h -Druserpass=x_ruserpass \
		-DFTP_DATA_BOTTOM=40000 -DFTP_DATA_TOP=44999 \
		# -DDIRENT_ILLEGAL_ACCESS
LDFLAGS=-v
LDLIBS=-lbsd -lreadline

ftp: cmds.o cmdtab.o domacro.o ftp.o glob.o main.o ruserpass.o

install: ftp
	install -s -o root -g root -m 0755 ftp ${DEBDIR}/usr/bin
	(cd ${DEBDIR}/usr/bin && ln -f ftp pftp)
	install -o root -g root -m 0644 ftp.1 ${DEBDIR}/usr/man/man1

clean:
	rm -f *.o ftp

