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-12-07 23:46:12 +01:00
|
|
|
<condition property="collect-view-shell.exists">
|
|
|
|
<available file="${dist}/collect-view-shell.ihex"/>
|
2010-11-12 01:19:37 +01:00
|
|
|
</condition>
|
|
|
|
|
2010-12-07 23:46:12 +01:00
|
|
|
<target name="collect-view-shell.ihex" unless="collect-view-shell.exists" depends="init">
|
|
|
|
<exec dir="${contiki}/examples/collect" executable="make">
|
2010-11-12 01:19:37 +01:00
|
|
|
<arg value="TARGET=sky"/>
|
2010-12-07 23:46:12 +01:00
|
|
|
<arg value="collect-view-shell.ihex"/>
|
2010-11-12 01:19:37 +01:00
|
|
|
</exec>
|
2010-12-07 23:46:12 +01:00
|
|
|
<copy todir="${dist}" file="${contiki}/examples/collect/collect-view-shell.ihex"/>
|
2010-11-12 01:19:37 +01:00
|
|
|
</target>
|
|
|
|
|
2010-12-07 23:46:12 +01:00
|
|
|
<target name="dist" depends="jar,collect-view-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>
|