#
# pftp -- sends files from host to host through free choosable ports
#
# Copyright (C) 1996, 1997 Ben Schluricke
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the emplied warranty of MERCHANT-
# ABILITY OF FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# 
#    Written by Ben Schluricke
#    E-Mail:    bhor0533@lehr.chem.TU-Berlin.DE
#
# This program is dedicated to my girl-friend, Heather O'Rourke.
#
#
##################################################################

.SUFFIXES:
.SUFFIXES: .o .c

BIN=pftp
MHEADER= main.h
CHEADER= connect.h
MOBJ= main.o send.o rhost.o pftprc.o tty.o receive.o
COBJ= client.o cline.o server.o filter.o
RM=rm -f
STRIP=strip

.c.o:
	$(CC) -c $(CFLAGS) $(OS) $(PTHREAD) $(PTHREAD_HEADER) $(HAVE_SYS_ERRLIST) $<

all:
	@echo "** Please try \`cd .. ; make'."; \
	echo "** Don't use this description file directly."

program :: $(BIN)

main.o: status.h

$(MOBJ:main.o=): $(MHEADER) status.h

$(COBJ): $(MHEADER) $(CHEADER) status.h

$(BIN): $(MOBJ) $(COBJ)
	$(CC) -o $@ $(MOBJ) $(COBJ) $(LIBPTHREAD)
	@if which $(STRIP) > /dev/null; then \
		$(STRIP) $(BIN); \
	fi

clean:
	$(RM) $(MOBJ) $(COBJ) $(BIN) tags

install: $(BIN)
	@if \
		$(INSTALL) $(BIN) $(BINDIR)/$(BIN); \
	then \
		echo "install $(BIN) $(BINDIR)/$(BIN)"; \
	else \
		echo "** Can't install \`$(BIN)' in \`$(BINDIR)'!"; \
	fi

