#
# JTypist v3.0 - Java typing tutor program for UNIX systems
# Copyright (C) 1998  Simon Baldwin (simonb@sco.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# Makefile for typist 3.0 (Java version)
#

# compiler flags (debug, optimization...)
#JAVAC_FLAGS = -g
JAVAC_FLAGS = -O
#JAVAC_FLAGS =

# suffixes and implicit rule to enable java compilations
.SUFFIXES:	.java .class

.java.class:
	javac $(JAVAC_FLAGS) $<

# useful general lists of bulk data classes; peers - saves repeating
KB_LAYOUTS =	KBLayoutUS.class KBLayoutUK.class KBLayoutDvorak.class
LESSON_DATA =	LessonSeriesD.class LessonSeriesM.class LessonSeriesN.class \
		LessonSeriesQ.class LessonSeriesR.class LessonSeriesS.class \
		LessonSeriesT.class LessonSeriesU.class LessonSeriesV.class


# default make target (first one in the file)
default: all


# complete dependency structure
#	Keyboard layouts
$(KB_LAYOUTS): KeyData.class KBLayoutable.class

KBLayout.class: $(KB_LAYOUTS)

#	Lesson series
$(LESSON_DATA): Lesson.class

LessonSeriesLibrary.class: $(LESSON_DATA)

#	Keystroke statistics
KBStatistics.class: KeyStatistics.class KBLayout.class

#	GUI classes and doc classes
TutorialGUI.class: Lesson.class

AExerciseGUIStats.class: Lesson.class KeyStatistics.class

ExerciseGUIStats.class: Lesson.class KeyStatistics.class

ExerciseGUI.class: Lesson.class KeyStatistics.class KBStatistics.class \
	ExerciseGUIStats.class AExerciseGUIStats.class

StatisticsGUI.class: KBStatistics.class Gauge.class

HelpGUI.class: HelpText.class

ControlGUI.class: TutorialGUI.class ExerciseGUI.class HelpGUI.class \
	AboutGUI.class AAboutGUI.class StatisticsGUI.class

HelpHTML.class: HelpText.class

Typist.class: ControlGUI.class TutorialGUI.class ExerciseGUI.class \
	HelpGUI.class AboutGUI.class AAboutGUI.class StatisticsGUI.class \
	KBStatistics.class KBLayout.class

Typist30.html: HelpText.class HelpHTML.class
	java HelpHTML >Typist30.html


# selected entry points into dependencies
keyboards: KBLayout.class

lessons: LessonSeriesLibrary.class

statistics: KBStatistics.class

gui: ControlGUI.class

main: Typist.class

doc: Typist30.html

typist: keyboards lessons statistics gui main doc


# all target; does the whole thing
all: typist

# cleanup make targets
clean:
	rm -rf *.class
	rm -rf Typist30.html

clobber: clean
