PATHTOROOT = ../../..

OBJS = \
	DicomInstanceValidator.class \
	DicomIODDescriptionsCompiled.xsl

all:	${OBJS}

include ${PATHTOROOT}/Makefile.common.mk

.java.class:
	javac ${JAVACOPTIONS} -classpath ${PATHTOROOT} \
		-sourcepath ${PATHTOROOT} $<

clean:
	rm -f *~ *.class core *.bak ${OBJS} DicomIODDescriptionsCompiled.xsl

archive:
	tar -cvf - Makefile *.java *.xml *.xsl | gzip -best > ../../../validate.`date '+%Y%m%d'`.tar.gz

DicomIODDescriptionsCompiled.xsl:	DicomIODDescriptionsSource.xml CompileDicomIODDescriptionsIntoXSLT.class ExecuteTranslet.class
	java \
		-cp ${PATHTOROOT} \
		com.pixelmed.validate.ExecuteTranslet CompileDicomIODDescriptionsIntoXSLT.xsl DicomIODDescriptionsSource.xml DicomIODDescriptionsCompiled.xsl
	#rm ExecuteTranslet.class

CompileDicomIODDescriptionsIntoXSLT.class:	CompileDicomIODDescriptionsIntoXSLT.xsl CompileXSLTIntoTranslet.class
	java \
		-cp ${PATHTOROOT} \
		com.pixelmed.validate.CompileXSLTIntoTranslet CompileDicomIODDescriptionsIntoXSLT.xsl
	#rm CompileXSLTIntoTranslet.class

testvalidate:	DicomInstanceValidator.class DicomIODDescriptionsCompiled.xsl
	java -cp ${PATHTOROOT}:${DICOMADDITIONALJARS} \
		com.pixelmed.validate.DicomInstanceValidator \
		${PATHTOHOME}/work/nemamfmr/DISCIMG/IMAGES/CARANGIO \
		DicomIODDescriptionsCompiled.xsl

