86 lines
2.6 KiB
XML
86 lines
2.6 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<project name="MSPSim COOJA support" default="jar" basedir=".">
|
|
<property name="src" location="src"/>
|
|
<property name="build" location="build"/>
|
|
<property name="lib" location="lib"/>
|
|
<property name="javadoc" location="javadoc"/>
|
|
<property name="cooja" location="../.."/>
|
|
|
|
<property name="cooja_jar" value="${cooja}/dist/cooja.jar"/>
|
|
<property name="mspsim" location="${cooja}/../mspsim"/>
|
|
<property name="mspsim_jar" value="${mspsim}/mspsim.jar"/>
|
|
<property name="coffee" location="../../../coffee-manager"/>
|
|
<property name="coffee_jar" value="${lib}/coffee.jar"/>
|
|
<property name="cooja_mspsim_jar" value="${lib}/cooja_mspsim.jar"/>
|
|
|
|
<target name="init">
|
|
<tstamp/>
|
|
<mkdir dir="${build}"/>
|
|
<mkdir dir="${lib}"/>
|
|
</target>
|
|
|
|
<target name="clean">
|
|
<delete dir="${build}"/>
|
|
<delete dir="${lib}"/>
|
|
</target>
|
|
|
|
<target name="mspsim" depends="init">
|
|
<fail>-
|
|
----------------
|
|
Could not find the MSPSim build file. Did you run "git submodule update --init"?
|
|
----------------
|
|
<condition><not>
|
|
<available file="${mspsim}/build.xml" />
|
|
</not></condition>
|
|
</fail>
|
|
<ant antfile="build.xml" dir="${mspsim}" target="jar" inheritAll="false"/>
|
|
<copy todir="${lib}" file="${mspsim_jar}" />
|
|
<copy todir="${lib}" file="${mspsim}/lib/jipv6.jar" />
|
|
</target>
|
|
|
|
<target name="coffee" depends="init">
|
|
<ant antfile="build.xml" dir="${coffee}" target="jar" inheritAll="false"/>
|
|
<copy todir="${lib}" file="${coffee}/coffee.jar" />
|
|
</target>
|
|
|
|
<target name="compile" depends="init,mspsim,coffee">
|
|
<javac srcdir="${src}" destdir="${build}" debug="on"
|
|
includeantruntime="false">
|
|
<classpath>
|
|
<pathelement location="${mspsim_jar}"/>
|
|
<pathelement location="${coffee_jar}"/>
|
|
<pathelement location="${cooja_jar}"/>
|
|
</classpath>
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="javadoc" depends="compile">
|
|
<delete dir="${javadoc}" quiet="true"/>
|
|
<mkdir dir="${javadoc}/"/>
|
|
<javadoc destdir="${javadoc}">
|
|
<fileset dir="${src}/" includes="**/*.java"/>
|
|
<classpath>
|
|
<pathelement location="${mspsim_jar}"/>
|
|
<pathelement location="${coffee_jar}"/>
|
|
<pathelement location="${cooja_jar}"/>
|
|
</classpath>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<target name="copy" depends="init">
|
|
<copy todir="build">
|
|
<fileset file="exp5438.png"/>
|
|
<fileset file="tyndall.png"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="jar" depends="init, compile, copy">
|
|
<jar destfile="${cooja_mspsim_jar}" basedir="${build}">
|
|
<manifest>
|
|
<attribute name="Class-Path" value="."/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
</project>
|