2006-08-21 14:11:16 +02:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="COOJA Simulator" default="help" basedir=".">
|
|
|
|
<property name="java" location="java"/>
|
|
|
|
<property name="build" location="build"/>
|
|
|
|
<property name="javadoc" location="javadoc"/>
|
|
|
|
<property name="config" location="config"/>
|
|
|
|
<property name="dist" location="dist"/>
|
|
|
|
<property name="lib" location="lib"/>
|
|
|
|
<property name="args" value="" />
|
|
|
|
|
|
|
|
<target name="help">
|
|
|
|
<echo>
|
|
|
|
The COOJA Simulator
|
|
|
|
|
|
|
|
> ant run
|
|
|
|
Starts COOJA simulator
|
2007-08-20 11:15:34 +02:00
|
|
|
</echo>
|
2006-08-21 14:11:16 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<tstamp/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javadoc" depends="init">
|
|
|
|
<delete dir="${javadoc}" quiet="true"/>
|
|
|
|
<mkdir dir="${javadoc}/"/>
|
|
|
|
<javadoc destdir="${javadoc}">
|
|
|
|
<fileset dir="${java}/" includes="**/*.java"/>
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="lib/jdom.jar"/>
|
|
|
|
<pathelement location="lib/log4j.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init">
|
|
|
|
<mkdir dir="${build}"/>
|
2007-08-20 11:15:34 +02:00
|
|
|
<javac srcdir="${java}" destdir="${build}" debug="on">
|
2006-08-21 14:11:16 +02:00
|
|
|
<classpath>
|
|
|
|
<pathelement path="."/>
|
|
|
|
<pathelement location="lib/jdom.jar"/>
|
|
|
|
<pathelement location="lib/log4j.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copy configs" depends="init">
|
|
|
|
<mkdir dir="${build}"/>
|
|
|
|
<copy todir="${build}">
|
|
|
|
<fileset dir="${config}"/>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean" depends="init">
|
|
|
|
<delete dir="${build}"/>
|
|
|
|
<delete dir="${dist}"/>
|
2008-09-17 22:50:54 +02:00
|
|
|
<ant antfile="build.xml" dir="apps/mrm" target="clean" inheritAll="false"/>
|
|
|
|
<ant antfile="build.xml" dir="apps/mspsim" target="clean" inheritAll="false"/>
|
2006-08-21 14:11:16 +02:00
|
|
|
</target>
|
|
|
|
|
2008-09-01 14:47:54 +02:00
|
|
|
<target name="run" depends="init, compile, jar, copy configs">
|
2006-08-21 14:11:16 +02:00
|
|
|
<java fork="yes" dir="${build}" classname="se.sics.cooja.GUI">
|
|
|
|
<arg line="${args}"/>
|
|
|
|
<env key="LD_LIBRARY_PATH" value="."/>
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="${build}"/>
|
|
|
|
<pathelement location="lib/jdom.jar"/>
|
2007-09-06 10:10:04 +02:00
|
|
|
<pathelement location="lib/log4j.jar"/>
|
2008-09-22 18:18:22 +02:00
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="runprof" depends="init, compile, jar, copy configs">
|
|
|
|
<java fork="yes" dir="${build}" classname="se.sics.cooja.GUI">
|
|
|
|
<arg line="${args}"/>
|
|
|
|
<env key="LD_LIBRARY_PATH" value="."/>
|
|
|
|
<jvmarg line="-agentlib:yjpagent"/>
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="${build}"/>
|
|
|
|
<pathelement location="lib/jdom.jar"/>
|
|
|
|
<pathelement location="lib/log4j.jar"/>
|
2007-09-06 10:10:04 +02:00
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2008-10-02 21:56:23 +02:00
|
|
|
<target name="run_bigmem" depends="init, compile, jar, copy configs">
|
2007-09-06 10:10:04 +02:00
|
|
|
<java fork="yes" dir="${build}" classname="se.sics.cooja.GUI" maxmemory="512m">
|
|
|
|
<arg line="${args}"/>
|
|
|
|
<env key="LD_LIBRARY_PATH" value="."/>
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="${build}"/>
|
|
|
|
<pathelement location="lib/jdom.jar"/>
|
2006-08-21 14:11:16 +02:00
|
|
|
<pathelement location="lib/log4j.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2008-09-01 14:47:54 +02:00
|
|
|
<target name="jar" depends="jar_cooja">
|
2008-04-03 16:22:03 +02:00
|
|
|
<ant antfile="build.xml" dir="apps/mrm" target="jar" inheritAll="false"/>
|
|
|
|
<ant antfile="build.xml" dir="apps/mspsim" target="jar" inheritAll="false"/>
|
|
|
|
</target>
|
|
|
|
|
2008-10-02 21:56:23 +02:00
|
|
|
<target name="run_nogui" depends="init, compile, jar, copy configs">
|
2008-04-22 15:10:58 +02:00
|
|
|
<java fork="yes" dir="${build}" classname="se.sics.cooja.GUI" maxmemory="512m">
|
2007-01-09 10:14:25 +01:00
|
|
|
<arg line="-nogui ${args}"/>
|
|
|
|
<env key="LD_LIBRARY_PATH" value="."/>
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="${build}"/>
|
|
|
|
<pathelement location="lib/jdom.jar"/>
|
|
|
|
<pathelement location="lib/log4j.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
2008-04-22 15:10:58 +02:00
|
|
|
|
2008-10-02 21:56:23 +02:00
|
|
|
<target name="run_applet" depends="init, compile, jar, copy configs">
|
2008-02-12 16:17:50 +01:00
|
|
|
<exec executable="appletviewer" dir="${build}">
|
|
|
|
<arg value="-J-Djava.security.policy=cooja.policy"/>
|
|
|
|
<arg value="cooja.html"/>
|
|
|
|
<env key="LD_LIBRARY_PATH" value="."/>
|
|
|
|
<env key="CLASSPATH" path="${build}"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2008-04-24 13:36:07 +02:00
|
|
|
<target name="java_version" depends="init">
|
|
|
|
<exec executable="javac" dir="${build}">
|
|
|
|
<arg value="-version"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2008-09-01 14:47:54 +02:00
|
|
|
<target name="jar_cooja" depends="init, compile, copy configs">
|
2006-08-21 14:11:16 +02:00
|
|
|
<mkdir dir="${dist}"/>
|
|
|
|
<jar destfile="${dist}/cooja.jar" basedir="${build}">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="se.sics.cooja.GUI"/>
|
|
|
|
<attribute name="Class-Path" value=". lib/log4j.jar lib/jdom.jar"/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
<mkdir dir="${dist}/lib"/>
|
|
|
|
<copy todir="${dist}/lib">
|
|
|
|
<fileset dir="${lib}"/>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|