2008-07-10 01:18:05 +02:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="Sensor Data Collect with Contiki" default="dist" basedir=".">
|
|
|
|
<property name="java" location="src"/>
|
|
|
|
<property name="build" location="build"/>
|
|
|
|
<property name="lib" location="lib"/>
|
|
|
|
<property name="dist" location="dist"/>
|
|
|
|
<property name="contiki" location="../.."/>
|
2010-11-12 17:48:32 +01:00
|
|
|
<property name="archive" value="collect-view.jar"/>
|
2008-07-10 01:18:05 +02:00
|
|
|
<property name="main" value="se.sics.contiki.collect.CollectServer"/>
|
2010-11-12 17:48:32 +01:00
|
|
|
<property name="args" value="" />
|
|
|
|
|
|
|
|
<path id="classpath">
|
|
|
|
<fileset dir="${lib}" includes="**/*.jar"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<manifestclasspath property="jar.classpath" jarfile="${archive}">
|
|
|
|
<classpath refid="classpath" />
|
|
|
|
</manifestclasspath>
|
2008-07-10 01:18:05 +02:00
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<tstamp/>
|
|
|
|
<mkdir dir="${build}"/>
|
2010-11-12 17:48:32 +01:00
|
|
|
<mkdir dir="${dist}"/>
|
2008-07-10 01:18:05 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init">
|
2010-11-12 17:48:32 +01:00
|
|
|
<javac srcdir="${java}" destdir="${build}" classpathref="classpath"
|
|
|
|
debug="true" includeantruntime="false" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jar" depends="compile">
|
|
|
|
<jar destfile="${dist}/${archive}" basedir="${build}">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="${main}"/>
|
|
|
|
<attribute name="Class-Path" value="${jar.classpath}" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
<mkdir dir="${dist}/lib"/>
|
|
|
|
<copy todir="${dist}/lib">
|
|
|
|
<fileset dir="${lib}"/>
|
|
|
|
</copy>
|
2008-07-10 01:18:05 +02:00
|
|
|
</target>
|
|
|
|
|
2010-11-12 01:19:37 +01:00
|
|
|
<condition property="sky-shell.exists">
|
|
|
|
<available file="${dist}/sky-shell.ihex"/>
|
|
|
|
</condition>
|
|
|
|
|
2010-11-12 17:48:32 +01:00
|
|
|
<target name="sky-shell.ihex" unless="sky-shell.exists" depends="init">
|
2010-11-12 01:19:37 +01:00
|
|
|
<exec dir="${contiki}/examples/sky-shell" executable="make">
|
|
|
|
<arg value="TARGET=sky"/>
|
|
|
|
<arg value="sky-shell.ihex"/>
|
|
|
|
</exec>
|
|
|
|
<copy todir="${dist}" file="${contiki}/examples/sky-shell/sky-shell.ihex"/>
|
|
|
|
</target>
|
|
|
|
|
2010-11-12 17:48:32 +01:00
|
|
|
<target name="dist" depends="jar,sky-shell.ihex">
|
2008-07-10 01:18:05 +02:00
|
|
|
<copy todir="${dist}" file="collect-init.script"/>
|
|
|
|
<mkdir dir="${dist}/tools"/>
|
|
|
|
<copy todir="${dist}/tools">
|
2008-07-10 16:52:59 +02:00
|
|
|
<fileset dir="${contiki}/tools/sky"/>
|
2008-07-10 01:18:05 +02:00
|
|
|
</copy>
|
2008-07-10 02:23:30 +02:00
|
|
|
<copy file="${contiki}/tools/cygwin/cygwin1.dll" todir="${dist}/tools"/>
|
2008-09-03 15:35:21 +02:00
|
|
|
<chmod dir="${dist}/tools" perm="a+x" includes="**/*"/>
|
2008-07-10 01:18:05 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="run" depends="dist">
|
2010-11-12 17:48:32 +01:00
|
|
|
<java fork="yes" dir="${dist}" jar="${dist}/${archive}">
|
|
|
|
<arg line="${args}"/>
|
|
|
|
</java>
|
2008-07-10 01:18:05 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${build}"/>
|
|
|
|
<delete dir="${dist}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|