# # A java Makefile rdb 3/18/98 # # In addition to compiling, this make file will generate a set of utility # shell files that simplify the execution of the resulting java code as # either an application or applet. # # 1. set the PROG variable to the name you want to assign to the executable # 2. update the SRCS variable to include other source files, if needed # 3. udpate teh WIDTH and HEIGHT variables that are the default size of # the applet window created by $(PROG).html. # 4. run "make new" -- which produces # $(PROG).html # run -- shell file to run java $(PROG) # applet -- shell file to run appletviewer $(PROG).html # # make -- runs javac (if needed) then java interpreter # make new -- regenerates "applet", "run", and ".html" if Makefile # been modified since file modify time. # make {applet,run,html} -- regenerates specified file .SUFFIXES: .java .class PROG = Swing3d SRCS = $(PROG).java \ ApplicFrame.java \ DrawCanvas.java \ Shape.java \ Face.java \ Cube.java Tetrahedron.java \ NDCpoint.java \ Face.java \ Solid.java \ JSlider.java \ FloatListener.java \ View.java \ BSPTree.java BSPNode.java Plane3d.java \ AutoRotate.java \ SolidObject.java SolidObjectPoint.java SolidObjectList.java \ Instance.java \ OutSerialize.java InSerialize.java \ JNameDialog.java JRotateDialog.java \ Matrix4.java Point4.java List.java Action.java OBJS = $(SRCS:.java=.class) JFLAGS = -g -deprecation RUNFLAGS = WIDTH = 400 HEIGHT = 450 .java.class: javac $(JFLAGS) $*.java $(PROG): $(OBJS) java $(RUNFLAGS) $(PROG) both: $(OBJS) applet& java $(RUNFLAGS) $(PROG) new: run applet html run: Makefile rm -f run echo java $(PROG) '$$*' > run chmod +x run applet: Makefile rm -f applet echo "appletviewer $(PROG).html" > applet chmod +x applet $(PROG).html: Makefile rm -f $(PROG).html echo "" > $(PROG).html echo "" >> $(PROG).html echo "" >> $(PROG).html echo "" >> $(PROG).html html: $(PROG).html