LINK:=		${CXXFLAGS}		
CXXFLAGS+=	-g -O2 -w -c -fmessage-length=0 -frounding-math -MMD -MP 
BINDIR=		../../bin
CC=		g++
CPP=		g++
INCLUDES=	-I./
LIBPATH=	#${LD_LIBRARY_PATH}# -LCGAL/lib
LIBRARY=	-lm


PROG=isolassocem

outprog=$(addprefix ${BINDIR}/,${PROG})

.PHONY: all clean all-recur


all: all-recur ${outprog}

all-recur: 

#all-recur:
#		@target=`echo $@ | sed s/-recur//`; \
#		wdir=`pwd`; \
#		list='$(SUBDIRS)'; for subdir in $$list; do \
#			cd $$subdir; \
#			$(MAKE); \
#			cd $$wdir; \
#		done;

.SUFFIXES: .cpp .o

.cpp.o:
	${CC}  ${CXXFLAGS}  -MF"$(patsubst %.o,%.d,$@)" -MT"$(patsubst %.o,%.d,$@)" -o $@ ${INCLUDES} $< 

${BINDIR}/isolassocem: NewInstance.o lassoinvoke.o library.o mathlib.o predExpLevel.o emfunction.o
	g++  ${LINK} -o $@  ${LIBPATH} ${LIBRARY} $^ 


#NewInstance.o: NewInstance.cpp NewInstance.h
#	g++ -O3 -w -c -fmessage-length=0 -MMD -MP -MF"NewInstance.d" -MT"NewInstance.d" -o NewInstance.o "NewInstance.cpp"
#lassoinvoke.o: lassoinvoke.cpp
#	g++ -O3 -w -c -fmessage-length=0 -MMD -MP -MF"lassoinvoke.d" -MT"lassoinvoke.d" -o lassoinvoke.o "lassoinvoke.cpp"
#library.o: library.cpp library.h
#	g++ -O3 -w -c -fmessage-length=0 -MMD -MP -MF"library.d" -MT"library.d" -o library.o "library.cpp"
#mathlib.o: mathlib.cpp mathlib.h
#	g++ -O3 -w -c ${INCLUDES} -frounding-math -fmessage-length=0 -MMD -MP -MF"mathlib.d" -MT"mathlib.d" -o mathlib.o "mathlib.cpp"
#predExpLevel.o: predExpLevel.cpp predExpLevel.h
#	g++ -O3 -w -c -fmessage-length=0 -MMD -MP -MF"predExpLevel.d" -MT"predExpLevel.d" -o predExpLevel.o "predExpLevel.cpp"


clean:
	rm -rf *.o ${outprog}
