<?xml version="1.0"?>
<project name="tema" default="dist" basedir=".">

    <property name="src"      value="src"/>
    <property name="build"    value="build"/>
    <property name="dist"     value="dist"/>
    <property name="res"      value="res"/>
    <property name="doc"      value="doc"/>
    <property name="jar_file" value="tema.jar"/>

    <target name="init">
	<tstamp/>
	<mkdir dir="${build}"/>
    </target>

    <target name="compile" depends="init">
        <javac srcdir="${src}" destdir="${build}"
               deprecation="on" optimize="on" debug="on">
          <!-- <compilerarg value="-Xlint:unchecked"/> -->
        </javac>
    </target>

    <target name="dist" depends="compile">
	<jar jarfile="${dist}/${jar_file}" manifest="${src}/Manifest.mf">
	    <fileset dir="${build}" includes="**/*.class"/>
	    <fileset dir="${res}" includes="**/*"/>
	</jar>
    </target>

    <target name="javadoc" depends="init">
        <javadoc destdir="${doc}/api" sourcepath="${src}"
                 packagenames="kryshen.tema.*">
        </javadoc>
    </target>
 
    <target name="clean">
	<delete>
	    <fileset dir="${build}" includes="**/*.class"/>
	</delete>
	<delete file="${dist}/${jar_file}"/>
	<delete dir="${doc}/api"/>
    </target>
    
</project>