2002/07/15 23:03:49
[org.ibex.core.git] / build.xml
1 <project name="xwt" default="run" basedir=".">
2
3     <!-- required so that libgcj.jar doesn't interfere with non-gcj compilation -->
4     <property name="build.sysclasspath" value="first"/>
5
6     <property name="gcc-path" value="/usr/local/gcc"/>
7     <property name="build.compiler" value="jikes"/>
8     <property environment="env"/>
9
10     <!-- set up our classpath -->
11     <path id="classpath">
12         <pathelement path="${envCLASSPATH}"/>
13         <pathelement path="bin/"/>
14         <fileset dir="lib">
15             <include name="**/*.jar"/>
16         </fileset>
17     </path>
18
19     <!-- purges binaries we've built -->
20     <target name="clean">
21         <bash>
22             find . -name \*\~ | xargs rm -f
23             find . -name \#\*\# | xargs rm -f
24             rm -rf bin-* bin
25         </bash>
26     </target>
27
28     <!-- compiles all .java files into .class files; all other tasks predepend on this since they need the <taskdef/>'s -->
29     <target name="compile">
30         <mkdir dir="bin/"/>
31         <echo message="compiling   .java -> .class [xwt]"/>
32         <javac destdir="bin/" deprecation="no">
33             <src path="src/"/>
34             <include name="**/*.java"/>
35             <classpath>
36
37                 <!-- don't EVER include the following line anywhere else; it causes really bizarre errors -->
38                 <pathelement location="${gcc-path}/share/libgcj.jar"/>
39                 <path refid="classpath"/>
40
41                 <!-- this is for people who don't have libgcj.jar -->
42                 <pathelement location="lib/libgcj-minimal.jar"/>
43
44             </classpath>
45         </javac>
46         <taskdef name="bash" classname="org.xwt.tasks.BashTask">
47             <classpath path="bin/"/>
48         </taskdef>
49         <echo message="updating builtin.xwar"/>
50         <zip update="true" zipfile="bin/org/xwt/builtin.xwar" basedir="src" includes="org/xwt/builtin/*.png,org/xwt/builtin/*.xwt"/>
51     </target>
52
53     <target name="build" depends="compile">
54         <ant dir="." antfile="src/org/xwt/plat/${plat}.xml" target="build"/>
55     </target>
56
57     <target name="run" depends="compile,build">
58         <ant dir="." antfile="src/org/xwt/plat/${plat}.xml" target="run"/>
59     </target>
60
61 </project>
62
63
64        <!-- old javago optimization code - - reintegrate at some point
65           lib/javago.`uname` -threshold 300 -not-inline-constructor -not-use-invokespecial org/xwt/Box.class
66           lib/javago.`uname` -threshold 300 -not-inline-constructor -not-use-invokespecial org/xwt/Box.class
67           lib/javago.`uname` -threshold 200 -not-inline-constructor -not-use-invokespecial org/xwt/Surface.class
68           lib/javago.`uname` -threshold 50 -not-inline-constructor -not-use-invokespecial org/xwt/GetPutHandler*
69           lib/javago.`uname` -threshold 200 -not-inline-constructor -not-use-invokespecial org/xwt/util/DirtyList.class
70        -->