<project name="bbtools" default="dist" basedir=".">
    <description>
        Brian Bushnell's tools!
    </description>

    <!-- genepool specific values; you can override these from the command line -->
    <property name="jcompiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
    <property name="mpijar" location="/usr/common/usg/hpc/openmpi/gnu4.6/sge/1.8.1/ib_2.1-1.0.0/lib/mpi.jar"/>

    <!-- set global properties for this build -->
    <property name="src" location="current"/>
    <property name="build" location="build"/>
    <property name="dist" location="dist"/>
    <property name="resources" location="resources"/>

    <path id="class.path">
        <pathelement location="${mpijar}"/>
    </path>

    <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
    </target>

    <target name="compile" depends="init"
        description="compile the source " >

        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" destdir="${build}" compiler="${jcompiler}" nowarn="true" includeantruntime="false" source="1.7" target="1.7" debug="true" debuglevel="lines,vars,source" >
            <classpath refid="class.path" />
            <exclude name="jgi/KmerNormalizeExact.java" />
        </javac>
    </target>

    <target name="dist" depends="compile"
        description="generate the distribution" >

        <!-- Create the distribution directory -->
        <mkdir dir="${dist}/lib"/>
        <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/lib/BBTools.jar">
            <fileset dir="${build}"/>
            <fileset dir="${resources}"/>
        </jar>
    </target>

    <target name="clean"
        description="clean up" >

        <!-- Delete the ${build} and ${dist} directory trees -->
        <delete dir="${build}"/>
        <delete dir="${dist}"/>
    </target>
</project>
