STRIP= -s
RM=-/bin/rm -f /tmp/$*.*
M4=${SHOME}/src/m4/m4
BIGF77=
RATFOR=ratfor
EFL=efl
CC=cc
F77=$(CC)
F77COMPILE=$(F77)
LDFLAGS=
CFLAGS= -O
FFLAGS= mr1 n600
I=$${SHOME}/newfun/include
RMAC=$I/u/mach.m $I/ratfor.m
EMAC=$I/u/mach.m $I/efl.m
CMAC=$I/u/mach.m $I/u/cdefs.m
L=$${SHOME}/newfun/lib
SL=$${SHOME}/graph/lib
INDDEV=$L/inddev.o
GRAPHLIB=$L/graph.a
PSL=$L/psl.a -lvsfor -lrts -lvssys -lvsfil
LIBR=$L/lang.a $(PSL)
GRZLIB=$L/grz.a $(PSL)
GRZ=$(INDDEV) $(GRAPHLIB) $L/grz.a $L/lang.a $(PSL)
.SUFFIXES:
.SUFFIXES: .o .f .r .e .c .C .i .yr .x
.r.o:
	-/bin/rm -f /tmp/$*.* || true
	$(M4) -DSHOME=$${SHOME} $(RMAC) $*.r >/tmp/$*.r
	$(RATFOR) "-6&" </tmp/$*.r >/tmp/$*.f
	cd /tmp; $(F77COMPILE) $(FFLAGS) -c $*.f
	mv /tmp/$*.o $*.o
	$(RM)
.e.o:
	-/bin/rm -f /tmp/$*.* || true
	$(M4) -DSHOME=$${SHOME} $(EMAC) $*.e >/tmp/$*.e
	$(EFL) /tmp/$*.e >/tmp/$*.f
	cd /tmp; $(F77COMPILE) $(FFLAGS) -c $*.f
	mv /tmp/$*.o $*.o
	$(RM)
.i.x:
	-/bin/rm -f /tmp/$*.* || true
	$${SHOME}/cmd/icomp <$*.i >/tmp/$*.i
	$(M4) -DSHOME=$${SHOME} $${SHOME}/newfun/include/intf.m /tmp/$*.i >/tmp/$*.s
	$(M4) -DSHOME=$${SHOME} $(RMAC) /tmp/$*.s >/tmp/$*.r
	$(RATFOR) "-6&" </tmp/$*.r >/tmp/$*.f
	cd /tmp; $(F77COMPILE) -c $(BIGF77) $(FFLAGS) $*.f 2>&1 | sed "/local variable.*used/d"
	mv /tmp/$*.o $*.x
	$(RM)
.f.o:
	$(F77COMPILE) $(FFLAGS) -c $*.f
.C.o:
	-/bin/rm -f /tmp/$*.c || true
	@echo $*.C
	$(M4) -DSHOME=$${SHOME} $(CMAC) $*.C >/tmp/$*.c
	A=`pwd`; cd /tmp; $(CC) $(CFLAGS) -c -I$$A $*.c
	mv /tmp/$*.o $*.o
	$(RM)
