# Makefile for jGL GLUT Examples

# jGL 3D Graphics Library for Java
# Version:  2.4
# Copyright (C) 1996-2003  Robin Bing-Yu Chen

### Local Setting ###

LOCALCLASSPATH = jgl.jar

BACKUPDIR = Example-glut_BAK

FILES = bezcurve bezmesh bezsurf checker clip colormat cube doublebuffer \
	hello light lines list material mipmap model movelight pickdepth \
	picksquare planet polys quadric robot scene select smooth stroke \
	surface tea teapots texbind texgen texsub texture3d texturesurf \
	torus unproject
# drawf

### RULES ###

.SUFFIXES: .java

.java:
	@echo "Compile" $< "and Convert" $*.html
	@$(JAVAC) $(FLAGS) -classpath $(LOCALCLASSPATH) $<
	@if [ -f ../Example/$*.html ]; then $(CP) ../Example/$*.html .; fi
	@$(CP) $*.html $*-pi.html 
	@$(HTMLCONV) $*-pi.html
	@cd .. ; $(RM) $(BACKUPDIR)

### TARGETS ###

all:	jgl.jar $(FILES)
	@echo "Compile GLUT Examples of jGL ok."

jgl.jar:
	@$(CP) ../Example/jgl.jar .

clean:
	@$(RM) jgl.jar
	@$(RM) *.class core
	@$(MV) hello.html hello.htm
	@$(MV) quadric.html quadric.htm
	@$(MV) scene.html scene.htm
	@$(MV) texbind.html texbind.htm
	@$(MV) texsub.html texsub.htm
	@$(MV) texture3d.html texture3d.htm
	@$(MV) torus.html torus.htm
	@$(MV) unproject.html unproject.htm
	@$(RM) *.html
	@$(MV) unproject.htm unproject.html
	@$(MV) torus.htm torus.html
	@$(MV) texture3d.htm texture3d.html
	@$(MV) texsub.htm texsub.html
	@$(MV) texbind.htm texbind.html
	@$(MV) scene.htm scene.html
	@$(MV) quadric.htm quadric.html
	@$(MV) hello.htm hello.html

include Make-config
