#	@(#)Makefile	5.11 (Berkeley) 5/11/90
SOCKS_LIB =../lib/libsocks.a

# Define RESOLV_LIB if your system (e.g., SunOS before 4.1.1)
# doesn't search resolver library automatically.
# Leave it undefined otherwise.
# If your compiler or loader complains about _res_init being
# an undefined symbol, then you must define RESOLV_LIB.
#RESOLV_LIB= -lresolv
#
# IRIX should use the next two lines:
#RESOLV_LIB=-lsun
#CCKR=-cckr

# Directory into which rftp program will be installed:
BIN_DEST_DIR=/usr/local/bin

# Directory into which rftp's man page file will be installed:
MAN_DEST_DIR=/usr/local/man/man1

# If your system has getcwd() but no getwd(), uncomment the next line:
#GETCWD=-DGETCWD

CFLAGS = -DCOMPAT -g $(CCKR) $(GETCWD)
# Ultrix should use
#CFLAGS= -g $(GETCWD)

# The 'install' command is assumed to be the BSD variety (using -m to
# set the file mode). If the default 'install' on your system doesn't
# do that, you have to either specify an alternative one in the line below
# (e.g., /usr/ucb/install) or modify the install instructions.
INSTALL= install

#==============================================================================

PROG=	rftp
SRCS=	cmds.c cmdtab.c ftp.c glob.c main.c ruserpass.c domacro.c
OBJS=	cmds.o cmdtab.o ftp.o glob.o main.o ruserpass.o domacro.o

all: echocwd rftp

rftp: $(SRCS) $(SOCKS_LIB)
	$(CC) $(CFLAGS) -o $@ $(SRCS) $(SOCKS_LIB) $(RESOLV_LIB)

install: echocwd rftp
	$(INSTALL) -m 111 rftp $(BIN_DEST_DIR)

install.man: echocwd rftp.1
	$(INSTALL) -m 444 rftp.1 $(MAN_DEST_DIR)

clean: echocwd
	rm -f $(OBJS) core $(PROG)

echocwd:
	@pwd
