summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/readme.html10
-rw-r--r--make/Makefile154
-rw-r--r--make/build.xml94
3 files changed, 100 insertions, 158 deletions
diff --git a/doc/readme.html b/doc/readme.html
index d122da6..f98c523 100644
--- a/doc/readme.html
+++ b/doc/readme.html
@@ -15,13 +15,15 @@ package. To build the demos:
<UL>
<LI> Check out and build the Jogl sources from <a href =
- "http://jogl.dev.java.net/">http://jogl.dev.java.net/</a>
+ "http://jogl.dev.java.net/">http://jogl.dev.java.net/</a>; note that
+ these sources must go into a sibling directory to the jogl-demos
+ directory
- <LI> Add jogl.jar to your CLASSPATH and put jogl.dll, libjogl.so, or
- jogl.dylib in your PATH, LD_LIBRARY_PATH or similar
+ <LI> Unset your CLASSPATH environment variable
<LI> cd into the "make" subdirectory of the jogl-demos workspace and
- type "make" (NOTE: GNU make is required)
+ type "ant" (Ant can be obtained from <a href =
+ "http://ant.apache.org/">http://ant.apache.org/</a>
</UL>
diff --git a/make/Makefile b/make/Makefile
deleted file mode 100644
index a1aa688..0000000
--- a/make/Makefile
+++ /dev/null
@@ -1,154 +0,0 @@
-ROOT=..
-# Note: some of these directories are also coded into the .cfg files
-SRC_DIR=$(ROOT)/src
-BUILD_DIR=$(ROOT)/build
-CLASSES_DIR=$(BUILD_DIR)/classes
-JAVADOC_DIR=$(ROOT)/javadoc
-JAVADOC_LINK=http://java.sun.com/j2se/1.4.1/docs/api/
-JAVAC=javac
-
-#----------------------------------------------------------------------
-# gleem variables
-#
-
-GLEEM_JAVAFILES = \
- $(SRC_DIR)/gleem/BSphere.java \
- $(SRC_DIR)/gleem/BSphereProvider.java \
- $(SRC_DIR)/gleem/CameraParameters.java \
- $(SRC_DIR)/gleem/ExaminerViewer.java \
- $(SRC_DIR)/gleem/HandleBoxManip.java \
- $(SRC_DIR)/gleem/HitPoint.java \
- $(SRC_DIR)/gleem/Manip.java \
- $(SRC_DIR)/gleem/ManipManager.java \
- $(SRC_DIR)/gleem/ManipMotionListener.java \
- $(SRC_DIR)/gleem/ManipPart.java \
- $(SRC_DIR)/gleem/ManipPartCube.java \
- $(SRC_DIR)/gleem/ManipPartGroup.java \
- $(SRC_DIR)/gleem/ManipPartLineSeg.java \
- $(SRC_DIR)/gleem/ManipPartSquare.java \
- $(SRC_DIR)/gleem/ManipPartTransform.java \
- $(SRC_DIR)/gleem/ManipPartTriBased.java \
- $(SRC_DIR)/gleem/ManipPartTwoWayArrow.java \
- $(SRC_DIR)/gleem/MouseButtonHelper.java \
- $(SRC_DIR)/gleem/NormalCalc.java \
- $(SRC_DIR)/gleem/RayTriangleIntersection.java \
- $(SRC_DIR)/gleem/RightTruncPyrMapping.java \
- $(SRC_DIR)/gleem/ScreenToRayMapping.java \
- $(SRC_DIR)/gleem/TestExaminerViewer.java \
- $(SRC_DIR)/gleem/TestHandleBox.java \
- $(SRC_DIR)/gleem/TestMultiWin.java \
- $(SRC_DIR)/gleem/TestTranslate1.java \
- $(SRC_DIR)/gleem/TestTranslate2.java \
- $(SRC_DIR)/gleem/Translate1Manip.java \
- $(SRC_DIR)/gleem/Translate2Manip.java \
- $(SRC_DIR)/gleem/WindowUpdateListener.java \
- $(SRC_DIR)/gleem/linalg/DimensionMismatchException.java \
- $(SRC_DIR)/gleem/linalg/IntersectionPoint.java \
- $(SRC_DIR)/gleem/linalg/Line.java \
- $(SRC_DIR)/gleem/linalg/Mat2f.java \
- $(SRC_DIR)/gleem/linalg/Mat3f.java \
- $(SRC_DIR)/gleem/linalg/Mat4f.java \
- $(SRC_DIR)/gleem/linalg/Matf.java \
- $(SRC_DIR)/gleem/linalg/MathUtil.java \
- $(SRC_DIR)/gleem/linalg/NonSquareMatrixException.java \
- $(SRC_DIR)/gleem/linalg/Plane.java \
- $(SRC_DIR)/gleem/linalg/PlaneUV.java \
- $(SRC_DIR)/gleem/linalg/Rotf.java \
- $(SRC_DIR)/gleem/linalg/SingularMatrixException.java \
- $(SRC_DIR)/gleem/linalg/Vec2f.java \
- $(SRC_DIR)/gleem/linalg/Vec3d.java \
- $(SRC_DIR)/gleem/linalg/Vec3f.java \
- $(SRC_DIR)/gleem/linalg/Vec4f.java \
- $(SRC_DIR)/gleem/linalg/Vecf.java \
- $(SRC_DIR)/gleem/linalg/Veci.java
-
-#
-#----------------------------------------------------------------------
-
-#----------------------------------------------------------------------
-# demo files
-
-DEMO_JAVAFILES = \
- $(SRC_DIR)/demos/gears/Gears.java \
- $(SRC_DIR)/demos/hwShadowmapsSimple/HWShadowmapsSimple.java \
- $(SRC_DIR)/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java \
- $(SRC_DIR)/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java \
- $(SRC_DIR)/demos/proceduralTexturePhysics/Water.java \
- $(SRC_DIR)/demos/testContextSharing/TestContextSharing.java \
- $(SRC_DIR)/demos/vertexArrayRange/VertexArrayRange.java \
- $(SRC_DIR)/demos/vertexProgRefract/VertexProgRefract.java \
- $(SRC_DIR)/demos/vertexProgWarp/VertexProgWarp.java
-
-#
-#----------------------------------------------------------------------
-
-#----------------------------------------------------------------------
-# demo utility files
-
-DEMO_UTIL_JAVAFILES = \
- $(SRC_DIR)/demos/util/Bunny.java \
- $(SRC_DIR)/demos/util/DDSReader.java \
- $(SRC_DIR)/demos/util/DurationTimer.java \
- $(SRC_DIR)/demos/util/DxTex.java \
- $(SRC_DIR)/demos/util/FloatList.java \
- $(SRC_DIR)/demos/util/IntList.java \
- $(SRC_DIR)/demos/util/LEDataInputStream.java \
- $(SRC_DIR)/demos/util/MD2.java \
- $(SRC_DIR)/demos/util/ObjReader.java \
- $(SRC_DIR)/demos/util/SystemTime.java \
- $(SRC_DIR)/demos/util/TGAImage.java \
- $(SRC_DIR)/demos/util/Time.java \
- $(SRC_DIR)/demos/util/Triceratops.java
-
-#
-#----------------------------------------------------------------------
-
-#
-# Compilation package rules
-#
-
-JAVAFILES = $(GLEEM_JAVAFILES) $(DEMO_JAVAFILES) $(DEMO_UTIL_JAVAFILES)
-CLASSFILES=$(patsubst $(SRC_DIR)/%,$(CLASSES_DIR)/%,$(JAVAFILES:.java=.class))
-
-JOGL_DEMOS_JAR=$(BUILD_DIR)/jogl-demos.jar
-JOGL_DEMOS_UTIL_JAR=$(BUILD_DIR)/jogl-demos-util.jar
-JOGL_DEMOS_DATA_JAR=$(BUILD_DIR)/jogl-demos-data.jar
-
-$(JOGL_DEMOS_JAR) $(JOGL_DEMOS_UTIL_JAR) $(JOGL_DEMOS_DATA_JAR): $(CLASSFILES)
- rm -f $(JOGL_DEMOS_JAR) $(JOGL_DEMOS_DATA_JAR)
- cd $(CLASSES_DIR) ; \
- jar cvf ../jogl-demos.jar \
- demos/gears \
- demos/hwShadowmapsSimple \
- demos/infiniteShadowVolumes \
- demos/proceduralTexturePhysics \
- demos/testContextSharing \
- demos/vertexArrayRange \
- demos/vertexProgRefract \
- demos/vertexProgWarp ; \
- jar cvf ../jogl-demos-util.jar \
- demos/util gleem
- cd $(SRC_DIR) ; \
- jar cvf ../build/jogl-demos-data.jar demos/data
-
-$(CLASSFILES) : $(JAVAFILES)
- mkdir -p $(CLASSES_DIR)
- $(JAVAC) -source 1.4 -classpath "$(CLASSES_DIR)$(CP_SEPARATOR)$(CLASSPATH)" -d $(CLASSES_DIR) $(JAVAFILES)
-
-doc:
- mkdir -p $(JAVADOC_DIR)
- javadoc -source 1.4 -d $(JAVADOC_DIR) -link $(JAVADOC_LINK) \
- -public -sourcepath "$(SRC_DIR)" \
- demos.gears \
- demos.hwShadowmapsSimple \
- demos.infiniteShadowVolumes \
- demos.proceduralTexturePhysics \
- demos.util \
- demos.vertexArrayRange \
- demos.vertexProgRefract \
- demos.vertexProgWarp \
- gleem \
- gleem.linalg
-
-clean:
- rm -rf $(BUILD_DIR) $(JAVADOC_DIR)
diff --git a/make/build.xml b/make/build.xml
new file mode 100644
index 0000000..2f5fd1f
--- /dev/null
+++ b/make/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - Ant build for the JOGL demos. This build has been tested with ANT 1.5.3.
+ -
+ - In order for this build to succeed the resulting jar files from this build
+ - (jogl-demos.jar, jogl-demos-data.jar, jogl-demos-util.jar) must not be on
+ - the CLASSPATH.
+ -
+ - This build requires that the jogl project has been checked out into a sibling
+ - directory to the jogl-demos top-level directory and that the jogl.jar has been
+ - built into its build directory.
+ -->
+<project name="JOGL.demos" default="all">
+ <!--
+ - Make sure that jogl-demos.jar is not on the CLASSPATH; this can
+ - cause builds to fail since if this Java process has the jar file
+ - open we can not overwrite it.
+ -->
+ <target name="test.for.jogl.demos.jar">
+ <available property="jogl.demos.jar.on.class.path" classname="demos.gears.Gears" />
+ </target>
+ <target name="java.class.path.validate" depends="test.for.jogl.demos.jar" if="jogl.demos.jar.on.class.path">
+ <fail>
+
+ ******************************************************************
+ ** Your CLASSPATH environment variable appears to be set (some **
+ ** JOGL demos' classes are currently visible to the build.) **
+ ** This can cause the build to fail. Please unset your **
+ ** CLASSPATH variable and restart the build. **
+ ******************************************************************
+ </fail>
+ </target>
+
+ <target name="init" depends="java.class.path.validate">
+ <property name="jogl.jar" value="../../jogl/build/jogl.jar" />
+ <property name="classes" value="../build/classes" />
+ <property name="src" value="../src" />
+ <property name="javadoc" value="../javadoc" />
+ <property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" />
+ <property name="javadoc.link.jogl" value="../../jogl/javadoc-public/" />
+ <property name="jogl.demos.jar" value="../build/jogl-demos.jar" />
+ <property name="jogl.demos.util.jar" value="../build/jogl-demos-util.jar" />
+ <property name="jogl.demos.data.jar" value="../build/jogl-demos-data.jar" />
+ </target>
+
+ <target name="all" depends="init">
+ <mkdir dir="${classes}" />
+ <path id="jogl.classpath">
+ <pathelement path="${classpath}" />
+ <pathelement location="${jogl.jar}" />
+ </path>
+ <javac destdir="${classes}" excludes="demos/cg/**" source="1.4">
+ <src path="${src}" />
+ <classpath refid="jogl.classpath" />
+ </javac>
+ <jar destfile="${jogl.demos.jar}">
+ <fileset dir="${classes}">
+ <exclude name="gleem/**" />
+ <exclude name="demos/util/**" />
+ </fileset>
+ </jar>
+ <jar destfile="${jogl.demos.util.jar}">
+ <fileset dir="${classes}">
+ <include name="gleem/**" />
+ <include name="demos/util/**" />
+ </fileset>
+ </jar>
+ <jar destfile="${jogl.demos.data.jar}">
+ <fileset dir="${src}">
+ <include name="demos/data/**" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="javadoc" depends="init">
+ <mkdir dir="${javadoc}" />
+ <javadoc destdir="${javadoc}" windowtitle="JOGL Demos"
+ source="1.4">
+ <packageset dir="${src}">
+ <exclude name="demos/cg/**" />
+ </packageset>
+ <link href="${javadoc.link}" />
+ <!-- FIXME: this doesn't work -->
+ <link href="${javadoc.link.jogl}" />
+ </javadoc>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="../build" />
+ <fileset dir="../javadoc" />
+ </delete>
+ </target>
+ </project>