-
Notifications
You must be signed in to change notification settings - Fork 82
/
build.xml
162 lines (140 loc) · 6.04 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<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="11"/>
<property name="ant.build.javac.target" value="11"/>
<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" encoding="utf-8">
<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="runwismote" depends="jar" description="run MSPSim with platform Wismote">
<property name="FIRMWAREFILE" value="firmware/wismote/blink.wismote"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.wismote.WismoteNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runtyndall" depends="jar" description="run MSPSim with platform Tyndall">
<property name="FIRMWAREFILE" value="firmware/tyndall/blink.tyndall"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.tyndall.TyndallNode">
<arg value="${FIRMWAREFILE}"/>
<arg line="${ARGS}"/>
</java>
</target>
<target name="runexp5438" depends="jar" description="run MSPSim with platform exp5438">
<property name="FIRMWAREFILE" value="firmware/exp5438/tesetcase-bits.exp5438"/>
<java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.ti.Exp5438">
<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="test-cpu" depends="jar" description="run MSPSim CPU test">
<java fork="true" classpath="${jarfile}"
classname="se.sics.mspsim.util.Test"
failonerror="true"
timeout="10000">
<arg value="firmware/sky/cputest.sky"/>
</java>
</target>
<target name="test-timer" depends="jar" description="run MSPSim Timer test">
<java fork="true" classpath="${jarfile}"
classname="se.sics.mspsim.util.Test"
failonerror="true"
timeout="10000">
<arg value="firmware/sky/timertest.sky"/>
</java>
</target>
<target name="test" depends="jar, test-cpu, test-timer"/>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete file="${jarfile}" />
</target>
</project>