FC = g77
FFLAGS = -ffree-form
GRAPH = /usr/users/wwwifa/docs/subatom/nucltheo/bin/graph

OBJ = main.o rk.o rkstep.o rkf45.o

all: main plot

main: $(OBJ)
	g77 -o main $(OBJ)

rkf45.o: rkf45.f
	g77 -c rkf45.f

plot: main
	main > plot.dat
	$(GRAPH) \
		--display-type gif \
		--x-label "x" --y-label "y" \
		--top-label "Runge-Kutta midpoint method" \
		plot.dat > plot.gif

clean:
	rm -rf $(OBJ) main
