1 <!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
4 Subclasses of org.xwt.plat.GCJ should include a .xml file which
5 sets the following properties, then invokes <ant antfile="src/org/xwt/plat/GCJ.xml"/>
7 gcc-target - the gcc target name to use (for example, i686-pc-mingw32)
8 linkflags - extra flags to pass to gcj during the link phase, if any
9 binaryname - the name to give to the final binary
13 <project name="GCJ" default="build">
17 <echo message='extracting .class -> .h'/>
18 <taskdef name='gcjh' classname='org.xwt.tasks.GCJHTask'>
19 <classpath path='bin/'/>
21 <gcjh out='bin-${plat}' classpath='bin'/>
23 <echo message='compiling .java -> .o'/>
24 <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}'>
25 <arg value='-fCLASSPATH=${gcc-path}/share/libgcj.jar:src/'/>
34 <include name='jazz/**/*.java'/>
35 <include name='org/xwt/*.java'/>
36 <include name='org/xwt/util/*.java'/>
37 <include name='org/xwt/plat/GCJ.java'/>
38 <include name='org/xwt/plat/${subplat}.java'/>
39 <include name='org/bouncycastle/**/*.java'/>
40 <include name='org/mozilla/**/*.java'/>
42 <mapper type='glob' from='*.java' to='*.o'/>
45 <echo message='compiling .cc -> .o'/>
46 <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}/'>
48 <arg value='-Ibin-${plat}'/>
53 <fileset dir='src/' includes='org/xwt/plat/${subplat}.cc'/>
54 <mapper type='glob' from='*.cc' to='*-nat.o'/>
57 <echo message='wrapping .xwar -> .o'/>
59 ${gcc-path}/bin/${gcc-target}gcj --resource org/xwt/builtin.xwar -c bin/org/xwt/builtin.xwar -o bin-${plat}/org/xwt/builtin.o
62 <echo message='linking .o -> ${binaryname}'/>
63 <uptodate property="linked" targetfile="bin-${plat}/${binaryname}">
64 <srcfiles dir="bin-${plat}/" includes="**/*.o" excludes='*.o'/>
66 <antcall target="link"/>
70 <target name="link" unless="linked">
71 <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' parallel='true'>
72 <fileset dir='bin-${plat}/' includes='**/*.o' excludes='*.o'/>
73 <arg value='-fCLASSPATH=${gcc-path}/share/libgcj.jar'/>
74 <arg value='--main=org.xwt.Main'/>
75 <arg line='-o bin-${plat}/${binaryname}'/>
77 <arg line='${linkflags}'/>