#############################################################################
#
#  makefile for tree traversal
#
#############################################################################
#
#  If you move this makefile, update the variable below
#  or else depend won't work.
#
#############################################################################

MAKEFILE	= Makefile
CC		= g++
CFILES		= main-gof.cpp LQueue.cpp AQueue.cpp Array.cpp Queue.cpp getopt.cpp Factories.cpp Options.cpp  Visitor.cpp Print_Visitor.cpp
OFILES		= main-gof.o getopt.o Factories.o Options.o Visitor.o Print_Visitor.o Tree_Iterator_Impl.o

#############################################################################
# Flags for Installation
#############################################################################
BINDIR		= .
#############################################################################

DFLAGS		= -ggdb
IFLAGS          = 
OPTFLAGS	=  # Enable this flag if compiler supports templates...
LDFLAGS		= -g
CFLAGS		= $(IFLAGS) $(OPTFLAGS) $(DFLAGS)

#############################################################################
# G++ directives
#############################################################################
.SUFFIXES: .C .cpp
.cpp.o:
	$(CC) $(CFLAGS) -c $<
#############################################################################

all: tree-traversal

tree-traversal: $(OFILES)
	$(CC) $(LDFLAGS) $(OFILES) -o $@

clean:
	/bin/rm -f *.o *.out *~ core

realclean: clean
	/bin/rm -rf tree-traversal

depend:
	g++dep -f $(MAKEFILE) $(CFILES)

# DO NOT DELETE THIS LINE -- g++dep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

main-gof.o: main-gof.cpp Tree.h Node.h Refcounter.h Typedefs.h Node.cpp \
  Print_Visitor.h Visitor.h Tree.cpp Tree_Iterator_Impl.h Queue.h \
  Queue.cpp Factories.h Options.h Tree_Iterator_Impl.cpp
LQueue.o: LQueue.cpp LQueue.h LQueue.cpp
AQueue.o: AQueue.cpp AQueue.h Array.h scoped_array.h Array.cpp Array.inl \
  AQueue.cpp
Array.o: Array.cpp Array.h scoped_array.h Array.cpp Array.inl
Queue.o: Queue.cpp Queue.h Queue.cpp
getopt.o: getopt.cpp
Factories.o: Factories.cpp Factories.h Tree.h Node.h Refcounter.h \
  Typedefs.h Node.cpp Print_Visitor.h Visitor.h Tree.cpp \
  Tree_Iterator_Impl.h Queue.h Queue.cpp Options.h
Options.o: Options.cpp Options.h getopt.h
Visitor.o: Visitor.cpp Visitor.h Typedefs.h
Print_Visitor.o: Print_Visitor.cpp Print_Visitor.h Visitor.h Typedefs.h \
  Tree.h Node.h Refcounter.h Node.cpp Tree.cpp Tree_Iterator_Impl.h \
  Queue.h Queue.cpp

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
