

IDEFS = -I/usr/include/tcl -DDOUBLE -I/usr/local/plplot/include -I/usr/X11R6/include -I/usr/local/include

PLPLOT = -L/xw/contrib/plplot/ # get yourself a copy of plplot and change this to
#                              #         -L/usr/local/plplot/lib
#                              # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

LDEFS = -L/usr/X11R6/lib/ -lplplotftk -ltk -ltcl -lX11 -lieee  -lm
DDEFS = -Wall -ggdb

all:	plplot/graphic.o
	makemfx runexp.h       # create MFX communication files from runexp.h
	cc -c runexp.c -o runexp.o $(DDEFS)
	cc -o ../runexp runexp.o plplot/graphic.o $(PLPLOT) $(LDEFS)

plplot/graphic.o:	plplot/graphic.c
	(cd plplot; cc $(DDEFS) $(IDEFS) -c graphic.c -o graphic.o) 

clean:
	rm -f *~
	rm -f runexp
	rm -f *.xbc *.xbh *mfx.c
	rm -f *.o
	rm -f *.mfx
	rm -f xbmfx.*
	rm -f *mfx.mta
	rm -f *wdw.mta
