Moved generated files to seperate directories
This commit is contained in:
parent
67e544709a
commit
df2bc7d7e0
29
build.xml
29
build.xml
|
@ -173,6 +173,11 @@
|
|||
<mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp folder" />
|
||||
</target>
|
||||
|
||||
<target name="clean-generated" description="Deletes the generated java and native source">
|
||||
<delete dir="${lwjgl.src}/generated" quiet="true" failonerror="false" taskname="cleaning java source"/>
|
||||
<delete dir="${lwjgl.src.native}/generated" quiet="true" failonerror="false" taskname="cleaning native source"/>
|
||||
</target>
|
||||
|
||||
<!-- Cleans up any files created during the execution of this script -->
|
||||
<target name="clean" description="Cleans the diectories controlled by this ant script">
|
||||
<delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" />
|
||||
|
@ -327,10 +332,14 @@
|
|||
|
||||
<!-- Compiles the Java source code -->
|
||||
<target name="compile" description="Compiles the java source code">
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/*.java" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="lwjgl" />
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/input/**" source="1.4" target="1.4" taskname="input" />
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/openal/**" source="1.4" target="1.4" taskname="openal" />
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/opengl/**" source="1.4" target="1.4" taskname="opengl" />
|
||||
<javac debug="yes" destdir="${lwjgl.bin}" includes="org/lwjgl/opengl/**" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core">
|
||||
<src path="${lwjgl.src}/java/"/>
|
||||
<src path="${lwjgl.src}/generated/"/>
|
||||
<include name="org/lwjgl/*.java"/>
|
||||
<include name="org/lwjgl/input/**"/>
|
||||
<include name="org/lwjgl/opengl/**"/>
|
||||
<include name="org/lwjgl/openal/**"/>
|
||||
</javac>
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" />
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" />
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/**" excludes="org/lwjgl/util/generator/**" source="1.4" target="1.4" taskname="util" />
|
||||
|
@ -424,9 +433,9 @@
|
|||
<arg value="-cp"/>
|
||||
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
||||
<arg value="-s"/>
|
||||
<arg path="${lwjgl.src}/java"/>
|
||||
<arg path="${lwjgl.src}/generated"/>
|
||||
<arg value="-d"/>
|
||||
<arg path="${lwjgl.src.headers}"/>
|
||||
<arg path="${lwjgl.src.native}/generated"/>
|
||||
<arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/>
|
||||
<arg value="-Ageneratechecks"/>
|
||||
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java"/>
|
||||
|
@ -442,9 +451,9 @@
|
|||
<arg value="-cp"/>
|
||||
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
||||
<arg value="-s"/>
|
||||
<arg path="${lwjgl.src}/java"/>
|
||||
<arg path="${lwjgl.src}/generated"/>
|
||||
<arg value="-d"/>
|
||||
<arg path="${lwjgl.src.headers}"/>
|
||||
<arg path="${lwjgl.src.native}/generated"/>
|
||||
<arg value="-Acontextspecific"/>
|
||||
<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
|
||||
<fileset dir="${lwjgl.src.templates}" includes="${template-pattern}"/>
|
||||
|
@ -487,7 +496,7 @@
|
|||
<arg value="-cp"/>
|
||||
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
||||
<arg value="-s"/>
|
||||
<arg path="${lwjgl.src}/java"/>
|
||||
<arg path="${lwjgl.src}/generated"/>
|
||||
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/*.java"/>
|
||||
</apply>
|
||||
</target>
|
||||
|
@ -501,7 +510,7 @@
|
|||
<arg value="-cp"/>
|
||||
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
||||
<arg value="-s"/>
|
||||
<arg path="${lwjgl.src}/java"/>
|
||||
<arg path="${lwjgl.src}/generated"/>
|
||||
<arg value="-Acontextspecific"/>
|
||||
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/*.java"/>
|
||||
</apply>
|
||||
|
|
|
@ -26,10 +26,7 @@ rem set LIBS=Kernel32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.
|
|||
|
||||
for %%x in (..\..\src\native\win32\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\common\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\common\arb\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\common\nv\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\common\ext\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\common\ati\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\generated\*.c) do cl %COPTIONS% %%x
|
||||
|
||||
cl /LD /Felwjgl.dll *.obj %LINKEROPTS% %LIBS%
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ public class ContextCapabilities {
|
|||
public final boolean GL_EXT_fog_coord;
|
||||
public final boolean GL_EXT_framebuffer_object;
|
||||
public final boolean GL_EXT_multi_draw_arrays;
|
||||
public final boolean GL_EXT_packed_depth_stencil;
|
||||
public final boolean GL_EXT_packed_pixels;
|
||||
public final boolean GL_EXT_paletted_texture;
|
||||
public final boolean GL_EXT_pixel_buffer_object;
|
||||
|
@ -78,6 +79,7 @@ public class ContextCapabilities {
|
|||
public final boolean GL_EXT_separate_specular_color;
|
||||
public final boolean GL_EXT_shadow_funcs;
|
||||
public final boolean GL_EXT_shared_texture_palette;
|
||||
public final boolean GL_EXT_stencil_clear_tag;
|
||||
public final boolean GL_EXT_stencil_two_side;
|
||||
public final boolean GL_EXT_stencil_wrap;
|
||||
public final boolean GL_EXT_texture_3d;
|
||||
|
@ -88,6 +90,7 @@ public class ContextCapabilities {
|
|||
public final boolean GL_EXT_texture_lod_bias;
|
||||
public final boolean GL_EXT_texture_mirror_clamp;
|
||||
public final boolean GL_EXT_texture_rectangle;
|
||||
public final boolean GL_EXT_texture_sRGB;
|
||||
public final boolean GL_EXT_vertex_shader;
|
||||
public final boolean GL_EXT_vertex_weighting;
|
||||
public final boolean OpenGL11;
|
||||
|
@ -402,6 +405,7 @@ public class ContextCapabilities {
|
|||
long EXT_secondary_color_glSecondaryColor3fEXT_pointer;
|
||||
long EXT_secondary_color_glSecondaryColor3ubEXT_pointer;
|
||||
long EXT_secondary_color_glSecondaryColorPointerEXT_pointer;
|
||||
long EXT_stencil_clear_tag_glStencilClearTagEXT_pointer;
|
||||
long EXT_stencil_two_side_glActiveStencilFaceEXT_pointer;
|
||||
long EXT_vertex_shader_glBeginVertexShaderEXT_pointer;
|
||||
long EXT_vertex_shader_glEndVertexShaderEXT_pointer;
|
||||
|
@ -1297,6 +1301,11 @@ public class ContextCapabilities {
|
|||
(EXT_secondary_color_glSecondaryColorPointerEXT_pointer = GLContext.getFunctionAddress("glSecondaryColorPointerEXT")) != 0;
|
||||
}
|
||||
|
||||
private boolean EXT_stencil_clear_tag_initNativeFunctionAddresses() {
|
||||
return
|
||||
(EXT_stencil_clear_tag_glStencilClearTagEXT_pointer = GLContext.getFunctionAddress("glStencilClearTagEXT")) != 0;
|
||||
}
|
||||
|
||||
private boolean EXT_stencil_two_side_initNativeFunctionAddresses() {
|
||||
return
|
||||
(EXT_stencil_two_side_glActiveStencilFaceEXT_pointer = GLContext.getFunctionAddress("glActiveStencilFaceEXT")) != 0;
|
||||
|
@ -1945,6 +1954,8 @@ public class ContextCapabilities {
|
|||
supported_extensions.remove("GL_EXT_point_parameters");
|
||||
if (supported_extensions.contains("GL_EXT_secondary_color") && !EXT_secondary_color_initNativeFunctionAddresses())
|
||||
supported_extensions.remove("GL_EXT_secondary_color");
|
||||
if (supported_extensions.contains("GL_EXT_stencil_clear_tag") && !EXT_stencil_clear_tag_initNativeFunctionAddresses())
|
||||
supported_extensions.remove("GL_EXT_stencil_clear_tag");
|
||||
if (supported_extensions.contains("GL_EXT_stencil_two_side") && !EXT_stencil_two_side_initNativeFunctionAddresses())
|
||||
supported_extensions.remove("GL_EXT_stencil_two_side");
|
||||
if (supported_extensions.contains("GL_EXT_vertex_shader") && !EXT_vertex_shader_initNativeFunctionAddresses())
|
||||
|
@ -2061,6 +2072,7 @@ public class ContextCapabilities {
|
|||
this.GL_EXT_fog_coord = supported_extensions.contains("GL_EXT_fog_coord");
|
||||
this.GL_EXT_framebuffer_object = supported_extensions.contains("GL_EXT_framebuffer_object");
|
||||
this.GL_EXT_multi_draw_arrays = supported_extensions.contains("GL_EXT_multi_draw_arrays");
|
||||
this.GL_EXT_packed_depth_stencil = supported_extensions.contains("GL_EXT_packed_depth_stencil");
|
||||
this.GL_EXT_packed_pixels = supported_extensions.contains("GL_EXT_packed_pixels");
|
||||
this.GL_EXT_paletted_texture = supported_extensions.contains("GL_EXT_paletted_texture");
|
||||
this.GL_EXT_pixel_buffer_object = supported_extensions.contains("GL_EXT_pixel_buffer_object")
|
||||
|
@ -2071,6 +2083,7 @@ public class ContextCapabilities {
|
|||
this.GL_EXT_separate_specular_color = supported_extensions.contains("GL_EXT_separate_specular_color");
|
||||
this.GL_EXT_shadow_funcs = supported_extensions.contains("GL_EXT_shadow_funcs");
|
||||
this.GL_EXT_shared_texture_palette = supported_extensions.contains("GL_EXT_shared_texture_palette");
|
||||
this.GL_EXT_stencil_clear_tag = supported_extensions.contains("GL_EXT_stencil_clear_tag");
|
||||
this.GL_EXT_stencil_two_side = supported_extensions.contains("GL_EXT_stencil_two_side");
|
||||
this.GL_EXT_stencil_wrap = supported_extensions.contains("GL_EXT_stencil_wrap");
|
||||
this.GL_EXT_texture_3d = supported_extensions.contains("GL_EXT_texture_3d");
|
||||
|
@ -2081,6 +2094,7 @@ public class ContextCapabilities {
|
|||
this.GL_EXT_texture_lod_bias = supported_extensions.contains("GL_EXT_texture_lod_bias");
|
||||
this.GL_EXT_texture_mirror_clamp = supported_extensions.contains("GL_EXT_texture_mirror_clamp");
|
||||
this.GL_EXT_texture_rectangle = supported_extensions.contains("GL_EXT_texture_rectangle");
|
||||
this.GL_EXT_texture_sRGB = supported_extensions.contains("GL_EXT_texture_sRGB");
|
||||
this.GL_EXT_vertex_shader = supported_extensions.contains("GL_EXT_vertex_shader");
|
||||
this.GL_EXT_vertex_weighting = supported_extensions.contains("GL_EXT_vertex_weighting");
|
||||
this.OpenGL11 = supported_extensions.contains("OpenGL11");
|
|
@ -0,0 +1,18 @@
|
|||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.BufferChecks;
|
||||
import java.nio.*;
|
||||
|
||||
public final class EXTPackedDepthStencil {
|
||||
public static final int GL_DEPTH_STENCIL_EXT = 0x84f9;
|
||||
public static final int GL_UNSIGNED_INT_24_8_EXT = 0x84fa;
|
||||
public static final int GL_DEPTH24_STENCIL8_EXT = 0x88f0;
|
||||
public static final int GL_TEXTURE_STENCIL_SIZE_EXT = 0x88f1;
|
||||
|
||||
private EXTPackedDepthStencil() {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.BufferChecks;
|
||||
import java.nio.*;
|
||||
|
||||
public final class EXTStencilClearTag {
|
||||
public static final int GL_STENCIL_TAG_BITS_EXT = 0x88f2;
|
||||
public static final int GL_STENCIL_CLEAR_TAG_VALUE_EXT = 0x88f3;
|
||||
|
||||
private EXTStencilClearTag() {
|
||||
}
|
||||
|
||||
|
||||
public static void glStencilClearTagEXT(int stencilTagBits, int stencilClearTag) {
|
||||
long function_pointer = GLContext.getCapabilities().EXT_stencil_clear_tag_glStencilClearTagEXT_pointer;
|
||||
BufferChecks.checkFunctionAddress(function_pointer);
|
||||
nglStencilClearTagEXT(stencilTagBits, stencilClearTag, function_pointer);
|
||||
}
|
||||
private static native void nglStencilClearTagEXT(int stencilTagBits, int stencilClearTag, long function_pointer);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.BufferChecks;
|
||||
import java.nio.*;
|
||||
|
||||
public final class EXTTextureSRGB {
|
||||
public static final int GL_SRGB_EXT = 0x8c40;
|
||||
public static final int GL_SRGB8_EXT = 0x8c41;
|
||||
public static final int GL_SRGB_ALPHA_EXT = 0x8c42;
|
||||
public static final int GL_SRGB8_ALPHA8_EXT = 0x8c43;
|
||||
public static final int GL_SLUMINANCE_ALPHA_EXT = 0x8c44;
|
||||
public static final int GL_SLUMINANCE8_ALPHA8_EXT = 0x8c45;
|
||||
public static final int GL_SLUMINANCE_EXT = 0x8c46;
|
||||
public static final int GL_SLUMINANCE8_EXT = 0x8c47;
|
||||
public static final int GL_COMPRESSED_SRGB_EXT = 0x8c48;
|
||||
public static final int GL_COMPRESSED_SRGB_ALPHA_EXT = 0x8c49;
|
||||
public static final int GL_COMPRESSED_SLUMINANCE_EXT = 0x8c4a;
|
||||
public static final int GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8c4b;
|
||||
public static final int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8c4c;
|
||||
public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8c4d;
|
||||
public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8c4e;
|
||||
public static final int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8c4f;
|
||||
|
||||
private EXTTextureSRGB() {
|
||||
}
|
||||
|
||||
}
|
|
@ -105,7 +105,7 @@ public class ContextGeneratorProcessorFactory implements AnnotationProcessorFact
|
|||
}
|
||||
|
||||
private void generateContextCapabilitiesSource(boolean context_specific) throws IOException {
|
||||
PrintWriter writer = env.getFiler().createSourceFile("org.lwjgl.opengl." + Utils.CONTEXT_CAPS_CLASS_NAME);
|
||||
PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(Utils.CONTEXT_CAPS_CLASS_NAME + ".java"), null);
|
||||
writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
|
||||
writer.println();
|
||||
writer.println("package org.lwjgl.opengl;");
|
||||
|
|
|
@ -164,7 +164,8 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
|
||||
private void generateJavaSource(InterfaceDeclaration d) throws IOException {
|
||||
validateMethods(d);
|
||||
PrintWriter java_writer = env.getFiler().createSourceFile(Utils.getQualifiedClassName(d));
|
||||
// PrintWriter java_writer = env.getFiler().createSourceFile(Utils.getQualifiedClassName(d));
|
||||
PrintWriter java_writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, d.getPackage().getQualifiedName(), new File(Utils.getSimpleClassName(d) + ".java"), null);
|
||||
java_writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
|
||||
java_writer.println();
|
||||
java_writer.println("package " + d.getPackage().getQualifiedName() + ";");
|
||||
|
|
|
@ -144,7 +144,7 @@ public class ReferencesGeneratorProcessorFactory implements AnnotationProcessorF
|
|||
}
|
||||
|
||||
private void generateReferencesSource() throws IOException {
|
||||
PrintWriter writer = env.getFiler().createSourceFile("org.lwjgl.opengl." + REFERENCES_CLASS_NAME);
|
||||
PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(REFERENCES_CLASS_NAME + ".java"), null);
|
||||
writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
|
||||
writer.println();
|
||||
writer.println("package org.lwjgl.opengl;");
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
#include <jni.h>
|
||||
#include "extgl.h"
|
||||
|
||||
typedef void (APIENTRY *glStencilClearTagEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTStencilClearTag_nglStencilClearTagEXT(JNIEnv *env, jclass clazz, jint stencilTagBits, jint stencilClearTag, jlong function_pointer) {
|
||||
glStencilClearTagEXTPROC glStencilClearTagEXT = (glStencilClearTagEXTPROC)((intptr_t)function_pointer);
|
||||
glStencilClearTagEXT(stencilTagBits, stencilClearTag);
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ STRIP=strip
|
|||
CFLAGS_LINK=-shared -Wall
|
||||
LIBS=-L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lpthread -L$(JAVA_HOME)/jre/lib/i386 -ljawt -Wl,-static,-lXxf86vm,-lXcursor,-lXrender,-lXrandr,-call_shared
|
||||
CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
|
||||
SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c)
|
||||
SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../generated/*c)
|
||||
OBJECTS=$(subst .c,.o,$(SRC))
|
||||
LIBRARY=liblwjgl.so
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ STRIP=strip
|
|||
CFLAGS_LINK=-dynamiclib -Wall
|
||||
FRAMEWORKS=-framework Foundation -framework AppKit -framework JavaVM -framework Carbon
|
||||
CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I${AL}/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
|
||||
SRC=$(wildcard *.m) $(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c)
|
||||
SRC=$(wildcard *.m) $(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../generated/*.c)
|
||||
OBJECTS=$(subst .m,.o, $(subst .c,.o,$(SRC)))
|
||||
LIBRARY=liblwjgl.jnilib
|
||||
|
||||
|
|
Loading…
Reference in New Issue