INC_FLAG = -IIndex -IDomain -IMathFunction -INumbers
GCCFLAG = -c -Wall -Wno-deprecated -g3 
#CC = g++-3.4
CC = g++

OBJS_01 = Rational.o Integer.o IndexedMatrix.o BezierIndex.o MultiIndexLinearEquation.o MultiIdx.o SimplexPoint.o SimploidPoint.o  MatrixIdx.o AffineTransformation.o TensorPoint.o  HyperIdx.o


clean:
	rm -rf *.o exec
	
all: Bernstein.o

	
#conversionV2: Rational.o conversionV2.o  Bernstein.o 
#	$(CC) -g -o exec conversionV2.o $(OBJS_01) Bernstein.o $(INC)
	
#conversionV2.o: Rational.o
#	$(CC) $(GCCFLAG) conversionV2.cpp $(INC)
	
MultiIdx.o: BezierIndex.o Integer.o
	$(CC) $(GCCFLAG) Index/MultiIdx.cpp $(INC)

SimplexPoint.o: MultiIdx.o
	$(CC) $(GCCFLAG) Domain/SimplexPoint.cpp $(INC) 

SimploidPoint.o: SimplexPoint.o
	$(CC) $(GCCFLAG) Domain/SimploidPoint.cpp $(INC)

MatrixIdx.o: MultiIdx.o
	$(CC) $(GCCFLAG) Index/MatrixIdx.cpp $(INC) 

HyperIdx.o: MultiIdx.o BezierIndex.o
	$(CC) $(GCCFLAG) Index/HyperIdx.cpp $(INC)

AffineTransformation.o: SimplexPoint.o MatrixIdx.o
	$(CC) $(GCCFLAG) Domain/AffineTransformation.cpp $(INC)
	
TensorPoint.o:	SimplexPoint.o SimploidPoint.o
	$(CC) $(GCCFLAG) Domain/TensorPoint.cpp  $(INC)
	
MultiIndexLinearEquation.o: MultiIdx.o BezierIndex.o
	$(CC) $(GCCFLAG) MathFunction/MultiIndexLinearEquation.cpp $(INC) 
	
Bernstein.o: $(OBJS_01)
	$(CC) $(GCCFLAG) MathFunction/Bernstein.cpp $(INC)
	
BezierIndex.o:
	$(CC) $(GCCFLAG) Index/BezierIndex.cpp $(INC)
	
IndexedMatrix.o: BezierIndex.o
	$(CC) $(GCCFLAG) Index/IndexedMatrix.cpp $(INC) 

Integer.o: 
	$(CC) $(GCCFLAG) Numbers/Integer.cpp $(INC)
	
Rational.o: 
	$(CC) $(GCCFLAG) Numbers/Rational.cpp $(INC)