CC = tcc
CFLAGS += -Wall -O #--std=gnu99
LDLIBS += -lm

all: rk12.png rk23.png

rk12.png: rk12.dat
	graph \
		--display-type png \
		--x-label "x" \
		--y-label "y" \
		--top-label "Embedded Runge-Kutta 12" \
		$< > $@
rk12.dat: test-rk12 ; ./$< > $@
test-rk12: test-rk12.o drive.o rkstep12.o

rk23.png: rk23.dat
	graph \
		--display-type png \
		--x-label "x" \
		--y-label "y" \
		--top-label "Embedded Runge-Kutta 23" \
		$< > $@
rk23.dat: test-rk23 ; ./$< > $@
test-rk23: test-rk23.o drive.o rkstep23.o

clean: ; rm -f test-rk12 test-rk23 core* *.png *.dat *.o
