blob: ee52a8c19550210c54736929c57ade25def91513 [file] [log] [blame]
<!--
- Ant build for the ANTLR GLSL ES grammar and simple test harness.
- "ant" to compile everything.
- "ant clean" to clean the build.
- "ant test" to run tests.
-->
<project name="GLSL_ES" basedir="." default="all">
<target name="init">
<property name="build" value="build" />
<property name="test" value="test" />
<path id="antlr.classpath">
<pathelement location="../../../third_party/antlr3/lib/antlr-3.1.1.jar" />
</path>
<path id="antlr.runtime.classpath">
<pathelement location="../../../third_party/antlr3/lib/antlr-runtime-3.1.1.jar" />
</path>
<path id="test.classpath">
<pathelement location="../../../third_party/antlr3/lib/antlr-runtime-3.1.1.jar" />
<pathelement location="${build}" />
</path>
</target>
<target name="build" depends="init">
<mkdir dir="${build}" />
<mkdir dir="${build}/glsl_es" />
<!-- Run ANTLR on the grammar -->
<java classname="org.antlr.Tool" failonerror="true">
<classpath refid="antlr.classpath" />
<arg value="glsl_es/GLSL_ES.g" />
<arg value="-fo" />
<arg value="${build}/glsl_es" />
</java>
<!-- Compile the grammar and test cases -->
<javac srcdir="${build}:${test}"
destdir="${build}">
<classpath refid="antlr.runtime.classpath" />
</javac>
</target>
<target name="test" depends="init">
<java classname="test.Main">
<classpath refid="test.classpath" />
<arg value="shaders/ambient.vert" />
<arg value="shaders/ambient.frag" />
<arg value="shaders/diffuse.vert" />
<arg value="shaders/diffuse.frag" />
<arg value="shaders/many-planets-deep.vert" />
<arg value="shaders/many-planets-deep.frag" />
<arg value="shaders/nvidia-vertex-buffer-object.vert" />
<arg value="shaders/nvidia-vertex-buffer-object.frag" />
<arg value="shaders/texture_mapping.vert" />
<arg value="shaders/texture_mapping.frag" />
<arg value="shaders/particles-2d.vert" />
<arg value="shaders/particles-3d.vert" />
<arg value="shaders/particles.frag" />
<arg value="shaders/san-angeles-flat.vert" />
<arg value="shaders/san-angeles-lit.vert" />
<arg value="shaders/san-angeles-flat.frag" />
<arg value="shaders/shiny-teapot.vert" />
<arg value="shaders/shiny-teapot.frag" />
<arg value="shaders/spirit-box.vert" />
<arg value="shaders/spirit-box.frag" />
<arg value="shaders/spore-view.vert" />
<arg value="shaders/spore-view.frag" />
<arg value="shaders/teapot-per-pixel.vert" />
<arg value="shaders/teapot-per-pixel.frag" />
<arg value="shaders/teapot-per-vertex.vert" />
<arg value="shaders/teapot-per-vertex.frag" />
</java>
</target>
<target name="testgrammar" depends="init">
<mkdir dir="${build}" />
<!-- Run ANTLR on the grammar -->
<java classname="org.antlr.Tool">
<classpath refid="antlr.classpath" />
<arg value="glsl_es/Test.g" />
<arg value="-fo" />
<arg value="${build}" />
</java>
</target>
<target name="clean" depends="init">
<delete dir="${build}" />
</target>
<target name="all" depends="build" />
</project>