2012-04-10 10:45:11 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="Cooja: Power Tracker" default="jar" basedir=".">
|
2012-04-10 13:44:31 +00:00
|
|
|
<property name="cooja" location="../.."/>
|
2012-04-10 10:45:11 +00:00
|
|
|
<property name="cooja_jar" value="${cooja}/dist/cooja.jar"/>
|
|
|
|
|
2012-04-10 13:44:31 +00:00
|
|
|
|
2012-04-10 10:45:11 +00:00
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<tstamp/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init">
|
2012-04-10 13:44:31 +00:00
|
|
|
<available file="${cooja_jar}" type="file" property="cooja_jar_exists"/>
|
|
|
|
<fail message="COOJA jar not found at '${cooja_jar}'. Please compile COOJA first." unless="cooja_jar_exists"/>
|
2012-04-10 10:45:11 +00:00
|
|
|
<mkdir dir="build"/>
|
|
|
|
<javac srcdir="java" destdir="build" debug="on" includeantruntime="false">
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="."/>
|
|
|
|
<pathelement location="${cooja_jar}"/>
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean" depends="init">
|
|
|
|
<delete dir="build"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jar" depends="clean, init, compile">
|
|
|
|
<mkdir dir="lib"/>
|
|
|
|
<jar destfile="lib/powertracker.jar" basedir="build">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="."/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jar_and_cooja_run">
|
|
|
|
<ant antfile="build.xml" dir="${cooja}" target="jar" inheritAll="false"/>
|
|
|
|
<ant antfile="build.xml" dir="." target="jar" inheritAll="false"/>
|
|
|
|
<ant antfile="build.xml" dir="${cooja}" target="run" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|