2002/07/16 00:39:23
[org.ibex.core.git] / src / org / xwt / plat / GCJ.xml
index e8b514b..55bb86d 100644 (file)
@@ -43,7 +43,7 @@
         </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='-Ibin-${plat}'/>
             <arg value='-c'/>
             <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}'/>
+        <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'/>
@@ -63,7 +76,6 @@
             <srcfile/>
             <arg line='${linkflags}'/>
        </apply>
-
     </target>
 
 </project>