.PHONY : all classes models schemas transformations patterns ssdformats \
	 reinitialise editor

.SUFFIXES : 

.SUFFIXES : .java .class

JFLAGS :=
JCCFLAGS := -O -deprecation

run : 
	@echo "Deprecated Makefile:"
	@echo "You should now use the Makefile in the parent directory"
	@echo "to run the YATTA and XML examples."

old_run : 
	@echo "Use the following"
	@echo "make basic       to create YATTA model"
	@echo "make demo        to run semistructured data integration demo"
	@echo "make testyattawrapper to test the yattawrapper"
	@echo "make testssdexample to test the query processor"
	@echo "make reinitialise   to wipe everything from the repository"
	@echo "make clean       to wipe class files"

reinitialise : DefineRepository.class
	java DefineRepository

basic : reinitreps models  

#The order should be, create models, schemas, transformations \
#patterns and then ssdformats  
demo : basic schemas transformations patterns ssdformats 

testyattawrapper: TestYattaWrapper.class
	java $(JFLAGS) TestYattaWrapper

testssdexample: TestSSDExamples.class
	java $(JFLAGS) TestSSDExamples

reinitreps : DefineRepository.class
	java $(JFLAGS) DefineRepository

models : DefineYATTAModel.class
	java $(JFLAGS) DefineYATTAModel

schemas : DefineSchemas.class
	java $(JFLAGS) DefineSchemas

transformations : DefineTransformations.class
	java $(JFLAGS) DefineTransformations

patterns : DefinePatterns.class
	java $(JFLAGS) DefinePatterns

ssdformats : DefineSSDFormats.class
	java $(JFLAGS) DefineSSDFormats

clean :
	rm -f templates/*.class *.class *~

classes : $(patsubst %.java,%.class,$(wildcard *.java))

editor :
	java uk.ac.ic.doc.automed.editor.Gui -d 1.0

%.class : %.java
	javac $(JCCFLAGS) $<

















