# set GRAPHICS to either YES or NO
# set INCLUDE to the either relative or absolute location of the header files

GRAPHICS= YES
INCLUDE= ../Source

# don't touch anything below here

INC= $(INCLUDE)/dstruct.h $(INCLUDE)/iterators.h $(INCLUDE)/multiplicative.h $(INCLUDE)/treenode.h $(INCLUDE)/underlying.h $(INCLUDE)/visitor.h $(INCLUDE)/underlying/binom.h 

ifeq (YES, $(GRAPHICS))
	LIBS := -lm -lgd -lpng
	ENABLE := -DGRAPHICS=1
else
	LIBS := -lm
	ENABLE := 
endif

all: underlyingtest

underlyingtest: underlyingtest.o 
	g++ -g -o underlyingtest underlyingtest.o $(LIBS)

underlyingtest.o: underlyingtest.cpp $(INC)
	g++ -I$(INCLUDE) $(ENABLE) -Wall -g -c underlyingtest.cpp

clean: 
	rm -f *~ *.o *.png underlyingtest