FXDIR   = /killdeer/usr3/pdinda/fx-pgon
SCANLIB = ../SCANLIB/libscan.a
F77     = if77

all: testcompiler.f scantest-1dblock scantest-1dcyclic scantest-3d

run: testcompiler.f scantest-1dblock scantest-1dcyclic scantest-3d
	scantest-1dblock -sz 4 | tee scantest-1dblock.out 
	scantest-1dcyclic -sz 4 | tee scantest-1dcyclic.out
	scantest-3d -sz 64 | tee scantest-3d.out

clean: 
	rm *.o *.f scantest-1dblock scantest-1dcyclic scantest-3d *.out

testcompiler.f: testcompiler.fx
	$(FXDIR)/bin/fx -dp -f77Only testcompiler.fx

scantest-1dblock: scantest-1dblock.o
	$(F77) scantest-1dblock.o $(FXDIR)/lib/libfxnx.a $(SCANLIB) -nx -o \
               scantest-1dblock

scantest-1dcyclic: scantest-1dcyclic.o
	$(F77) scantest-1dcyclic.o $(FXDIR)/lib/libfxnx.a $(SCANLIB) -nx -o \
               scantest-1dcyclic

scantest-3d: scantest-3d.o
	$(F77) scantest-3d.o $(FXDIR)/lib/libfxnx.a $(SCANLIB) -nx -o \
               scantest-3d

scantest-1dblock.o: scantest-1dblock.fx
	$(FXDIR)/bin/fx -dp -numproc 4 -c scantest-1dblock.fx -o \
                     scantest-1dblock.o

scantest-1dcyclic.o: scantest-1dcyclic.fx
	$(FXDIR)/bin/fx -dp -numproc 4 -c scantest-1dcyclic.fx -o \
                     scantest-1dcyclic.o

scantest-3d.o: scantest-3d.fx
	$(FXDIR)/bin/fx -dp -numproc 64 -c scantest-3d.fx -o \
                     scantest-3d.o


