BD = run
RD = res
SD = src
CD = test
DD = data
CF = conf
LD = log
RR = retro
BASE = baserun
useR = Rnewest

plot: $(RD)/footprint

$(RD)/footprint: $(SD)/sesam.R $(DD)/obs.dat  $(DD)/aux.dat 
	echo 'source("src/sesam.R");' | $(useR) --slave --vanilla 1> $(LD)/plot.out 2> $(LD)/plot.err 
	mv $(LD)/plot.err $(LD)/plot.log

retro: $(RR)/retrorun5.RData

$(RR)/retrorun5.RData: $(SD)/sesam.R $(DD)/obs.dat  $(DD)/aux.dat $(SD)/retro.R
	echo 'source("src/retro.R");' | $(useR) --slave --vanilla 1> $(LD)/retro.out 2> $(LD)/retro.err

clean:
	rm -f $(BD)/*
	rm -f $(LD)/*
	find . -name '*~' -delete
	rm -rf _tmp 
