## your compiler
CC = /usr/bin/g++	# GNU cc, if you have it...
#CC = cc	# ... otherwise, use your vendor's cc


## any special compiler flags you want
CFLAGS = -O2    # most machines

MOTIFLENGTH = SHORT_MOTIFS

#uncomment the line below to allow the search for larger motifs
#MOTIFLENGTH = LONG_MOTIFS



#######
## should not need to modify below this line
#######
LIBS   = -lm

PROGS = FootPrinter compute_branch_lengths fitch make_matrix


SRC = merging.cc printPS.cc printHTML2.cc tree_util.cc FootPrinter.cc   binary.cc  motif.cc  neighborhood.cc parameters.cc compresshtml.cc MyAlloc.cc filtering.cc my_system.cc 
SRCFITCH = fitch.c 

OBJ = merging.o compresshtml.o printPS.o printHTML2.o tree_util.o FootPrinter.o   binary.o  motif.o  neighborhood.o parameters.o MyAlloc.o filtering.o my_system.o
OBJFITCH = fitch.o
OBJMAKEMATRIX = make_matrix.o

SRC_BRANCH_LENGTHS = compute_branch_lengths.cc parameters.cc tree_util.cc binary.cc printPS.cc my_system.cc
OBJ_BRANCH_LENGTHS = compute_branch_lengths.o parameters.o tree_util.o binary.o printPS.o my_system.o

OPTIONS = -D$(MOTIFLENGTH) #-DWINDOWS #-DWEB 

.cc.o:
	$(CC) $(CFLAGS)  -I. $(OPTIONS) -c $<		

.c.o:
	$(CC) $(CFLAGS)  -I.  $(OPTIONS) -c $<		


all: 	$(PROGS)

FootPrinter: $(OBJ) 
	$(CC) $(OPTIONS) $(CFLAGS)   -o FootPrinter  $(OBJ) $(LIBS)

compute_branch_lengths: $(OBJ_BRANCH_LENGTHS) 
	$(CC) $(OPTIONS) $(CFLAGS)   -o compute_branch_lengths  $(OBJ_BRANCH_LENGTHS) $(LIBS)

fitch: $(OBJFITCH) 
	$(CC) $(OPTIONS) $(CFLAGS)   -o fitch  $(OBJFITCH) $(LIBS)

make_matrix: $(OBJMAKEMATRIX) 
	$(CC) $(OPTIONS) $(CFLAGS)   -o make_matrix  make_matrix.o $(LIBS)
