#
# pftp -- sends files from host to host through free choosable ports
#
# Copyright (C) 1996-1999 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:    support@pftp.de
#
# This program is dedicated to my girl-friend, Heather O'Rourke.
#
#
##################################################################

.SUFFIXES:
.SUFFIXES: .o .c

BIN=pftp
HEADER= status.h defines.h connect.h
OBJ= tcptest.o gethost.o tty.o userinit.o clmisc.o createrc.o \
     initstr.o main.o filter.o tabdir.o client.o help.o pinfo.o \
     browse.o listhost.o receive.o cline.o pmanager.o send.o \
     server.o socket.o sfiles.o pager.o signal.o pass.o udp.o \
     login.o timing.o rcval.o psort.o exprog.o misc.o rhost.o \
     bitrate.o setvars.o

RM=rm -f
SHELL=/bin/sh
STRIP=strip
MKDIR=mkdir
INSTALL=cp
WHEREIS=which

.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: $(HEADER)

$(OBJ:main.o=): $(HEADER) main.h

$(BIN): $(OBJ)
	$(CC) -o $@ $(OBJ) $(LIBS)
	@if [ -x /usr/bin/strip ]; then \
		$(STRIP) $(BIN) 2> /dev/null; \
	fi;

clean:
	$(RM) $(OBJ) $(BIN)

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; \
	echo "$(RM) $(BINDIR)/$(BIN)"; \
	$(RM) $(BINDIR)/$(BIN); \
	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

