Package list lwjgl / upstream/2.5+dfsg platform_build / build-generator.xml
upstream/2.5+dfsg

Tree @upstream/2.5+dfsg (Download .tar.gz)

build-generator.xml @upstream/2.5+dfsgraw · history · blame

<project name="generator">

	<!-- clean the generated files -->
	<target name="clean-generated" description="Deletes the generated java and native source">
		<delete quiet="true" failonerror="false">
			<fileset dir="${lwjgl.src}/generated" includes="**"/>
			<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">
			<compilerarg value="-Xlint:all"/>
		</javac>
        <!-- Compile helper classes used by the templates -->
		<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.4" target="1.4" taskname="generator">
			<include name="org/lwjgl/opengl/GLSync.java"/>
            <include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/>
			<include name="org/lwjgl/opengl/PointerWrapper.java"/>
		</javac>
	</target>

	<!-- Proxy target to generate it all -->
	<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>

	<target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references" description="Generates java and native source"/>

	<!-- Generate OpenAL -->
	<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
		<apply executable="apt" parallel="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"/>
			<arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/>
			<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
		</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">
			<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"/>
			<arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/>
			<arg value="-Ageneratechecks"/>
			<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
		</apply>
	</target>

	<!-- Generate OpenGL -->
	<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
		<apply executable="apt" parallel="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"/>
			<arg value="-Acontextspecific"/>
			<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
			<fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
		</apply>
	</target>

	<!-- Generate OpenGL [DEBUG] -->
	<target name="generate-opengl-debug" depends="generators" description="Generates java and native source for GL">
		<apply executable="apt" parallel="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"/>
			<arg value="-Ageneratechecks"/>
			<arg value="-Acontextspecific"/>
			<arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
			<fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
		</apply>
	</target>

	<!-- Generate references -->
	<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
		<apply executable="apt" parallel="true">
			<arg value="-nocompile"/>
			<arg value="-factory"/>
			<arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/>
			<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}" includes="${opengl-template-pattern}"/>
		</apply>
	</target>
	
	<!-- Generate context capabilities -->
	<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
		<apply executable="apt" parallel="true">
			<arg value="-nocompile"/>
			<arg value="-factory"/>
			<arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/>
			<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}" includes="${opengl-template-pattern}"/>
		</apply>
	</target>	
	
	<!-- Generate context capabilities [DEBUG] -->
	<target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL">
		<apply executable="apt" parallel="true">
			<arg value="-nocompile"/>
			<arg value="-factory"/>
			<arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/>
			<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}" includes="${opengl-template-pattern}"/>
		</apply>
	</target>	
</project>