This repository has been archived by the owner on Mar 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
95 lines (87 loc) · 4.03 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
<project name="SpanDog" default="uploadandrun">
<description>
Project SpanDog build file
</description>
<!-- set properties for this build -->
<property file="project.properties"/>
<property name="sources.dir" location="sources"/>
<property name="builds.dir" location="builds"/>
<property name="docs.dir" location="docs"/>
<property name="classes.dir" location="${builds.dir}/classes"/>
<property name="nxt.dir" location="${builds.dir}/nxt"/>
<basename property="program" file="spandog.SpanDog"/>
<property name="binary" value="builds/nxt/${program}.nxj" />
<!-- deletes class files -->
<target name="clean" description="clean up all generated files">
<delete dir="${builds.dir}" />
</target>
<target name="compile" depends="clean" description="compile the source" >
<mkdir dir="${classes.dir}" />
<javac srcdir="${sources.dir}" destdir="${classes.dir}">
<bootclasspath>
<pathelement location="${nxj.classes.jar}"/>
</bootclasspath>
</javac>
</target>
<target name="link" depends="compile" description="link the binary" >
<!-- Link the binary and create a signature file -->
<mkdir dir="${nxt.dir}" />
<java classname="js.tinyvm.TinyVM">
<arg value="--bootclasspath"/>
<arg path="${nxj.classes.jar}" />
<arg value="--classpath"/>
<arg path="${classes.dir}" />
<arg value="--writeorder" />
<arg value="LE" />
<arg value="${program}"/>
<arg value="-o"/>
<arg value="${binary}"/>
<arg value="-v"/>
<classpath>
<pathelement location="${nxj.jtools.jar}"/>
<pathelement location="${nxj.commons.jar}"/>
<pathelement location="${nxj.bcel.jar}"/>
</classpath>
</java>
</target>
<target name="upload" depends="link" description="upload the binary" >
<java classname="lejos.pc.tools.NXJUpload" fork="true">
<jvmarg value="-Djava.library.path=${nxj.library.path}"/>
<jvmarg value="-Dnxj.home=${nxj.home}"/>
<arg value="${binary}"/>
<classpath>
<pathelement location="${nxj.jtools.jar}"/>
<pathelement location="${nxj.pctools.jar}"/>
<pathelement location="${nxj.pccomm.jar}"/>
<pathelement location="${nxj.commons.jar}"/>
<pathelement location="${nxj.bcel.jar}"/>
<pathelement location="${nxj.bluecove.jar}"/>
<pathelement location="${nxj.bluecove-gpl.jar}"/>
</classpath>
</java>
</target>
<target name="uploadandrun" depends="link" description="upload and run the binary" >
<java classname="lejos.pc.tools.NXJUpload" fork="true">
<jvmarg value="-Djava.library.path=${nxj.library.path}"/>
<jvmarg value="-Dnxj.home=${nxj.home}"/>
<arg value="${binary}"/>
<arg value="-r"/>
<classpath>
<pathelement location="${nxj.jtools.jar}"/>
<pathelement location="${nxj.pctools.jar}"/>
<pathelement location="${nxj.pccomm.jar}"/>
<pathelement location="${nxj.commons.jar}"/>
<pathelement location="${nxj.bcel.jar}"/>
<pathelement location="${nxj.bluecove.jar}"/>
<pathelement location="${nxj.bluecove-gpl.jar}"/>
</classpath>
</java>
</target>
<target name="javadoc">
<javadoc sourcepath="${sources.dir}" destdir="${docs.dir}/javadoc" packagenames="spandog.*" doctitle="SpanDog API Documentation" bottom="SpanDog API Documentation - Copyright 2010 Sami Saada" header="SpanDog API Documentation - Copyright 2010 Sami Saada" footer="SpanDog API Documentation - Copyright 2010 Sami Saada">
<bootclasspath>
<pathelement location="${nxj.classes.jar}"/>
</bootclasspath>
</javadoc>
</target>
</project>