<!--
	Original makefile by SER

	$Id: $
-->

<project name="Clock" default="compile" basedir=".">
	<path id="class.path">
		<pathelement path="lib"/>
		<pathelement path="/opt/junit/junit.jar"/>
		<fileset dir="lib">
      		<include name="*.jar"/>
      		<include name="*.zip"/>
      	</fileset>
	</path>
	<property name="class.path" refid="class.path"/>
	<taskdef name="script" classname="org.apache.tools.ant.taskdefs.optional.Script"/>

	<target name="compile">
		<javac debug="off" destdir="lib" deprecation="on" srcdir="src" 
			classpathref="class.path"
			excludes=".svn/**,MoonPhase.java"/>
	</target>
	
	<target name="run" depends="compile">
		<java classname="YesClock" classpathref="class.path"/>
	</target>

	<target name="test" depends="compile">
		<junit>
			<classpath refid="class.path"/>
			<test name="Tester"/>
		</junit>
	</target>
	
	<target name="clean">
		<delete>
			<fileset dir="lib" casesensitive="yes" >
  				<patternset id="classes" >
    				<include name="**/*.class"/>
				</patternset>
			</fileset>
		</delete>
	</target>

	<target name="dist" depends="compile">
		<!-- Common classes -->
		<jar jarfile='yesCommon.jar'
			basedir='lib'
			includesfile='common.txt'/>
		<!-- Applet -->
		<jar jarfile="yesApplet.jar"
			basedir="lib"
			includesfile="applet.txt"/>
		<!-- Application -->
		<jar jarfile="yesClock.jar" basedir="lib" manifest="lib/manifest"
			includesfile="application.txt"/>
	</target>
</project>
