e1cd97d75b1c0e631b66e75660e40b07b8b989c9
[org.ibex.core.git] / src / org / xwt / plat / GCJ.xml
1 <!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
2 <!--
3
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"/>
6
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
10
11 -->
12
13 <project name="GCJ" default="build">
14
15     <target name="build">
16
17         <echo message='extracting .class -> .h'/>
18         <taskdef name='gcjh' classname='org.xwt.tasks.GCJHTask'>
19             <classpath path='bin/'/>                                                                               
20         </taskdef>
21         <gcjh out='bin-${plat}' classpath='bin'/>
22
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/'/>
26             <arg value='-O9'/>
27             <arg value='-g'/>
28             <arg value='-Isrc/'/>
29             <arg value='-c'/>
30             <srcfile/>
31             <arg value='-o'/>
32             <targetfile/>
33             <fileset dir='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/${plat}.java'/>
39                 <include name='org/bouncycastle/**/*.java'/>
40                 <include name='org/mozilla/**/*.java'/>
41             </fileset>
42             <mapper type='glob' from='*.java' to='*.o'/>
43         </apply>
44
45         <echo message='compiling     .cc -> .o'/>
46             <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}-gcj' dest='bin-${plat}/'>
47             <arg value='-g'/>
48             <arg value='-fno-rtti'/>
49             <arg value='-Ibin-${plat}'/>
50             <arg value='-c'/>
51             <srcfile/>
52             <arg value='-o'/>
53             <targetfile/>
54             <fileset dir='src/' includes='org/xwt/plat/${plat}.cc'/>
55             <mapper type='glob' from='*.cc' to='*-nat.o'/>
56         </apply>
57                                                                               
58         <echo message='linking        .o -> ${binaryname}'/>
59         <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}-gcj' parallel='true'>
60             <fileset dir='bin-${plat}/' includes='**/*.o' excludes='*.o'/>
61             <arg value='-fCLASSPATH=${gcc-path}/share/libgcj.jar'/>
62             <arg value='--main=org.xwt.Main'/>
63             <arg line='-o www/html/dist/${binaryname}'/>
64             <srcfile/>
65             <arg line='${linkflags}'/>
66        </apply>
67
68     </target>
69
70 </project>
71
72