# file: Makefile	G. Moody		24 February 2002
#			Last revised:		17 October 2002
# This file is used to compile and install miscellaneous 'plt'-related stuff.
# ----------------------------------------------------------------------------
# Site-dependent variables:

# INSTALL_PREFIX is the root of the tree into which everything is installed.
INSTALL_PREFIX=/usr/local

# BINDIR is the directory into which the executables and shell scripts are
# to be installed.  You must have write permission in BINDIR to complete the
# installation successfully.
BINDIR = $(INSTALL_PREFIX)/bin

# It should not be necessary to modify anything below this line.
# ----------------------------------------------------------------------------

# `make all' (or just `make') compiles the targets but does not install them.
# You must have write permission in this directory, but nothing more is needed.
all:		ftable
	@echo "plt-misc compiled successfully.  Install by typing:"
	@echo "    make install"

# `make install' compiles the targets if necessary, then installs the `plt'
# script and the targets in BINDIR.  It edits `lwcat' to set the correct path
# name for `plt.pro', and installs `lwcat' and `gvcat' in BINDIR and
# `plt.pro' in PSPDIR.  You must have write permission in BINDIR and PSPDIR.
install:	all
	-mkdir -p $(BINDIR)
	cp ftable pltf $(BINDIR)

# ftable: given a function of x, ftable makes a bc script for generating a
# table of function values.
ftable:		ftable.c
	$(CC) $(CFLAGS) -o $@ ftable.c

# Remove binary and backup files.
clean:
	rm -f ftable ftable.exe *.o *~ core
