2003/02/25 21:37:13
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:53:01 +0000 (06:53 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:53:01 +0000 (06:53 +0000)
darcs-hash:20040130065301-2ba56-587c839e7d4510940909c9e01009a0c855066cc5.gz

src/org/xwt/plat/GCJ.xml [deleted file]
src/org/xwt/plat/Java12.xml
src/org/xwt/plat/Linux.cc [new file with mode: 0644]
src/org/xwt/plat/Linux.xml [deleted file]
src/org/xwt/plat/POSIX.cc
src/org/xwt/plat/PalmOS.xml [deleted file]
src/org/xwt/plat/Win32.cc
src/org/xwt/plat/Win32.xml [deleted file]
src/org/xwt/plat/X11.cc

diff --git a/src/org/xwt/plat/GCJ.xml b/src/org/xwt/plat/GCJ.xml
deleted file mode 100644 (file)
index 66761d5..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
-<!--
-
-    Subclasses of org.xwt.plat.GCJ should include a .xml file which
-    sets the following properties, then invokes <ant antfile="src/org/xwt/plat/GCJ.xml"/>
-
-        gcc-target    - the gcc target name to use (for example, i686-pc-mingw32)
-        linkflags     - extra flags to pass to gcj during the link phase, if any
-        binaryname    - the name to give to the final binary
-
--->
-
-<project name="GCJ" default="build">
-
-    <target name="build">
-
-        <echo message='extracting .class -> .h'/>
-        <taskdef name='gcjh' classname='org.xwt.tasks.GCJHTask'>
-            <classpath path='bin/'/>                                                                               
-        </taskdef>
-        <gcjh out='bin-${plat}' classpath='bin'/>
-
-        <echo message='compiling   .java -> .o'/>
-        <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}'>
-            <arg value='-fCLASSPATH=bin/'/>
-            <arg value='-O9'/>
-            <arg value='-ffast-math'/>
-            <arg value='-fomit-frame-pointer'/>
-            <arg value='-foptimize-sibling-calls'/>
-            <arg value='-finline-functions'/>
-            <arg value='-funroll-loops'/>
-            <arg value='-g'/>
-            <arg value='-c'/>
-            <srcfile/>
-            <arg value='-o'/>
-            <targetfile/>
-            <fileset dir='src/' includes='${javafiles}'>
-                <include name='org/xwt/*.java'/>
-                <include name='org/xwt/util/*.java'/>
-                <include name='org/xwt/plat/GCJ.java'/>
-                <include name='org/bouncycastle/**/*.java'/>
-                <include name='org/mozilla/**/*.java'/>
-                <exclude name='org/xwt/Trap.java'/>
-            </fileset>
-            <mapper type='glob' from='*.java' to='*.o'/>
-        </apply>
-
-        <!-- we have to turn off optimization here due to a compiler bug -->
-        <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}'>
-            <arg value='-fCLASSPATH=bin/'/>
-            <arg value='-O0'/>
-            <arg value='-ffast-math'/>
-            <arg value='-fomit-frame-pointer'/>
-            <arg value='-foptimize-sibling-calls'/>
-            <arg value='-finline-functions'/>
-            <arg value='-funroll-loops'/>
-            <arg value='-g'/>
-            <arg value='-c'/>
-            <srcfile/>
-            <arg value='-o'/>
-            <targetfile/>
-            <fileset dir='src/'>
-                <include name='org/xwt/Trap.java'/>
-            </fileset>
-            <mapper type='glob' from='*.java' to='*.o'/>
-        </apply>
-
-        <echo message='compiling     .cc -> .o'/>
-        <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}/'>
-            <arg value='-g'/>
-            <arg value='-Ibin-${plat}'/>
-            <arg value='-c'/>
-            <srcfile/>
-            <arg value='-o'/>
-            <targetfile/>
-            <fileset dir='src/' includes='${ccfiles}'/>
-            <mapper type='glob' from='*.cc' to='*-nat.o'/>
-        </apply>
-                                                                              
-        <echo message='wrapping    .xwar -> .o'/>
-        <apply failonerror='true' executable='${gcc-path}/bin/${gcc-target}gcj' dest='bin-${plat}/'>
-            <fileset dir='bin/' includes='**/*.xwar'/>
-            <arg value='--resource'/>
-            <arg value='org/xwt/builtin.xwar'/>
-            <arg value='-c'/>
-            <srcfile/>
-            <arg value='-o'/>
-            <targetfile/>
-            <mapper type='glob' from='*.xwar' to='*.o'/>
-        </apply>
-
-        <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'/>
-            <arg value='--main=org.xwt.Main'/>
-            <arg line='-o bin-${plat}/${binaryname}'/>
-            <srcfile/>
-            <arg line='${linkflags}'/>
-       </apply>
-    </target>
-
-</project>
-
-                                                                         
index f36c239..a6990f1 100644 (file)
@@ -1,21 +1,3 @@
-<!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
-
-<project name="Java12" default="run" basedir=".">
-
-    <target name="build"/>
-
-    <target name="run">
-        <java classname='org.xwt.Main'>
-            <classpath>
-                <pathelement path='bin/'/>
-                <fileset dir='lib'>
-                    <include name='**/*.jar'/>
-                </fileset>
-            </classpath>
-            <arg line='src org.xwt.demo.main'/>
-        </java>
-    </target>
-
     <target name="dist">
         <echo message="creating jar source area in bin-Java12/"/>
         <mkdir dir="bin-Java12"/>
diff --git a/src/org/xwt/plat/Linux.cc b/src/org/xwt/plat/Linux.cc
new file mode 100644 (file)
index 0000000..fcc28b7
--- /dev/null
@@ -0,0 +1 @@
+#include "X11.cc"
diff --git a/src/org/xwt/plat/Linux.xml b/src/org/xwt/plat/Linux.xml
deleted file mode 100644 (file)
index c8f61db..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
-
-<project name="Linux" default="build">
-
-    <target name="build">
-        <property name="gcc-target" value=""/>
-        <property name="linkflags" value="-L${gcc-path}/lib -L/usr/X11R6/lib -lX11 -lXext --static"/>
-        <property name="binaryname" value="xwt"/>
-        <property name="ccfiles" value="org/xwt/plat/X11.cc,org/xwt/plat/POSIX.cc"/>
-        <property name="javafiles" value="org/xwt/plat/X11.java,org/xwt/plat/POSIX.java"/>
-        <ant target="build" antfile="src/org/xwt/plat/GCJ.xml"/>
-    </target>
-                                                                         
-    <target name="run">
-        <echo message='launching xwt.linux'/>
-        <bash> bin-Linux/xwt.linux </bash>
-    </target>
-
-</project>
index 87c7b3d..a34d202 100644 (file)
@@ -23,6 +23,8 @@
 #include <java/lang/System.h>
 #include <java/io/PrintStream.h>
 
+#include "GCJ.cc"
+
 jstring org::xwt::plat::POSIX::_getEnv(jstring key) {
     int len = JvGetStringUTFLength(key);
     char buf[len + 1];
diff --git a/src/org/xwt/plat/PalmOS.xml b/src/org/xwt/plat/PalmOS.xml
deleted file mode 100644 (file)
index 78996c1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
-
-<project name="PalmOS" default="run" basedir=".">
-
-    <target name="build">
-        <echo message="compiling  .class -> .asm"/>
-        <java classname='Jump' fork='true' dir='bin'>
-            <classpath>
-                <pathelement path='lib/jump.jar'/>
-                <pathelement path='bin'/>
-            </classpath>
-            <arg value="-O0"/>
-            <arg value="-m"/>
-            <arg value="-V"/>
-            <arg value="org.xwt.plat.PalmOS"/>
-        </java>
-    </target>
-
index 67ba8b3..240b39a 100644 (file)
@@ -37,6 +37,8 @@
 #include <java/lang/System.h>
 #include <java/io/PrintStream.h>
 
+#include "GCJ.cc"
+
 #define WM_USER_SETCURSOR WM_USER
 #define WM_USER_DISPOSE (WM_USER + 1)
 #define WM_USER_CREATEWINDOW (WM_USER + 2)
diff --git a/src/org/xwt/plat/Win32.xml b/src/org/xwt/plat/Win32.xml
deleted file mode 100644 (file)
index dad696e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL] -->
-
-<project name="Win32" default="build">
-
-    <target name="build">
-        <property name="gcc-target" value="i686-pc-mingw32-"/>
-        <property name="linkflags" value="-Wl,--subsystem,windows -lcomdlg32"/>
-        <property name="binaryname" value="xwt.exe"/>
-        <property name="javafiles" value="org/xwt/plat/Win32.java"/>
-        <property name="ccfiles" value="org/xwt/plat/Win32.cc"/>
-        <ant target="build" antfile="src/org/xwt/plat/GCJ.xml"/>
-    </target>
-                                                                         
-    <target name="run">
-        <echo message='launching .exe'/>
-        <exec dir='.' executable='/usr/bin/ssh'>
-            <arg value='${cygwin-host}'/>
-            <arg value='cd ${cygwin-path}; bin-Win32/xwt.exe src org.xwt.demo.main'/>
-        </exec>
-    </target>
-
-</project>
index 9fd2ac3..684f3bb 100644 (file)
@@ -35,6 +35,8 @@
 #include <java/lang/System.h>
 #include <java/io/PrintStream.h>
 
+#include "POSIX.cc"
+
 // static (per-xserver) data
 static Visual* visual;
 static Colormap s_colormap;