commit
76867b161f
22
build.xml
22
build.xml
|
@ -33,6 +33,7 @@
|
|||
<mkdir dir="${lwjgl.temp}/native/windows" taskname="initialiazing temp/windows folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/freebsd" taskname="initialiazing temp/freebsd folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/openbsd" taskname="initialiazing temp/openbsd folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" />
|
||||
<mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" />
|
||||
</target>
|
||||
|
@ -249,6 +250,11 @@
|
|||
<patternset refid="lwjgl-freebsd.fileset" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${lwjgl.temp}/native/openbsd" failonerror="false">
|
||||
<fileset dir="${lwjgl.lib}/openbsd">
|
||||
<patternset refid="lwjgl-openbsd.fileset" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${lwjgl.temp}/native/macosx">
|
||||
<fileset dir="${lwjgl.lib}/macosx">
|
||||
<patternset refid="lwjgl-macosx.fileset" />
|
||||
|
@ -423,6 +429,8 @@
|
|||
lwjgl.native.linux.version = ${lwjgl.native.linux.version}
|
||||
lwjgl.java.freebsd.version = ${lwjgl.java.linux.version}
|
||||
lwjgl.native.freebsd.version = ${lwjgl.native.linux.version}
|
||||
lwjgl.java.openbsd.version = ${lwjgl.java.linux.version}
|
||||
lwjgl.native.openbsd.version = ${lwjgl.native.linux.version}
|
||||
lwjgl.java.macosx.version = ${lwjgl.java.macosx.version}
|
||||
lwjgl.native.macosx.version = ${lwjgl.native.macosx.version}
|
||||
</echo>
|
||||
|
@ -487,6 +495,11 @@
|
|||
</condition>
|
||||
<antcall target="-compile_native_freebsd" />
|
||||
|
||||
<condition property="lwjgl.platform.openbsd">
|
||||
<os name="OpenBSD" />
|
||||
</condition>
|
||||
<antcall target="-compile_native_openbsd" />
|
||||
|
||||
<condition property="lwjgl.platform.solaris">
|
||||
<os name="SunOS" />
|
||||
</condition>
|
||||
|
@ -524,6 +537,15 @@
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- Compiles LWJGL on OpenBSD platforms -->
|
||||
<target name="-compile_native_openbsd" if="lwjgl.platform.openbsd">
|
||||
<ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
|
||||
<copy todir="${lwjgl.lib}/openbsd">
|
||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Compiles LWJGL on solaris platforms -->
|
||||
<target name="-compile_native_solaris" if="lwjgl.platform.solaris">
|
||||
<!-- Reusing the linux ant task, but copy the output to solaris -->
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<property name="native" location="../../src/native"/>
|
||||
<property name="libname32" value="liblwjgl.so"/>
|
||||
<property name="libname64" value="liblwjgl64.so"/>
|
||||
<property name="libs32" value="-L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
|
||||
<property name="libs64" value="-L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
|
||||
<property name="libs32" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
|
||||
<property name="libs64" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
|
||||
<property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
|
||||
|
||||
<target name="clean">
|
||||
|
@ -49,6 +49,13 @@
|
|||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="build.32bit.only">
|
||||
<and>
|
||||
<os name="OpenBSD"/>
|
||||
<equals arg1="${hwplatform}" arg2="i386"/>
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<!-- On freebsd, the 64 bit jre doesn't have the 32 bit libs -->
|
||||
<condition property="build.64bit.only">
|
||||
<and>
|
||||
|
@ -57,6 +64,13 @@
|
|||
</and>
|
||||
</condition>
|
||||
|
||||
<condition property="build.64bit.only">
|
||||
<and>
|
||||
<os name="OpenBSD"/>
|
||||
<equals arg1="${hwplatform}" arg2="amd64"/>
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<antcall target="compile32"/>
|
||||
<antcall target="compile64"/>
|
||||
</target>
|
||||
|
@ -67,9 +81,12 @@
|
|||
<arg line="${cflags32} ${cflags_pthread}"/>
|
||||
<arg value="-I${java.home}/include"/>
|
||||
<arg value="-I${java.home}/include/freebsd"/>
|
||||
<arg value="-I${java.home}/include/openbsd"/>
|
||||
<arg value="-I${java.home}/../include"/>
|
||||
<arg value="-I${java.home}/../include/freebsd"/>
|
||||
<arg value="-I${java.home}/../include/openbsd"/>
|
||||
<arg value="-I/usr/local/include"/>
|
||||
<arg value="-I/usr/X11R6/include"/>
|
||||
<arg value="-I${native}/common"/>
|
||||
<arg value="-I${native}/common/opengl"/>
|
||||
<arg value="-I${native}/linux"/>
|
||||
|
@ -99,9 +116,12 @@
|
|||
<arg line="${cflags64} ${cflags_pthread}"/>
|
||||
<arg value="-I${java.home}/include"/>
|
||||
<arg value="-I${java.home}/include/freebsd"/>
|
||||
<arg value="-I${java.home}/include/openbsd"/>
|
||||
<arg value="-I${java.home}/../include"/>
|
||||
<arg value="-I${java.home}/../include/freebsd"/>
|
||||
<arg value="-I${java.home}/../include/openbsd"/>
|
||||
<arg value="-I/usr/local/include"/>
|
||||
<arg value="-I/usr/X11R6/include"/>
|
||||
<arg value="-I${native}/common"/>
|
||||
<arg value="-I${native}/common/opengl"/>
|
||||
<arg value="-I${native}/linux"/>
|
||||
|
|
|
@ -272,7 +272,7 @@ public class LWJGLUtil {
|
|||
final String osName = getPrivilegedProperty("os.name");
|
||||
if ( osName.startsWith("Windows") )
|
||||
PLATFORM = PLATFORM_WINDOWS;
|
||||
else if ( osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("SunOS") || osName.startsWith("Unix") )
|
||||
else if ( osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("OpenBSD") || osName.startsWith("SunOS") || osName.startsWith("Unix") )
|
||||
PLATFORM = PLATFORM_LINUX;
|
||||
else if ( osName.startsWith("Mac OS X") || osName.startsWith("Darwin") )
|
||||
PLATFORM = PLATFORM_MACOSX;
|
||||
|
|
|
@ -111,6 +111,7 @@ import java.util.zip.ZipFile;
|
|||
* <li>al_mac - [String] Jar containing native files for mac.</li>
|
||||
* <li>al_solaris - [String] Jar containing native files for solaris.</li>
|
||||
* <li>al_freebsd - [String] Jar containing native files for freebsd.</li>
|
||||
* <li>al_openbsd - [String] Jar containing native files for openbsd.</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
* <p>
|
||||
|
@ -775,6 +776,8 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
|
|||
nativeJarList = getParameter("al_solaris");
|
||||
} else if (osName.startsWith("FreeBSD")) {
|
||||
nativeJarList = getParameter("al_freebsd");
|
||||
} else if (osName.startsWith("OpenBSD")) {
|
||||
nativeJarList = getParameter("al_openbsd");
|
||||
} else {
|
||||
fatalErrorOccured("OS (" + osName + ") not supported", null);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue