forked from contiki-ng/mspsim
-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.xml
132 lines (112 loc) · 4.85 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<project name="MSPSim" default="jar" basedir=".">
<description>
Builds MSPSim
</description>
<property name="src" location="."/>
<property name="build" location="build"/>
<property name="lib" location="lib"/>
<property name="jarfile" location="mspsim.jar"/>
<property name="javac.debug" value="true"/>
<property name="ant.build.javac.source" value="1.7"/>
<property name="ant.build.javac.target" value="1.7"/>
<property name="ARGS" value=""/>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar"/>
</path>
<manifestclasspath property="jar.classpath" jarfile="${jarfile}">
<classpath refid="classpath" />
</manifestclasspath>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<javac srcdir="${src}" destdir="${build}" classpathref="classpath"
debug="${javac.debug}" includeantruntime="false">
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-deprecation"/>
<exclude name="tests/**" />
</javac>
</target>
<target name="jar" depends="compile" description="generate MSPSim jar file" >
<jar jarfile="${jarfile}" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="se.sics.mspsim.Main"/>
<attribute name="Sealed" value="true"/>
<attribute name="Class-Path" value="${jar.classpath}" />
</manifest>
<fileset dir="." includes="images/*.jpg,images/*.png"/>
</jar>
</target>
<target name="runesb" depends="jar" description="run MSPSim with platform ESB">
<property name="FIRMWAREFILE" value="firmware/esb/sensor-demo.esb"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.esb.ESBNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runsky" depends="jar" description="run MSPSim with platform Sky">
<property name="FIRMWAREFILE" value="firmware/sky/blink.sky"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sky.SkyNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runskyprof" depends="jar" description="run MSPSim with platform Sky for profiling">
<property name="FIRMWAREFILE" value="firmware/sky/blink.sky"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sky.SkyNode">
<jvmarg value="-agentlib:yjpagent" />
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runtelos" depends="jar" description="run MSPSim with platform Telos">
<property name="FIRMWAREFILE" value="firmware/sky/blink.sky"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sky.TelosNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runjcreate" depends="jar" description="run MSPSim with platform Sentilla JCreate">
<property name="FIRMWAREFILE" value="firmware/sky/blink.sky"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.jcreate.JCreateNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runsentillausb" depends="jar" description="run MSPSim with platform Sentilla Gateway USB">
<property name="FIRMWAREFILE" value="firmware/sky/blink.sky"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sentillausb.SentillaUSBNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runz1" depends="jar" description="run MSPSim with platform Zolertia Z1">
<property name="FIRMWAREFILE" value="firmware/z1/blink.z1"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.z1.Z1Node">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="run" depends="jar" description="run MSPSim">
<property name="FIRMWAREFILE" value="firmware/sky/blink.sky"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.Main">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="cputest" depends="jar" description="run MSPSim CPU test">
<property name="FIRMWAREFILE" value="tests/cputest.sky"/>
<available file="${FIRMWAREFILE}" type="file" property="cputest.firmware"/>
<fail message="Please compile the cputest firmware first." unless="cputest.firmware"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.util.Test">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="test" depends="jar"/>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete file="${jarfile}" />
</target>
</project>