.PHONY: all clean

TABLES=table1.tex table2a.tex table2b.tex table3a.tex table3b.tex table4a.tex table4b.tex table5.tex table6.tex table7a.tex table7b.tex table8a.tex table8b.tex
KEYS=table1keys.tex table2keys.tex table3keys.tex table4keys.tex table5keys.tex table6keys.tex table7keys.tex table8keys.tex

all: $(TABLES) $(KEYS)

#Restaurants
table1.tex table1keys.tex: table1.m ../Data/data92rst.mat
	matlab -nodisplay -nosplash -r table1 >> matlab.log

table2a.tex table2b.tex table2keys.tex: table2.m ../Data/data92rst.mat
	matlab -nodisplay -nosplash -r table2 >> matlab.log

table3a.tex table3b.tex table3keys.tex: table3.m ../Data/data92rst.mat
	matlab -nodisplay -nosplash -r table3 >> matlab.log

table4a.tex table4b.tex table4keys.tex: table4.m ../Data/data92rst.mat
	matlab -nodisplay -nosplash -r table4 >> matlab.log

# Refreshment Places
table5.tex table5keys.tex: table5.m ../Data/data92rfp.mat
	matlab -nodisplay -nosplash -r table5 >> matlab.log

table6.tex table6keys.tex: table6.m ../Data/data92rfp.mat
	matlab -nodisplay -nosplash -r table6 >> matlab.log

table7a.tex table7b.tex table7keys.tex: table7.m ../Data/data92rfp.mat
	matlab -nodisplay -nosplash -r table7 >> matlab.log

table8a.tex table8b.tex table8keys.tex: table8.m ../Data/data92rfp.mat
	matlab -nodisplay -nosplash -r table8 >> matlab.log

#Prerequisite Data Sets
../Data/data92rst.mat:
	$(MAKE) -C ../Data data92rst.mat

../Data/data92rfp.mat:
	$(MAKE) -C ../Data data92rfp.mat

#Cleaning target
clean:
	-rm matlab.log $(TABLES) $(KEYS)
