RM := rm -rf

#this is really nothing but for testing the capabilities of the copper library
MRCA_SRC = main.cpp
MRCA_OBJ = main.o
MRCA_DEP = main.d

#this should be the basic copper library sources, objects and deps
CPP_SRCS += \
./utils.cpp \
./node.cpp \
./tree.cpp \
./tree_reader.cpp \
./tree_utils.cpp \
./sequence.cpp \
./fasta_util.cpp \
./superdouble.cpp

CPP_OBJS += \
./utils.o \
./node.o \
./tree.o \
./tree_reader.o \
./tree_utils.o \
./sequence.o \
./fasta_util.o \
./superdouble.o


CPP_DEPS += \
./utils.d \
./node.d \
./tree.d \
./tree_reader.d \
./tree_utils.d \
./sequence.d \
./fasta_util.d \
./superdouble.d


CPP_LIBS = -llapack -lblas -lgfortran -lpthread -lm 
#gsl
#-lgsl -lgslcblas 
#profileing
#-pg

OPT_FLAGS = -O3 -ffast-math -ftree-vectorize
#profiling 
#-g -pg
#-O3 -ffast-math -ftree-vectorize 

# Each subdirectory must supply rules for building sources it contributes
%.o: ./%.cpp
	g++ $(OPT_FLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o  "$@" "$<"

# All Target
all: phyx_test

phyx_test: $(CPP_OBJS) $(MRCA_OBJ) 
	@echo 'Building target: $@'
	@echo 'Invoking: GCC C++ Linker'
	g++ -o "phyx_test" $(MRCA_OBJ) $(CPP_OBJS) $(CPP_LIBS)
	@echo ' '

# Other Targets
clean:
	-$(RM) *.o *.d phyx_test
	-@echo ' '

