INCLUDES=/usr/local/include
CFLAGS=-I$(INCLUDES)
OBJ=plotfilter.o xplot.o hpglplot.o graplot.o
BINDIR=../bin

all: xplot hpglplot graplot plot.sh

xplot : $(OBJ)
	cc $(XCCFLAGS) -o xplot plotfilter.o xplot.o -lXaw -lXt -lX11 -lm
hpglplot : $(OBJ)
	cc -o hpglplot plotfilter.o hpglplot.o -lm
graplot: graplot.o plotfilter.o
	cc -o graplot graplot.o plotfilter.o
install: xplot graplot hpglplot plot.sh testgr.sh
	cp xplot graplot hpglplot $(BINDIR)
	cp plot.sh $(BINDIR)/plot
	chmod +x $(BINDIR)/plot
	cp testgr.sh $(BINDIR)/testgr
	chmod +x $(BINDIR)/testgr
	cp graplot $(BINDIR)
	touch install

clean: 
	rm -f $(OBJ) xplot hpglplot graplot
