
## End User configurable options ###
SHELL = @SHELL@

@VPATH@
# Installation directories
prefix       = @prefix@
exec_prefix  = @exec_prefix@
bindir       = @bindir@
includedir   = @includedir@
libdir       = @libdir@
# Build directories
libbuild_dir = @libbuild_dir@
top_srcdir   = @top_srcdir@
srcdir       = @srcdir@

JC           = @JC@
JAR          = @JAR@
RM           = @RM@

TARGET    =
PACKAGE   = viewer.zoomable
SRC       = Diagnosis.java Debug.java Profile.java \
            YaxisTreeNode.java IntegerArrayComparator.java YaxisMaps.java \
            named_vector.java YaxisTree.java \
            TimeEvent.java TimeListener.java \
            ModelTime.java ScrollbarTime.java ModelTimePanel.java \
            TimeFormat.java InfoDialog.java InfoDialogForTime.java \
            InitializableDialog.java SummarizableView.java \
            SearchPanel.java SearchableView.java \
            OperationDurationPanel.java InfoDialogForDuration.java \
            SearchableView.java ScrollableView.java ScrollableObject.java \
            ToolBarStatus.java ViewportTime.java \
            ViewportTimeYaxis.java SearchDialog.java \
            RulerTime.java ViewportTimePanel.java CoordPixelImage.java \
            ScaledSlider.java RowAdjustments.java \
            ActionVportUp.java ActionVportDown.java \
            ActionTimelineMark.java ActionTimelineMove.java \
            ActionTimelineDelete.java \
            ActionYaxisTreeExpand.java ActionYaxisTreeCollapse.java \
            ActionYaxisTreeCommit.java \
            ActionVportBackward.java ActionVportForward.java \
            ActionVportUp.java ActionVportDown.java \
            ActionZoomIn.java ActionZoomHome.java ActionZoomOut.java \
            ActionZoomUndo.java ActionZoomRedo.java \
            ActionSearchInit.java \
            ActionSearchForward.java ActionSearchBackward.java \
            ActionPptyRefresh.java ActionPptyPrint.java ActionPptyStop.java

OBJ       = $(SRC:.java=.class)

TS_TARGET = $(libbuild_dir)/ts_time.jar
TS_SRC    = TestMainToolBar.java TestMainPanel.java TestMainFrame.java
TS_OBJ    = $(TS_SRC:.java=.class)

.SUFFIXES:	.java .class .jar

# CLASSPATH = .:/pkgs/lang/java/jdk117_v3/lib/rt.jar:/pkgs/lang/java/jdk117_v3/lib/classes.zip:/pkgs/lang/java/jdk117_v3/classes:/home/chan/mpe_work/mpe/viewers/jumpshot-3/swing/swing.jar
SRCDIR     = $(top_srcdir)
CLASSDIR   = ../..
CLASSPATH  = ../..
PKGDIR     = viewer/zoomable

JCFLAGS = -sourcepath @JPATH_START@$(SRCDIR)@JPATH_FINAL@ -classpath @JPATH_START@$(CLASSPATH)@JPATH_FINAL@ -d @JPATH_START@$(CLASSDIR)@JPATH_FINAL@ @JFLAGS@

.java.class:
	$(JC) $(JCFLAGS) $(JFLAGS) @JPATH_START@$<@JPATH_FINAL@

# echo "Class-Path: images" >> $(PACKAGE).manifest ;

ALL: $(OBJ)

# Only need base/drawable/TimeBoundingBox.class from base/drawable
$(TS_TARGET): $(OBJ) $(TS_OBJ)
	cd $(CLASSDIR) && \
	$(RM) $(PACKAGE).manifest && \
	echo "Main-Class: $(PACKAGE).TestMainFrame" > $(PACKAGE).manifest ; \
	jarfile=@JPATH_START@$@@JPATH_FINAL@ ; \
	$(JAR) $(JARFLAGS)cfm $${jarfile} $(PACKAGE).manifest ; \
	for dir in base/drawable/ viewer/common/ $(PKGDIR)/ ; do \
	    classdir_prefix=@JPATH_START@$${dir}@JPATH_FINAL@ ; \
	    $(JAR) $(JARFLAGS)uf $${jarfile} $${classdir_prefix}*.class ; \
	done ; \
	$(JAR) $(JARFLAGS)uf $${jarfile} images/*.gif applet.html

clean:
	cd $(CLASSDIR) && \
	$(RM) $(PACKAGE).manifest $(PKGDIR)/*.class

rmlib:
	$(RM) $(TARGET) $(TS_TARGET)

realclean: clean rmlib

distclean: realclean
	@-$(RM) Makefile
