########################################################################
# - Compile ProtASR -
########################################################################
# Makefile CodABC
# 	Compile: make all
# 	Clean: make clean
#
PROGRAM_NAME = CodABC


help:
	@echo ""
	@echo "To use the $(PROGRAM_NAME) Makefile, type"
	@echo "     make all           to compile the whole package"
	@echo "                          or remove the object files"
	@echo "     make clean         to remove all object files and executables from the"
	@echo "                          current directory"
	@echo " "


all: 
	@echo "Compiling Prot_evol .."
	$(MAKE) -C Prot_evol_src clean
	$(MAKE) -C Prot_evol_src all
	@cd Prot_evol_src && cp Prot_evol .. && cd ../..;
	@echo "Done!"
	@echo ""
	@echo "Compiling codeml (PAML) .."
	$(MAKE) -C PAML_src
	@cd PAML_src && cp codeml .. && cd ../..;
	@echo "Done!"
	@echo ""

clean:
	@echo "Removing executables .."
	$(MAKE) -C Prot_evol_src clean
	@rm -f Prot_evol
	@rm -f *.in
	@echo "Done!"
	@cd PAML_src && mv codeml .. && cd ../..;
	@rm -f codeml
	@rm -f *.dat
	@echo "Done!"
	@rm -f GenerateGlobalMatrices.pl
	@rm -f MatricesFile_FromProtEvol_to_PAML.pl
	@rm -f NexusToNexus_localAln.pl
	@rm -f NexusToTree_MA.pl
	@rm -f MakeSimpleMeanMatrix.pl
	@rm -f NexusToFasta_MA.pl
	@rm -f NexusToPhylip_MA.pl
	@rm -f RemoveFirstLine.pl
	@rm -f NormalizeFrequencies.pl
	@rm -f structures.in
	@echo "Done!"
	
