.PHONY : all classes model repository schemas transformations patterns ssdformats queries\
	 editor

.SUFFIXES : 

.SUFFIXES : .java .class

JFLAGS :=
JCCFLAGS := -O -deprecation

run : 
	@echo "Use the following"
	@echo "make yattamodel to create the YATTA model"	
	@echo "make demo        to run data integration demo"
	@echo "make queries to test the query processor"
	@echo "make clean       to wipe class files"

demo : schemas patterns ssdformats transformations  

yattamodel : repository model

queries: TestQuerySygIntegration.class
	java $(JFLAGS) TestQuerySygIntegration

model : DefineYATTAModel.class
	java $(JFLAGS) DefineYATTAModel

repository : DefineRepository.class
	java $(JFLAGS) DefineRepository
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))

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

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

















