
## 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 = logformat.slog2
SRC     = Const.java TraceName.java \
          TreeNodeID.java FileBlockPtr.java \
          TreeDirValue.java TreeDir.java \
          Permutation.java LineIDMap.java LineIDMapList.java \
          IteratorOfBackPrimitives.java IteratorOfForePrimitives.java \
          IteratorOfBackDrawables.java IteratorOfForeDrawables.java \
          IteratorOfAllDrawables.java \
          BufForObjects.java BufForDrawables.java BufForShadows.java \
          CategoryMap.java Header.java

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

.SUFFIXES:      .java .class .jar

# CLASSDIR is where classfiles are located, all counted from the top
SRCDIR     = $(top_srcdir)
CLASSDIR   = ../..
CLASSPATH  = ../..
PKGDIR     = logformat/slog2

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@

ALL: $(OBJ)
	cd output && $(MAKE)
	cd input  && $(MAKE)
	cd pipe   && $(MAKE)

clean:
	cd output && $(MAKE) clean
	cd input  && $(MAKE) clean
	cd pipe   && $(MAKE) clean
	cd $(CLASSDIR) && \
	$(RM) $(PKGDIR)/*.class

rmlib:
	cd output && $(MAKE) rmlib
	cd input  && $(MAKE) rmlib
	cd pipe   && $(MAKE) rmlib

realclean: clean rmlib

distclean: realclean
	@-$(RM) output/Makefile input/Makefile pipe/Makefile
	@-$(RM) Makefile
