#
# 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 rhost.o pftprc.o pfm.o sfiles.o tabdir.o
COBJ= client.o send.o cline.o tty.o server.o receive.o filter.o daemon.o
RM=rm -f
SHELL=/bin/sh
STRIP=strip
MKDIR=mkdir
INSTALL=cp
WHEREIS=whereis

.c.o:
	$(CC) -c $(CFLAGS) $(DEFS) $(DEBUG) $<

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) $(LIBS)
	@if $(WHEREIS) $(STRIP) > /dev/null; then \
		$(STRIP) $(BIN); \
	fi

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

install: $(BIN)
	@if test -z "$(BINDIR)"; then \
		echo "** Please try \`cd .. ; make install'."; \
		echo "** Don't use this description file directly."; \
		exit; \
	fi; \
	if test ! -d "$(BINDIR)"; then \
		$(MKDIR) $(BINDIR); \
		echo $(MKDIR) $(BINDIR); \
	fi; \
	if $(INSTALL) $(BIN) $(BINDIR)/$(BIN); then \
		echo "$(INSTALL) $(BIN) $(BINDIR)/$(BIN)"; \
	else \
		echo "** Can't install \`$(BIN)' in \`$(BINDIR)'!"; \
	fi; \
	if chmod 755 $(BINDIR)/$(BIN); then \
		echo "chmod 755 $(BINDIR)/$(BIN)"; \
	fi

