2002/08/07 03:22:58
[org.ibex.core.git] / build.xml
1 <project name="xwt" default="compile" 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         <delete quiet="true" dir="bin"/>
22         <delete quiet="true">
23             <fileset dir="./" casesensitive="yes" defaultexcludes="no">
24                 <include name="bin-*"/>
25                 <include name="**/*~"/>
26                 <include name="**/#*#"/>
27                 <exclude name="**/.#*"/>
28                 <exclude name="**/%*%"/>
29                 <exclude name="**/._*"/>
30                 <exclude name="**/CVS"/>
31                 <exclude name="**/CVS/**"/>
32                 <exclude name="**/.cvsignore"/>
33                 <exclude name="**/SCCS"/>
34                 <exclude name="**/SCCS/**"/>
35                 <exclude name="**/vssver.scc"/>
36                 <exclude name="**/.svn"/>
37                 <exclude name="**/.svn/**"/>
38             </fileset>
39         </delete>
40     </target>
41
42     <!-- compiles all .java files into .class files; all other tasks predepend on this since they need the <taskdef/>'s -->
43     <target name="compile">
44         <mkdir dir="bin/"/>
45         <echo message="compiling   .java -> .class [xwt]"/>
46         <javac destdir="bin/" deprecation="no">
47             <src path="src/"/>
48             <include name="**/*.java"/>
49             <classpath>
50
51                 <!-- don't EVER include the following line anywhere else; it causes really bizarre errors -->
52                 <pathelement location="${gcc-path}/share/libgcj.jar"/>
53                 <path refid="classpath"/>
54
55                 <!-- this is for people who don't have libgcj.jar -->
56                 <pathelement location="lib/libgcj-minimal.jar"/>
57
58             </classpath>
59         </javac>
60         <echo message="updating     .xwt -> .xwar"/>
61         <zip update="true" zipfile="bin/org/xwt/builtin.xwar" basedir="src" includes="org/xwt/builtin/*.png,org/xwt/builtin/*.xwt,org/xwt/builtin/*.xwf"/>
62     </target>
63
64     <target name="build" depends="compile">
65         <ant dir="." antfile="src/org/xwt/plat/${plat}.xml" target="build"/>
66     </target>
67
68 </project>
69
70
71        <!-- old javago optimization code - - reintegrate at some point
72           lib/javago.`uname` -threshold 300 -not-inline-constructor -not-use-invokespecial org/xwt/Box.class
73           lib/javago.`uname` -threshold 300 -not-inline-constructor -not-use-invokespecial org/xwt/Box.class
74           lib/javago.`uname` -threshold 200 -not-inline-constructor -not-use-invokespecial org/xwt/Surface.class
75           lib/javago.`uname` -threshold 50 -not-inline-constructor -not-use-invokespecial org/xwt/GetPutHandler*
76           lib/javago.`uname` -threshold 200 -not-inline-constructor -not-use-invokespecial org/xwt/util/DirtyList.class
77        -->