<gcjh out='bin-${plat}' classpath='bin'/>
<echo message='compiling .java -> .o'/>
- <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}-gcj' dest='bin-${plat}'>
+ <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}'>
<arg value='-fCLASSPATH=${gcc-path}/share/libgcj.jar:src/'/>
<arg value='-O9'/>
<arg value='-g'/>
<include name='org/xwt/*.java'/>
<include name='org/xwt/util/*.java'/>
<include name='org/xwt/plat/GCJ.java'/>
- <include name='org/xwt/plat/${plat}.java'/>
+ <include name='org/xwt/plat/${subplat}.java'/>
<include name='org/bouncycastle/**/*.java'/>
<include name='org/mozilla/**/*.java'/>
</fileset>
</apply>
<echo message='compiling .cc -> .o'/>
- <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}-gcj' dest='bin-${plat}/'>
+ <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}/'>
<arg value='-g'/>
- <arg value='-fno-rtti'/>
<arg value='-Ibin-${plat}'/>
<arg value='-c'/>
<srcfile/>
<arg value='-o'/>
<targetfile/>
- <fileset dir='src/' includes='org/xwt/plat/${plat}.cc'/>
+ <fileset dir='src/' includes='org/xwt/plat/${subplat}.cc'/>
<mapper type='glob' from='*.cc' to='*-nat.o'/>
</apply>
+ <echo message='wrapping .xwar -> .o'/>
+ <bash>
+ ${gcc-path}/bin/${gcc-target}gcj --resource org/xwt/builtin.xwar -c bin/org/xwt/builtin.xwar -o bin-${plat}/org/xwt/builtin.o
+ </bash>
+
<echo message='linking .o -> ${binaryname}'/>
- <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}-gcj' parallel='true'>
+ <uptodate property="linked" targetfile="bin-${plat}/${binaryname}">
+ <srcfiles dir="bin-${plat}/" includes="**/*.o" excludes='*.o'/>
+ </uptodate>
+ <antcall target="link"/>
+
+ </target>
+
+ <target name="link" unless="linked">
+ <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' parallel='true'>
<fileset dir='bin-${plat}/' includes='**/*.o' excludes='*.o'/>
<arg value='-fCLASSPATH=${gcc-path}/share/libgcj.jar'/>
<arg value='--main=org.xwt.Main'/>
- <arg line='-o www/html/dist/${binaryname}'/>
+ <arg line='-o bin-${plat}/${binaryname}'/>
<srcfile/>
<arg line='${linkflags}'/>
</apply>
-
</target>
</project>