# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Makefile to build the executable files of seq.graph
# To compile all:
# 		make
# To clean the useless files: *.o and *.DB:
#               make clean
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# CHANGE THE FOLLOWING SENTENCES ACCORDING TO YOUR SITE:
# Define the c++ compilator:
# ------------------------
CC = CC
#
# Compilation options:
# ----------------------
CFLAGS = -fast 
#
# END OF CHANGES
#
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# The directories where are the source-files
GFXDIR = SEQGFX
IMGDIR = IMAGE
GDDIR  = gd1.2

all: img  gfx seq.graph
	make img;
	make gfx;
	make seq.graph;

img :
	{ cd IMAGE; make;}

gfx :
	{ cd SEQGFX; make;}

seq.graph : seq.graph.o ${GFXDIR}/libSeqGfx.a ${IMGDIR}/libImage.a ${GDDIR}/libgd.a
	${CC} ${CFLAGS} seq.graph.o \
	 -L${GDDIR} -L${IMGDIR} -L${GFXDIR} -lSeqGfx -lImage -lgd -lm \
	-o seq.graph 

seq.graph.o : seq.graph.cc const.h
	${CC} ${CFLAGS} -c -I.  -I${GFXDIR} -I${IMGDIR} -I${GDDIR} seq.graph.cc


#clean: 	cleangd 	cleanim 	cleanseq
clean: 		cleanim 	cleanseq
	rm -rf  seq.graph.o;


cleangd:
	{ cd gd1.2; make clean ; }
cleanim:
	{ cd IMAGE; make clean ; }
cleanseq:
	{ cd SEQGFX; make clean ; }

