osd-contiki/tools/cooja/apps/mspsim/build.xml

87 lines
2.6 KiB
XML
Raw Permalink Normal View History

<?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"/>
2008-03-19 18:28:42 +01:00
<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">
2013-11-14 18:14:03 +01:00
<fail>-
----------------
Could not find the MSPSim build file. Did you run &quot;git submodule update --init&quot;?
----------------
<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}" />
2009-10-27 11:19:07 +01:00
<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">
2008-03-18 17:56:14 +01:00
<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}"/>
2008-03-18 17:56:14 +01:00
<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>