# file: Makefile
#
#	Visualization Class, V22.0480.002, Spring 2003
#	Professor Yap (yap@cs.nyu.edu)
######################################################################
#
# What is in this directory:
#	This is a demo of how to write Java Swing GUI programs. 
#	The examples are graduated.
#	You should be able to test the various examples by typing
#	"make one", "make two", etc.
#
#	REFERENCE:
#		"Core Java, Vol 1" by Horstmann and Cornell,
#		Chapter 7, graphics programming.
#
######################################################################
#
# HOW to use this Makefile:
#	(1) It is a documentation of how to use the programs in this
#		directory.
#	(2) If you type "make", it will make the default target,
#		which is simply the first target in the file.
#		This is ${p}$.  Since it is assigned to "EmptyFrame1",
#		this becomes our default.
#	(3) You can override the value of the variable p in your 
#		command line.  E.g., if you type
#
#			> make p=ColorButton
#
#		then you will compile and run ColorButton.java instead.
#	(4) Finally, there are several more descriptive names for
#		our targets: you can type
#
#			> make one
#
# 		to get the first example, and type "make two" to get 
#		the next example, and so on.  Note that "make one" is
#		exactly the same as
#
#			> make empty
#
#		which is the same as "make p=EmptyFrame".
#
######################################################################
# Variables:
######################################################################

p=ColorButton
p=MyPanel
p=MyPanel1
p=EmptyFrame
p=EmptyFrame1

######################################################################
# Targets:
######################################################################

${p}: ${p}.class
	java ${p}

${p}.class : ${p}.java
	javac ${p}.java


one empty: EmptyFrame.java
	javac EmptyFrame.java
	java EmptyFrame

two empty1: EmptyFrame1.java
	javac EmptyFrame1.java
	java EmptyFrame1

three panel: MyPanel.java
	javac MyPanel.java
	java MyPanel

four panel1: MyPanel1.java
	javac MyPanel1.java
	java MyPanel1

five panel2: MyPanel2.java
	javac MyPanel2.java
	java MyPanel2

six ColorButton: ColorButton.java
	javac ColorButton.java
	java ColorButton

# six and sixx are identical!

sixx MenuAction: MenuAction.java
	javac MenuAction.java
	java MenuAction

seven DrawFrame: DrawFrame.java
	javac DrawFrame.java
	java DrawFrame

eight DrawFrame1: DrawFrame1.java
	javac DrawFrame1.java
	java DrawFrame1

nine Sketch: Sketch.java
	javac Sketch.java
	java Sketch

######################################################################
# Housekeeping:
######################################################################
clean:
	-@rm *.class

save:
	ci -l -m"make save" *.tex *java Makefile Notes README

cp:
	cp *.tex *java Makefile Notes README RCS

tar:
	-@tar -cvf introGUI.tar *tex *java Makefile README Notes


