summaryrefslogtreecommitdiffstats
path: root/make/Makefile
blob: a1aa688ffeb7b552fbb77de96bb717ba8fec3cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
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)