Initial dirty commit of old code into git

This commit is contained in:
Paul Schaub 2019-12-12 15:20:41 +01:00
commit 5546f26619
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
1985 changed files with 255900 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,127 @@
<?xml version="1.0"?>
<project name="lwjgl native code, bsd" basedir="../../bin/lwjgl" default="compile">
<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="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
<target name="clean">
<delete>
<fileset dir="x32"/>
<fileset dir="x64"/>
<fileset dir="." includes="*.o"/>
<fileset dir="." includes="*.so"/>
</delete>
</target>
<target name="compile">
<exec executable="uname" outputproperty="hwplatform">
<arg value="-m"/>
</exec>
<condition property="xf86vm_lib" value="-lXxf86vm" else="-Wl,-static,-lXxf86vm,-call_shared">
<os name="SunOS" />
</condition>
<condition property="cflags_pthread" value="-pthreads" else="-pthread">
<os name="SunOS" />
</condition>
<condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
<os name="SunOS" />
</condition>
<condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
<and>
<os name="SunOS" />
</and>
</condition>
<condition property="cflags64" value="-O2 -m64 -Wall -c -fPIC -std=c99 -Wunused" else="-O2 -Wall -c -fPIC -std=c99 -Wunused">
<os name="SunOS" />
</condition>
<property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/>
<property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/>
<condition property="build.32bit.only">
<and>
<os name="FreeBSD"/>
<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>
<os name="FreeBSD"/>
<equals arg1="${hwplatform}" arg2="amd64"/>
</and>
</condition>
<antcall target="compile32"/>
<antcall target="compile64"/>
</target>
<target name="compile32" unless="build.64bit.only">
<mkdir dir="x32"/>
<apply dir="x32" executable="cc" skipemptyfilesets="true" failonerror="true">
<arg line="${cflags32} ${cflags_pthread}"/>
<arg value="-I${java.home}/include"/>
<arg value="-I${java.home}/include/freebsd"/>
<arg value="-I${java.home}/../include"/>
<arg value="-I${java.home}/../include/freebsd"/>
<arg value="-I/usr/local/include"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/common/opengl"/>
<arg value="-I${native}/linux"/>
<arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengl" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengl" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengl" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="cc" failonerror="true">
<srcfile/>
<arg line="${linker_flags32}"/>
<fileset dir="x32" includes="*.o"/>
</apply>
<apply dir="." parallel="true" executable="strip" failonerror="true">
<fileset file="${libname32}"/>
</apply>
</target>
<target name="compile64" unless="build.32bit.only">
<mkdir dir="x64"/>
<apply dir="x64" executable="cc" skipemptyfilesets="true" failonerror="true">
<arg line="${cflags64} ${cflags_pthread}"/>
<arg value="-I${java.home}/include"/>
<arg value="-I${java.home}/include/freebsd"/>
<arg value="-I${java.home}/../include"/>
<arg value="-I${java.home}/../include/freebsd"/>
<arg value="-I/usr/local/include"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/common/opengl"/>
<arg value="-I${native}/linux"/>
<arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengl" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengl" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengl" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="cc" failonerror="true">
<srcfile/>
<arg line="${linker_flags64}"/>
<fileset dir="x64" includes="*.o"/>
</apply>
<apply dir="." parallel="true" executable="strip" failonerror="true">
<fileset file="${libname64}"/>
</apply>
</target>
</project>

View file

@ -0,0 +1,158 @@
<project name="applet">
<!-- Create our packer task -->
<taskdef name="pack200" classname="com.sun.tools.apache.ant.pack200.Pack200Task" classpath="platform_build/Pack200Task.jar"/>
<target name="applet">
<antcall target="-applet">
<param name="keystore" value="applet/lwjglkeystore"/>
<param name="alias" value="lwjgl"/>
<param name="password" value="123456"/>
</antcall>
</target>
<target name="applet-release">
<input message="Please enter the keystore" addproperty="keystore.location" defaultvalue="applet/lwjglkeystore"/>
<input message="Please enter the keystore alias" addproperty="keystore.alias" defaultvalue="lwjgl"/>
<input message="Please type the password for the keystore" addproperty="sign.pwd" defaultvalue="123456"/>
<antcall target="-applet">
<!--
<param name="keystore" value="signing/matzon_java_code_signing.keystore"/>
<param name="alias" value="oddlabs_java_code_signing"/>
<param name="password" value="${sign.pwd}"/>
-->
<param name="keystore" value="${keystore.location}"/>
<param name="alias" value="${keystore.alias}"/>
<param name="password" value="${sign.pwd}"/>
</antcall>
</target>
<target name="-applet">
<!-- Create lwjgl_applet.jar -->
<jar destfile="applet/basic/lwjgl_applet.jar" taskname="lwjgl_applet.jar">
<fileset refid="lwjgl_applet.fileset" />
</jar>
<!-- create each of the native jars -->
<jar destfile="applet/basic/windows_natives.jar" taskname="windows_natives.jar">
<fileset dir="${lwjgl.lib}/windows">
<patternset refid="lwjgl-windows.fileset"/>
</fileset>
</jar>
<signjar jar="applet/basic/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<jar destfile="applet/basic/linux_natives.jar" taskname="linux_natives.jar">
<fileset dir="${lwjgl.lib}/linux">
<patternset refid="lwjgl-linux.fileset"/>
</fileset>
</jar>
<signjar jar="applet/basic/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<jar destfile="applet/basic/macosx_natives.jar" taskname="macosx_natives.jar">
<fileset dir="${lwjgl.lib}/macosx">
<patternset refid="lwjgl-macosx.fileset"/>
</fileset>
</jar>
<signjar jar="applet/basic/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<jar destfile="applet/basic/solaris_natives.jar" taskname="solaris_natives.jar">
<fileset dir="${lwjgl.lib}/solaris">
<patternset refid="lwjgl-solaris.fileset"/>
</fileset>
</jar>
<signjar jar="applet/basic/solaris_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<copy file="${lwjgl.lib}/lwjgl.jar" todir="applet/basic" overwrite="true"/>
<copy file="${lwjgl.lib}/lwjgl-debug.jar" todir="applet/basic" overwrite="true"/>
<copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet/basic" overwrite="true"/>
<copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet/basic" overwrite="true"/>
<copy file="${lwjgl.lib}/jinput.jar" todir="applet/basic" overwrite="true"/>
<input
message="Press Return key to continue..."
/>
<copy file="${lwjgl.lib}/lzma.jar" todir="applet/advance" overwrite="true"/>
<signjar jar="applet/basic/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<input
message="Press Return key to continue..."
/>
<signjar jar="applet/advance/lzma.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<input
message="Press Return key to continue..."
/>
<copy file="applet/basic/lwjgl_util_applet.jar" todir="applet/advance" overwrite="true"/>
<!-- LZMA only, for 1.4 only clients -->
<!--antcall target="compress-resource">
<param name="input" value="applet/basic/lwjgl.jar"/>
<param name="output" value="applet/advance/lwjgl.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/lwjgl-debug.jar"/>
<param name="output" value="applet/advance/lwjgl-debug.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/lwjgl_util.jar"/>
<param name="output" value="applet/advance/lwjgl_util.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/jinput.jar"/>
<param name="output" value="applet/advance/jinput.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/lwjgl_applet.jar"/>
<param name="output" value="applet/advance/lwjgl_applet.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/windows_natives.jar"/>
<param name="output" value="applet/advance/windows_natives.jar.lzma"/>
</antcall -->
<antcall target="compress-sign-class">
<param name="dir" value="applet/basic/"/>
<param name="outputdir" value="applet/advance/"/>
<param name="jarfile" value="lwjgl"/>
</antcall>
<antcall target="compress-sign-class">
<param name="dir" value="applet/basic/"/>
<param name="outputdir" value="applet/advance/"/>
<param name="jarfile" value="lwjgl-debug"/>
</antcall>
<antcall target="compress-sign-class">
<param name="dir" value="applet/basic/"/>
<param name="outputdir" value="applet/advance/"/>
<param name="jarfile" value="lwjgl_util"/>
</antcall>
<antcall target="compress-sign-class">
<param name="dir" value="applet/basic/"/>
<param name="outputdir" value="applet/advance/"/>
<param name="jarfile" value="jinput"/>
</antcall>
<antcall target="compress-sign-class">
<param name="dir" value="applet/basic/"/>
<param name="outputdir" value="applet/advance/"/>
<param name="jarfile" value="lwjgl_applet"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/windows_natives.jar"/>
<param name="output" value="applet/advance/windows_natives.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/macosx_natives.jar"/>
<param name="output" value="applet/advance/macosx_natives.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/linux_natives.jar"/>
<param name="output" value="applet/advance/linux_natives.jar.lzma"/>
</antcall>
<antcall target="compress-resource">
<param name="input" value="applet/basic/solaris_natives.jar"/>
<param name="output" value="applet/advance/solaris_natives.jar.lzma"/>
</antcall>
</target>
</project>

View file

@ -0,0 +1,203 @@
<project name="definitions">
<!-- ================================================================== -->
<!-- Global properties for build -->
<!-- ================================================================== -->
<property name="lwjgl.src" location="src" />
<property name="lwjgl.src.native" location="${lwjgl.src}/native" />
<property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" />
<property name="lwjgl.src.templates" location="${lwjgl.src}/templates" />
<property name="lwjgl.bin" location="bin" />
<property name="lwjgl.lib" location="libs" />
<property name="lwjgl.dist" location="dist" />
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
<property name="lwjgl.version" value="2.9.1" />
<property name="lwjgl.web" location="www" />
<property name="lwjgl.src.templates.al" location="${lwjgl.src.templates}/org/lwjgl/openal"/>
<property name="lwjgl.src.templates.gl" location="${lwjgl.src.templates}/org/lwjgl/opengl"/>
<property name="lwjgl.src.templates.gles" location="${lwjgl.src.templates}/org/lwjgl/opengles"/>
<property name="lwjgl.src.templates.cl" location="${lwjgl.src.templates}/org/lwjgl/opencl"/>
<property name="openal-template-pattern" value="AL*.java,EFX*.java"/>
<property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java,INTEL*.java"/>
<property name="opengles-template-pattern" value="GLES*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,ANGLE*.java,APPLE*.java,ARM*.java,DMP*.java,IMG*.java,NV*.java,OES*.java,QCOM*.java,VIV*.java"/>
<property name="opencl-template-pattern-extensions" value="KHR*.java,EXT*.java,APPLE*.java,AMD*.java,INTEL*.java,NV*.java"/>
<property name="opencl-template-pattern" value="CL*.java,${opencl-template-pattern-extensions}"/>
<!-- ================================================================== -->
<!-- Filesets used for targets -->
<!-- ================================================================== -->
<!-- Files to include in the lwjgl.jar file -->
<fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
<patternset id="lwjgl.package.pattern">
<include name="org/**/*" />
<exclude name="org/lwjgl/opengles/**"/>
<exclude name="org/lwjgl/d3d/**" />
<exclude name="org/lwjgl/test/**" />
<exclude name="org/lwjgl/util/**" />
<exclude name="org/lwjgl/examples/**" />
</patternset>
</fileset>
<fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
<patternset id="lwjgl.package.dependencies.pattern">
<include name="org/lwjgl/opengles/ContextAttribs*.*"/>
</patternset>
</fileset>
<!-- Files to include in the lwjgl_util_applet.jar file -->
<fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}">
<patternset id="lwjgl_util_applet.package.pattern">
<exclude name="**.*"/>
<include name="org/lwjgl/util/applet/**"/>
</patternset>
</fileset>
<!-- Files to include in the lwjgl_test.jar file -->
<fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
<exclude name="**.*" />
<include name="org/lwjgl/test/**" />
<exclude name="org/lwjgl/test/opengles/**"/>
<include name="org/lwjgl/examples/**" />
</fileset>
<!-- More files to include in the lwjgl_test.jar file -->
<fileset id="lwjgl_test_extra.fileset" dir="${lwjgl.src}/java">
<exclude name="**.*" />
<include name="org/lwjgl/test/opengl/shaders/*.fp" />
<include name="org/lwjgl/test/opengl/shaders/*.vp" />
<include name="org/lwjgl/test/opengl/shaders/*.vsh" />
<include name="org/lwjgl/test/opengl/shaders/*.fsh" />
<include name="org/lwjgl/test/opencl/gl/*.cl" />
</fileset>
<!-- Files to include in the lwjgl_test.jar file for the ES build -->
<fileset id="lwjgl_test_es.fileset" dir="${lwjgl.bin}">
<exclude name="**.*"/>
<include name="org/lwjgl/test/**"/>
<exclude name="org/lwjgl/test/opengl/**"/>
<exclude name="org/lwjgl/test/*.*"/>
</fileset>
<!-- Files to include in the lwjgl_util.jar file -->
<fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
<patternset id="lwjgl_util.package.pattern">
<exclude name="**.*" />
<exclude name="org/lwjgl/util/generator/**" />
<exclude name="org/lwjgl/util/applet/**" />
<include name="org/lwjgl/util/**" />
</patternset>
</fileset>
<!-- Files to include in the lwjgl_applet.jar file -->
<fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}">
<exclude name="**.*"/>
<include name="org/lwjgl/test/applet/**"/>
<include name="org/lwjgl/test/opengl/awt/AWTGearsCanvas.class"/>
</fileset>
<!-- Files to make Javadoc from -->
<fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}">
<include name="**/*.java" />
<exclude name="native/**" />
<exclude name="templates/**" />
<exclude name="java/org/lwjgl/test/**" />
<exclude name="java/org/lwjgl/examples/**" />
<exclude name="java/org/lwjgl/util/generator/**" />
</fileset>
<!-- Files to include in doc package -->
<patternset id="lwjgl-docs.fileset">
<include name="CREDITS" />
<include name="LICENSE" />
<include name="README" />
<include name="lwjgl_hidden_switches.text" />
<include name="3rdparty/*" />
</patternset>
<!-- Files to include in windows package -->
<patternset id="lwjgl-windows.fileset">
<patternset id="lwjgl-windows-lwjgl.fileset">
<include name="lwjgl.dll" />
<include name="lwjgl64.dll" />
<include name="OpenAL32.dll" />
<include name="OpenAL64.dll" />
</patternset>
<patternset id="lwjgl-windows-jinput.fileset">
<include name="jinput-dx8*.dll" />
<include name="jinput-raw*.dll" />
</patternset>
</patternset>
<!-- Files to include in linux, glibc2.3 package -->
<patternset id="lwjgl-linux.fileset">
<patternset id="lwjgl-linux-lwjgl.fileset">
<include name="liblwjgl*.so" />
<include name="libopenal*.so" />
</patternset>
<patternset id="lwjgl-linux-jinput.fileset">
<include name="libjinput-linux.so" />
<include name="libjinput-linux64.so" />
</patternset>
</patternset>
<!-- Files to include in mac os x package -->
<patternset id="lwjgl-macosx.fileset">
<patternset id="lwjgl-macosx-lwjgl.fileset">
<include name="liblwjgl.jnilib" />
<include name="openal.dylib" />
</patternset>
<patternset id="lwjgl-macosx-jinput.fileset">
<include name="libjinput-osx.jnilib" />
<include name="libjinput-osx-legacy.jnilib" />
</patternset>
</patternset>
<!-- Files to include in solaris package -->
<patternset id="lwjgl-solaris.fileset">
<include name="liblwjgl*.so" />
<include name="libopenal*.so" />
</patternset>
<!-- Files to include in source distribution -->
<fileset id="lwjgl.source.fileset" dir=".">
<include name="build.xml" />
<include name="src/**" />
<include name="platform_build/**/*" />
</fileset>
<!-- files in the base package -->
<patternset id="lwjgl_base">
<include name="**" />
<exclude name="res/ILtest.*" />
<exclude name="res/Missing_you.mod" />
<exclude name="res/phero*.*" />
</patternset>
<!-- files in the optional package -->
<patternset id="lwjgl_optional">
<include name="res/**" />
<exclude name="res/logo/**" />
<exclude name="res/spaceinvaders/**" />
<exclude name="res/*.wav" />
<exclude name="res/*.xpm" />
<include name="doc/CREDITS" />
<include name="doc/LICENSE" />
<include name="doc/README" />
</patternset>
<!-- files in the lwjgl_applet package -->
<patternset id="lwjgl_applet">
<include name="applet/**" />
<exclude name="applet/appletviewer.policy" />
<exclude name="applet/lwjglkeystore" />
</patternset>
<uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/windows/lwjgl.dll" >
<srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/>
<srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/>
</uptodate>
</project>

View file

@ -0,0 +1,340 @@
<project name="generator">
<import file="build-definitions.xml"/>
<!-- clean the generated files -->
<target name="clean-generated" description="Deletes the generated java source">
<delete quiet="true" failonerror="false">
<fileset dir="${lwjgl.src}/generated" includes="**"/>
</delete>
</target>
<target name="clean-generated-native" description="Deletes the generated native source" depends="clean-generated">
<delete quiet="false" failonerror="false">
<fileset dir="${lwjgl.src.native}/generated" includes="**"/>
</delete>
</target>
<!-- Compiles the Java generator source code -->
<target name="generators" description="Compiles the native method generators">
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator">
<include name="org/lwjgl/util/generator/openal/**.java"/>
<include name="org/lwjgl/util/generator/opengl/**.java"/>
<include name="org/lwjgl/util/generator/opengles/**.java"/>
<include name="org/lwjgl/util/generator/opencl/**.java"/>
<compilerarg value="-Xlint:none"/>
</javac>
<!-- Compile helper classes used by the templates -->
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.5" target="1.5" taskname="generator">
<include name="org/lwjgl/PointerWrapper.java"/>
<include name="org/lwjgl/PointerBuffer.java"/>
<!-- OpenGL -->
<include name="org/lwjgl/opengl/GLSync.java"/>
<include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/>
<include name="org/lwjgl/opengl/ARBDebugOutputCallback.java"/>
<include name="org/lwjgl/opengl/KHRDebugCallback.java"/>
<!-- OpenGL ES -->
<include name="org/lwjgl/opengles/EGLImageOES.java"/>
<include name="org/lwjgl/opengles/KHRDebugCallback.java"/>
<!-- OpenCL -->
<include name="org/lwjgl/opencl/CLPlatform.java"/>
<include name="org/lwjgl/opencl/CLDevice.java"/>
<include name="org/lwjgl/opencl/CLContext.java"/>
<include name="org/lwjgl/opencl/CLCommandQueue.java"/>
<include name="org/lwjgl/opencl/CLMem.java"/>
<include name="org/lwjgl/opencl/CL*Callback.java"/>
<include name="org/lwjgl/opencl/CLNativeKernel.java"/>
<include name="org/lwjgl/opencl/CLFunctionAddress.java"/>
</javac>
</target>
<!-- Proxy target to generate it all -->
<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references, generate-opengles, generate-opengles-capabilities, generate-opencl, generate-opencl-capabilities" description="Generates java and native source"/>
<target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references, generate-opengles-debug, generate-opengles-capabilities-debug, generate-opencl-debug, generate-opencl-capabilities-debug" description="Generates java and native source with debug functionality"/>
<!-- ********************************************************************************
*********************************************************************************
OPENAL
*********************************************************************************
**************************************************************************** -->
<!-- Generate OpenAL -->
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.al}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/openal"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
<fileset dir="${lwjgl.src.templates.al}" includes="${openal-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenAL [DEBUG] -->
<target name="generate-openal-debug" depends="generators" description="Generates java and native source for AL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.al}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/openal"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
<arg value="-Ageneratechecks"/>
<fileset dir="${lwjgl.src.templates.al}" includes="${openal-template-pattern}"/>
</apply>
</target>
<!-- ********************************************************************************
*********************************************************************************
OPENGL
*********************************************************************************
**************************************************************************** -->
<!-- Generate OpenGL -->
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengl"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL [DEBUG] -->
<target name="generate-opengl-debug" depends="generators" description="Generates debug java and native source for GL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengl"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL references -->
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL context capabilities -->
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Acontextspecific"/>
<fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL context capabilities [DEBUG] -->
<target name="generate-opengl-capabilities-debug" depends="generators" description="Generates debug java and native source for GL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<fileset dir="${lwjgl.src.templates.gl}" includes="${opengl-template-pattern}"/>
</apply>
</target>
<!-- ********************************************************************************
*********************************************************************************
OPENGL ES
*********************************************************************************
**************************************************************************** -->
<!-- Generate OpenGL ES -->
<target name="generate-opengles" depends="generators" description="Generates java and native source for GL ES">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengles"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<!--<arg value="-Acontextspecific"/>-->
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
<fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL ES [DEBUG] -->
<target name="generate-opengles-debug" depends="generators" description="Generates debug java and native source for GL ES">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opengles"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Ageneratechecks"/>
<!--<arg value="-Acontextspecific"/>-->
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
<fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL ES context capabilities -->
<target name="generate-opengles-capabilities" depends="generators" description="Generates java and native source for GL ES">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<!--<arg value="-Acontextspecific"/>-->
<fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenGL ES context capabilities [DEBUG] -->
<target name="generate-opengles-capabilities-debug" depends="generators" description="Generates debug java and native source for GL ES">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.gles}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Ageneratechecks"/>
<!--<arg value="-Acontextspecific"/>-->
<fileset dir="${lwjgl.src.templates.gles}" includes="${opengles-template-pattern}"/>
</apply>
</target>
<!-- ********************************************************************************
*********************************************************************************
OPENCL
*********************************************************************************
**************************************************************************** -->
<!-- Generate OpenCL -->
<target name="generate-opencl" depends="generators" description="Generates java and native source for CL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opencl"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
<fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenCL [DEBUG] -->
<target name="generate-opencl-debug" depends="generators" description="Generates debug java and native source for CL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
<arg path="${lwjgl.src.native}/generated/opencl"/>
<arg value="-Abinpath=${lwjgl.bin}"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
<fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenCL capabilities -->
<target name="generate-opencl-capabilities" depends="generators" description="Generates capabilities for CL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Acontextspecific"/>
<fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
<!-- Generate OpenCL capabilities [DEBUG] -->
<target name="generate-opencl-capabilities-debug" depends="generators" description="Generates debug capabilities for CL">
<apply executable="apt" parallel="true" dir="${lwjgl.src.templates.cl}" relative="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/>
<arg value="-cp"/>
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<fileset dir="${lwjgl.src.templates.cl}" includes="${opencl-template-pattern}"/>
</apply>
</target>
</project>

View file

@ -0,0 +1,211 @@
<project name="maven">
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
<property name="lwjgl.src.generated" location="${lwjgl.src}/generated" />
<property name="lwjgl.maven" location="maven" />
<property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" />
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
<property name="jinput.version" value="2.0.5" />
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl.package.pattern" />
<patternset refid="lwjgl.package.dependencies.pattern"/>
</fileset>
<fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}">
<include name="**/*" />
</fileset>
<fileset id="lwjgl_util_applet-sources.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl_util_applet.package.pattern" />
</fileset>
<fileset id="lwjgl_util-sources.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl_util.package.pattern" />
</fileset>
<target name="-fixmavenversion">
<script language="javascript">
<![CDATA[
importPackage(java.lang);
var originalVersion = project.getProperty("lwjgl.version");
System.out.println("LWJGL Version: " + originalVersion);
var mavenVersion = originalVersion;
if(originalVersion.match(/^[0-9]+\.[0-9]+$/)){
System.out.println("Fixing LWJGL Maven version (Maven version should be x.y.z)");
mavenVersion = originalVersion + ".0";
}
if(!mavenVersion.match(/^.*-SNAPSHOT$/)){
var forceSnapshot = project.getProperty("snapshot")
if(forceSnapshot!=null && forceSnapshot!="false"){
System.out.println("Forcing Maven Version to Snapshot");
mavenVersion = mavenVersion + "-SNAPSHOT";
}
}
project.setNewProperty("lwjgl-maven-version",mavenVersion);
System.out.println("LWJGL Maven Version: " + project.getProperty("lwjgl-maven-version"));
]]>
</script>
</target>
<target name="-checkjinputversion">
<script language="javascript" classpath="${lwjgl.lib}/jinput.jar">
<![CDATA[
importPackage(java.lang);
var version = net.java.games.input.Version.getVersion()
project.setNewProperty("jinputversion",version);
var declaredJinputVersion = project.getProperty("jinput.version");
System.out.println("JINPUT Version: " + version + " - DeclaredVersion: " + declaredJinputVersion);
if(declaredJinputVersion.equals(version)){
System.out.println("JINPUT Version Matches");
project.setNewProperty("jinputversionmatches", true);
} else {
System.out.println("JINPUT Version don't match");
}
]]>
</script>
<condition property="failjinputcheck">
<and>
<not><isset property="jinputversionmatches" /></not>
<not><isset property="overridejinput" /></not>
</and>
</condition>
<fail if="failjinputcheck" message="Jinput version in project (${jinputversion}) is different from the declared jinput version for maven (${jinput.version}) add -Doverridejinput=true as a command line option to avoid this check" />
</target>
<target name="maven-full">
<antcall target="clean-java" />
<antcall target="-initialize" />
<antcall target="generate-all" />
<antcall target="compile" />
<antcall target="-createjars" />
<antcall target="maven"/>
</target>
<target name="maven" depends="-fixmavenversion, -checkjinputversion"> <!-- Added as dependency because using antcall creates a new project scope -->
<delete dir="${lwjgl.dstMaven}" quiet="true" failonerror="false" taskname="cleaning maven dist" />
<mkdir dir="${lwjgl.dstMaven}" taskname="initialiazing temp maven folder" />
<antcall target="-copylwjgljars" />
<antcall target="-createmavensourcejars" />
<antcall target="-createmavenjavadocs" />
<antcall target="-createmavennativejars" />
<antcall target="-copymavenpoms"/>
<antcall target="-copymavendeploybuild"/>
<antcall target="-copymaventdist"/>
</target>
<target name="-copylwjgljars">
<copy todir="${lwjgl.dstMaven}">
<fileset dir="${lwjgl.temp}/jar/">
<patternset>
<include name="lwjgl.jar" />
<include name="lwjgl_util.jar" />
<include name="lwjgl_util_applet.jar" />
</patternset>
</fileset>
</copy>
</target>
<!-- Packages the java files -->
<target name="-createmavensourcejars">
<jar destfile="${lwjgl.dstMaven}/lwjgl-sources.jar" taskname="lwjgl-sources.jar">
<fileset refid="lwjgl-sources.manual.fileset" />
<fileset refid="lwjgl-sources.generated.fileset" />
</jar>
<jar destfile="${lwjgl.dstMaven}/lwjgl_util_applet-sources.jar" taskname="lwjgl_util_applet-sources.jar">
<fileset refid="lwjgl_util_applet-sources.fileset" />
</jar>
<jar destfile="${lwjgl.dstMaven}/lwjgl_util-sources.jar" taskname="lwjgl_util-sources.jar">
<fileset refid="lwjgl_util-sources.fileset" />
</jar>
</target>
<target name="-createmavenjavadocs">
<!-- Creates the Javadoc -->
<javadoc destdir="${lwjgl.dstMaven}/lwjgl-javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL API" useexternalfile="true">
<fileset refid="lwjgl-sources.manual.fileset"/>
<fileset refid="lwjgl-sources.generated.fileset"/>
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright &#169; 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom>
</javadoc>
<jar destfile="${lwjgl.dstMaven}/lwjgl-javadoc.jar" taskname="lwjgl-javadoc.jar">
<fileset dir="${lwjgl.dstMaven}/lwjgl-javadoc" />
</jar>
<javadoc destdir="${lwjgl.dstMaven}/lwjgl_util-javadoc" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/lwjgl.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL UTIL API" useexternalfile="true">
<fileset refid="lwjgl_util-sources.fileset"/>
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright &#169; 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom>
</javadoc>
<jar destfile="${lwjgl.dstMaven}/lwjgl_util-javadoc.jar" taskname="lwjgl_util-javadoc.jar">
<fileset dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" />
</jar>
<javadoc destdir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/lwjgl.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL UTIL API" useexternalfile="true">
<fileset refid="lwjgl_util_applet-sources.fileset"/>
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright &#169; 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom>
</javadoc>
<jar destfile="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc.jar" taskname="lwjgl_util_applet-javadoc.jar">
<fileset dir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" />
</jar>
<delete dir="${lwjgl.dstMaven}/lwjgl-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl" />
<delete dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util" />
<delete dir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util_applet" />
</target>
<target name="-createmavennativejars">
<jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-windows.jar" taskname="lwjgl-platform-natives-windows.jar">
<fileset dir="${lwjgl.lib}/windows">
<patternset refid="lwjgl-windows-lwjgl.fileset"/>
</fileset>
</jar>
<jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-linux.jar" taskname="lwjgl-platform-natives-linux.jar">
<fileset dir="${lwjgl.lib}/linux">
<patternset refid="lwjgl-linux-lwjgl.fileset"/>
</fileset>
</jar>
<jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-osx.jar" taskname="lwjgl-platform-natives-osx.jar">
<fileset dir="${lwjgl.lib}/macosx">
<patternset refid="lwjgl-macosx-lwjgl.fileset"/>
</fileset>
</jar>
</target>
<target name="-copymavenpoms">
<copy todir="${lwjgl.dstMaven}">
<fileset dir="${lwjgl.maven}">
<include name="*.pom" />
</fileset>
<filterset>
<filter token="VERSION" value="${lwjgl-maven-version}"/>
<filter token="JINPUTVERSION" value="${jinput.version}"/>
</filterset>
</copy>
</target>
<target name="-copymavendeploybuild">
<copy todir="${lwjgl.dstMaven}">
<fileset dir="${lwjgl.maven}">
<include name="build.xml" />
</fileset>
</copy>
</target>
<target name="-copymaventdist">
<zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" />
</target>
</project>

View file

@ -0,0 +1,181 @@
<project name="webstart">
<target name="webstart_demo" depends="jars">
<antcall target="-webstart_demo">
<param name="keystore" value="applet/lwjglkeystore"/>
<param name="alias" value="lwjgl"/>
<param name="password" value="123456"/>
</antcall>
</target>
<target name="webstart_demo-release">
<input message="Please type the password for the keystore" addproperty="sign.pwd"/>
<antcall target="-webstart_demo">
<param name="keystore" value="signing/lwjgl.jks"/>
<param name="alias" value="lwjgl"/>
<param name="password" value="${sign.pwd}"/>
</antcall>
</target>
<!-- Create webstart demo and extension from release files -->
<target name="-webstart_demo" description="Using released files, creates the necessary files used for jnlp demos">
<!-- delete existing temp -->
<delete dir="${lwjgl.temp}"/>
<!-- unzip release to temp dir -->
<unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/webstart/temp" overwrite="true"/>
<!-- DEMO SECTION -->
<move file="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/jar/lwjgl_test.jar" tofile="${lwjgl.temp}/webstart/lwjgl_test.jar"/>
<jar destfile="${lwjgl.temp}/webstart/lwjgl_test.jar" update="true">
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/webstart/media.jar" basedir="${lwjgl.res}">
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
</jar>
<!-- EXTENSION SECTION -->
<move todir="${lwjgl.temp}/webstart/${lwjgl.version}/" flatten="true">
<fileset dir="${lwjgl.temp}/webstart/temp">
<include name="**/jinput.jar"/>
<include name="**/lwjgl*.jar"/>
<exclude name="**/lwjgl_util_applet.jar"/>
<exclude name="**/lwjgl-debug.jar"/>
</fileset>
</move>
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" update="true">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" update="true">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" update="true">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<!-- create native jars -->
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/windows">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/linux">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/macosx">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/solaris">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
<attribute name="Specification-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
<attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<!-- sign 'em -->
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<!-- copy over extension jnlp file -->
<copy todir="${lwjgl.temp}/webstart/${lwjgl.version}">
<fileset dir="${lwjgl.web}/webstart">
<include name="extension.jnlp"/>
</fileset>
<filterset>
<filter token="LWJGL_VERSION" value="${lwjgl.version}"/>
</filterset>
</copy>
<!-- nuke extracted dir -->
<delete dir="${lwjgl.temp}/webstart/temp"/>
</target>
</project>

View file

@ -0,0 +1,126 @@
<?xml version="1.0"?>
<project name="lwjgl native code, linux" basedir="../../bin/lwjgl" default="compile">
<property name="native" location="../../src/native"/>
<property name="libname32" value="liblwjgl.so"/>
<property name="libname64" value="liblwjgl64.so"/>
<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
<property name="libs64" value="-L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
<property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
<target name="clean">
<delete>
<fileset dir="x32"/>
<fileset dir="x64"/>
<fileset dir="." includes="*.o"/>
<fileset dir="." includes="*.so"/>
</delete>
</target>
<target name="compile">
<exec executable="uname" outputproperty="hwplatform">
<arg value="-m"/>
</exec>
<condition property="cflags_pthread" value="-pthreads" else="-pthread">
<os name="SunOS" />
</condition>
<condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
<os name="SunOS" />
</condition>
<condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
<and>
<os name="SunOS" />
</and>
</condition>
<condition property="cflags64" value="-O2 -m64 -Wall -c -fPIC -std=c99 -Wunused" else="-O2 -Wall -c -fPIC -std=c99 -Wunused">
<os name="SunOS" />
</condition>
<property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32}"/>
<property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64}"/>
<condition property="build.32bit.only">
<not>
<or>
<equals arg1="${hwplatform}" arg2="x86_64"/>
<equals arg1="${hwplatform}" arg2="i86pc"/>
</or>
</not>
</condition>
<!-- On linux, the 64 bit jre doesn't have the 32 bit libs -->
<condition property="build.64bit.only">
<and>
<os name="Linux"/>
<equals arg1="${hwplatform}" arg2="x86_64"/>
</and>
</condition>
<antcall target="compile32"/>
<antcall target="compile64"/>
</target>
<target name="compile32" unless="build.64bit.only">
<mkdir dir="x32"/>
<apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true">
<arg line="${cflags32} ${cflags_pthread}"/>
<arg value="-I${java.home}/include"/>
<arg value="-I${java.home}/include/linux"/>
<arg value="-I${java.home}/../include"/>
<arg value="-I${java.home}/../include/linux"/>
<arg value="-I${java.home}/../include/solaris"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/common/opengl"/>
<arg value="-I${native}/linux"/>
<arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengl" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengl" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengl" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
<arg line="${linker_flags32}"/>
<fileset dir="x32" includes="*.o"/>
</apply>
<apply dir="." parallel="true" executable="strip" failonerror="true">
<fileset file="${libname32}"/>
</apply>
</target>
<target name="compile64" unless="build.32bit.only">
<mkdir dir="x64"/>
<apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true">
<arg line="${cflags64} ${cflags_pthread}"/>
<arg value="-I${java.home}/include"/>
<arg value="-I${java.home}/include/linux"/>
<arg value="-I${java.home}/../include"/>
<arg value="-I${java.home}/../include/linux"/>
<arg value="-I${java.home}/../include/solaris"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/common/opengl"/>
<arg value="-I${native}/linux"/>
<arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengl" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengl" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengl" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
<arg line="${linker_flags64}"/>
<fileset dir="x64" includes="*.o"/>
</apply>
<apply dir="." parallel="true" executable="strip" failonerror="true">
<fileset file="${libname64}"/>
</apply>
</target>
</project>

View file

@ -0,0 +1,129 @@
<?xml version="1.0"?>
<project name="lwjgl native code, linux" basedir="../../bin/lwjgles" default="compile">
<property name="native" location="../../src/native"/>
<property name="libname32" value="liblwjgl.so"/>
<property name="libname64" value="liblwjgl64.so"/>
<property name="libs32" value="-L/home/spasi/lwjgl/libs/linux -lEGL -L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lpthread -L${java.home}/lib/i386 -ljawt" />
<property name="libs64" value="-L${lib_folder}/x64 -lEGL -L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
<property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
<target name="clean">
<delete>
<fileset dir="x32"/>
<fileset dir="x64"/>
<fileset dir="." includes="*.o"/>
<fileset dir="." includes="*.so"/>
</delete>
</target>
<target name="compile">
<exec executable="uname" outputproperty="hwplatform">
<arg value="-m"/>
</exec>
<condition property="xf86vm_lib" value="-lXxf86vm" else="-Wl,-static,-lXxf86vm,-call_shared">
<os name="SunOS" />
</condition>
<condition property="cflags_pthread" value="-pthreads" else="-pthread">
<os name="SunOS" />
</condition>
<condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
<os name="SunOS" />
</condition>
<condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
<and>
<os name="SunOS" />
</and>
</condition>
<condition property="cflags64" value="-O2 -m64 -Wall -c -fPIC -std=c99 -Wunused" else="-O2 -Wall -c -fPIC -std=c99 -Wunused">
<os name="SunOS" />
</condition>
<property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/>
<property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/>
<condition property="build.32bit.only">
<not>
<or>
<equals arg1="${hwplatform}" arg2="x86_64"/>
<equals arg1="${hwplatform}" arg2="i86pc"/>
</or>
</not>
</condition>
<!-- On linux, the 64 bit jre doesn't have the 32 bit libs -->
<condition property="build.64bit.only">
<and>
<os name="Linux"/>
<equals arg1="${hwplatform}" arg2="x86_64"/>
</and>
</condition>
<antcall target="compile32"/>
<antcall target="compile64"/>
</target>
<target name="compile32" unless="build.64bit.only">
<mkdir dir="x32"/>
<apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true">
<arg line="${cflags32} ${cflags_pthread}"/>
<arg value="-I${java.home}/include"/>
<arg value="-I${java.home}/include/linux"/>
<arg value="-I${java.home}/../include"/>
<arg value="-I${java.home}/../include/linux"/>
<arg value="-I${java.home}/../include/solaris"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/common/opengles"/>
<arg value="-I${native}/linux"/>
<arg value="-I${native}/linux/opengles"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengles" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengles" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengles" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
<arg line="${linker_flags32}"/>
<fileset dir="x32" includes="*.o"/>
</apply>
<apply dir="." parallel="true" executable="strip" failonerror="true">
<fileset file="${libname32}"/>
</apply>
</target>
<target name="compile64" unless="build.32bit.only">
<mkdir dir="x64"/>
<apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true">
<arg line="${cflags64} ${cflags_pthread}"/>
<arg value="-I${java.home}/include"/>
<arg value="-I${java.home}/include/linux"/>
<arg value="-I${java.home}/../include"/>
<arg value="-I${java.home}/../include/linux"/>
<arg value="-I${java.home}/../include/solaris"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/common/opengles"/>
<arg value="-I${native}/linux"/>
<arg value="-I${native}/linux/opengles"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengles" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengles" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengles" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
<arg line="${linker_flags64}"/>
<fileset dir="x64" includes="*.o"/>
</apply>
<apply dir="." parallel="true" executable="strip" failonerror="true">
<fileset file="${libname64}"/>
</apply>
</target>
</project>

View file

@ -0,0 +1,4 @@
#!/bin/sh
nm -g "$1"/*.o | grep "Java_" | cut -d ' ' -f3 | cut -c 1-
nm -g "$1"/*.o | grep "JNI_" | cut -d ' ' -f3 | cut -c 1-

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,68 @@
<?xml version="1.0"?>
<project name="lwjgl native code, native code" basedir="../../bin/lwjgl" default="compile">
<property name="native" location="../../src/native"/>
<property environment="env"/>
<property name="mingwprefix" location="x86_64-pc-mingw32-"/>
<property name="mingwhome" location="c:/MinGW64"/>
<property name="strip" location="${mingwhome}/${mingwprefix}strip"/>
<property name="gcc" location="${mingwhome}/${mingwprefix}gcc"/>
<property name="dlltool" location="${mingwhome}/${mingwprefix}dlltool"/>
<property name="dllname" value="lwjgl64.dll"/>
<target name="compile_dir">
<apply dir="." failonerror="true" executable="${gcc}" dest="." skipemptyfilesets="true">
<arg line="-c -Wall -O2 -std=gnu99 -D_JNI_IMPLEMENTATION_"/>
<arg value="-I${dxhome}/include"/>
<arg value="-I${alhome}/include"/>
<arg value="-I${jdkhome}/include"/>
<arg value="-I${jdkhome}/include/win32"/>
<arg value="-I${native}/common"/>
<arg value="-I${native}/windows"/>
<srcfile/>
<fileset dir="${native}/windows" includes="*.c"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengl" includes="*.c"/>
<mapper type="glob" from="*.c" to="*.o"/>
</apply>
</target>
<target name="link">
<echo file="jawt.def">
EXPORTS
JAWT_GetAWT
</echo>
<exec dir="." executable="${dlltool}" failonerror="true">
<arg line="--def jawt.def --kill-at --dllname jawt.dll --output-lib libjawt.a"/>
</exec>
<apply dir="." parallel="true" executable="${gcc}" failonerror="true">
<arg value="-Wl,--kill-at"/>
<arg line="-shared -o ${dllname}"/>
<srcfile/>
<arg line="libjawt.a"/>
<arg value="-L${java.home}/../lib"/>
<arg value="-L${alhome}/libs"/>
<arg line="${libs}"/>
<fileset dir="." includes="*.o"/>
</apply>
</target>
<target name="clean">
<delete>
<fileset dir="." includes="*.o"/>
<fileset dir="." includes="*.dll"/>
</delete>
</target>
<target name="compile">
<property name="libs" value="-lkernel32 -lole32 -lopengl32 -lversion -luser32 -lgdi32 -ladvapi32 -lwinmm"/>
<antcall target="compile_dir"/>
<antcall target="link"/>
<apply dir="." executable="${strip}">
<fileset file="${dllname}"/>
</apply>
</target>
</project>

View file

@ -0,0 +1,66 @@
<?xml version="1.0"?>
<project name="lwjgl native code, native code" basedir="../../bin/lwjgl" default="compile">
<property name="native" location="../../src/native"/>
<property environment="env"/>
<property name="sdkhome" location="${env.MSSDK}"/>
<target name="compile_dir">
<apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
<arg line="/c /W2 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
<arg value="/I${native}\common"/>
<arg value="/I${native}\common\opengl"/>
<arg value="/I${native}\windows"/>
<arg value="/I${native}\windows\opengl"/>
<srcfile/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengl" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengl" includes="*.c"/>
<fileset dir="${native}/windows" includes="*.c"/>
<fileset dir="${native}/windows/opengl" includes="*.c"/>
<mapper type="glob" from="*.c" to="*.obj"/>
</apply>
</target>
<target name="link">
<apply dir="." parallel="true" executable="cl" failonerror="true">
<arg line="/LD /nologo"/>
<srcfile/>
<arg line="/Fe${dllname} /link"/>
<arg value="/LIBPATH:${java.home}\..\lib"/>
<arg value="/LIBPATH:${sdkhomelib}"/>
<arg value="/OPT:REF"/>
<arg value="/OPT:ICF"/>
<arg line="/DLL /DELAYLOAD:jawt.dll ${libs}"/>
<fileset dir="." includes="*.obj"/>
</apply>
</target>
<target name="clean">
<delete>
<fileset dir="." includes="*.obj"/>
<fileset dir="." includes="*.dll"/>
<fileset dir="." includes="*.exp"/>
<fileset dir="." includes="*.lib"/>
</delete>
</target>
<target name="compile">
<condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64">
<equals arg1="${os.arch}" arg2="x86"/>
</condition>
<condition property="dllname" value="lwjgl.dll" else="lwjgl64.dll">
<equals arg1="${os.arch}" arg2="x86"/>
</condition>
<echo message="${sdkhomelib}"/>
<property name="libs" value="Kernel32.lib ole32.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib Comctl32.lib"/>
<antcall target="compile_dir"/>
<antcall target="link"/>
</target>
</project>

View file

@ -0,0 +1,67 @@
<?xml version="1.0"?>
<project name="lwjgl native code, native code" basedir="../../bin/lwjgles" default="compile">
<property name="native" location="../../src/native"/>
<property environment="env"/>
<property name="sdkhome" location="${env.MSSDK}"/>
<target name="compile_dir">
<apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
<arg line="/c /W2 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
<arg value="/I${native}\common"/>
<arg value="/I${native}\common\opengles"/>
<arg value="/I${native}\windows"/>
<arg value="/I${native}\windows\opengles"/>
<srcfile/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengles" includes="*.c"/>
<fileset dir="${native}/generated/openal" includes="*.c"/>
<fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengles" includes="*.c"/>
<fileset dir="${native}/windows" includes="*.c"/>
<fileset dir="${native}/windows/opengles" includes="*.c"/>
<mapper type="glob" from="*.c" to="*.obj"/>
</apply>
</target>
<target name="link">
<apply dir="." parallel="true" executable="cl" failonerror="true">
<arg line="/LD /nologo"/>
<srcfile/>
<arg line="/Fe${dllname} /link"/>
<arg value="/LIBPATH:${java.home}\..\lib"/>
<arg value="/LIBPATH:${sdkhomelib}"/>
<arg value="/LIBPATH:..\..\libs\windows"/>
<arg value="/OPT:REF"/>
<arg value="/OPT:ICF"/>
<arg line="/DLL /DELAYLOAD:jawt.dll ${libs}"/>
<fileset dir="." includes="*.obj"/>
</apply>
</target>
<target name="clean">
<delete>
<fileset dir="." includes="*.obj"/>
<fileset dir="." includes="*.dll"/>
<fileset dir="." includes="*.exp"/>
<fileset dir="." includes="*.lib"/>
</delete>
</target>
<target name="compile">
<condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64">
<equals arg1="${os.arch}" arg2="x86"/>
</condition>
<condition property="dllname" value="lwjgl.dll" else="lwjgl64.dll">
<equals arg1="${os.arch}" arg2="x86"/>
</condition>
<echo message="${sdkhomelib}"/>
<property name="libs" value="Kernel32.lib ole32.lib libEGL.lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib Comctl32.lib"/>
<antcall target="compile_dir"/>
<antcall target="link"/>
</target>
</project>