all: restriction.o restriction.h testrt

include ../make.incl
include ../make.incl.general

M4 = m4

restriction.f: restriction.f.m4 residual.m4 fullweighting.m4\
               halfweighting.m4 rtheader.m4 fullweighting-o.m4\
               halfweighting-o.m4

	$(M4) $(M4F77FLAGS) restriction.f.m4 > restriction.f

restriction.o: restriction.f
	$(F77) $(F77FLAGS) -c restriction.f

testrt.o: testrt.f
	$(F77) $(F77FLAGS) testrt.f -c

testrt: testrt.o restriction.o
	$(F77) $(F77FLAGS) testrt.o restriction.o -o testrt

testrt.f: testrt.f.m4 general.m4
	$(M4) $(M4F77FLAGS) testrt.f.m4 > testrt.f

restriction.h: restriction.h.m4
	$(M4) $(M4CCFLAGS) restriction.h.m4 > restriction.h

clean:
	rm -f *.o restriction.f testrt.f testrt restriction.h

