<project default="package">

  <property name="version.num" value="0.1.1" />
  <property name="build.dir" value="../../../../../build/"/>
  <property name="jar.file" value="${build.dir}/uavobject-synthetics/java/juavobjects.jar"/>
  <property name="src.dir" value="${build.dir}/uavobject-synthetics/java/src"/>
  <property name="classes.dir" 	value="${build.dir}/uavobject-synthetics/java/classes"/>

	
  <target name="compile" depends="clean">
    <mkdir dir="${build.dir}" />
    <mkdir dir="${classes.dir}" />
    <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${build.dir}/juavtalk/juavtalk.jar" />
  </target>
  
  <target name="jar" depends="compile">

     <manifest file="MANIFEST.MF">
        <attribute name="Built-By" value="${user.name}" />
        <attribute name="Implementation-Version" 
                     value="${version.num}"/> 
    </manifest>

    <jar destfile="${jar.file}"
         basedir="${classes.dir}"
         includes="**/*.class"
         manifest="MANIFEST.MF"
         />

  </target>

  <target name="clean">
       <delete dir="build" />
       <delete>
         <fileset dir="." includes="${jar.file}"/>
         <fileset file="MANIFEST.MF"/>
       </delete>  
  </target>
  
  <target name="package" depends="compile,jar" />
</project>

