install: ancescon
install: simulation
install: specificity
#
# must have ansi compiler if not
# gcc then substitute something else
#
#
CC=g++ 

#MPICC=mpicxx
#MPICC=mpiCC


#
# Set flags to be given to the complier. Currently set to optimize
#

#CFLAGS= $(VERSION_FLAGS)
#CFLAGS=-O4 -ansi -DMENUIO $(VERSION_FLAGS)

CFLAGS=-O4 -ansi $(VERSION_FLAGS) -Wno-deprecated
#CFLAGS=-pg -ansi $(VERSION_FLAGS)
#
#Uncomment for debugging information
#
#CFLAGS=-g -ansi -DDEBUG $(VERSION_FLAGS)
#

WOBJS = tree.o matrix.o io.o build.o noise.o calcq.o calcb.o calcz.o calerf.o weighbor1.o matrixalgebra.o damoeba.o damotry.o damebsa.o damotsa.o ran1.o dpowell.o dbrent1.o dbrent.o dlinmin.o drtflsp.o drtbis.o df1dim.o dfrprmn.o dmnbrak.o pseudo.o gammln.o gammq.o gcf.o  gser.o

ancescon: ancescon.o $(WOBJS) $(NUMOBJS) 
	$(CC) $(CFLAGS) -o  ancescon ancescon.o $(WOBJS) $(NUMOBJS) -lm


clean: 
	rm -rf *.o core *~ *.dvi *.log *.toc *.bak *.ps Doc/*~

spotless:	
	rm -rf *.o core *~ *.dvi *.log *.toc *.bak *.ps
	rm -rf weighbor weighbor.out Doc/*~

# DO NOT DELETE

build.o: tree.h matrix.h weighbor.h
calcb.o: tree.h matrix.h weighbor.h
calcq.o: tree.h matrix.h weighbor.h
calcz.o: tree.h matrix.h weighbor.h
io.o: matrix.h
matrix.o: matrix.h
noise.o: weighbor.h matrix.h tree.h
tree.o: tree.h matrix.h
weighbor.o: tree.h matrix.h io.h weighbor.h


simulation: mutation_likelihood_mpi_shuffle.c  tree.o matrix.o io.o build.o noise.o calcq.o calcb.o calcz.o calerf.o weighbor1.o matrixalgebra.o ran1.o dbrent1.o  rtbis.o pseudo.o 
	$(MPICC) -Wno-deprecated -o simulation mutation_likelihood_mpi_shuffle.c tree.o matrix.o io.o build.o noise.o calcq.o calcb.o calcz.o calerf.o weighbor1.o matrixalgebra.o ran1.o dbrent1.o  rtbis.o pseudo.o -lm

specificity: stat_sign1.c fit.o nrutil.o gammq.o gser.o gcf.o gammln.o
	g++ -o specificity stat_sign1.c fit.o nrutil.o gammq.o gser.o gcf.o gammln.o -lm

install:
	cp specificity simulation ancescon ../bin
