###############################################################
# Makefile for SQUID library
# CVS $Id: Makefile,v 3.1 2006/03/07 19:40:30 yzizhen Exp $
#
# Note: The autoconf variables in this file must be coordinated
#       with HMMER. HMMER creates a Makefile from this 
#       Makefile.in using its own configure script, not SQUID's.
#################################################################
#    This copyrighted source code is freely distributed 
#    under the terms of the GNU General Public License. See
#    the files COPYRIGHT and LICENSE for details.
#################################################################


### Installation points
###
prefix      = /usr/local
exec_prefix = ${prefix}
BINDIR      = ${exec_prefix}/bin
MANDIR      = ${prefix}/man
INCLUDEDIR  = ${prefix}/include
LIBDIR      = ${exec_prefix}/lib
SCRIPTDIR   = ${exec_prefix}/bin

## your compiler and compiler flags
#
CC     = gcc
CFLAGS = -g -O2

## other defined flags for machine-specific stuff 
#
MDEFS =  -DHAVE_CONFIG_H
LIBS  =  -lm

## Archiver command
#
AR     = ar rcv
RANLIB = ranlib

## instructions for installing man pages
#
INSTMAN   = cp
MANSUFFIX = 1


VIENNASRCS= edit_cost.c dist_vars.c utils.c treedist.c fold.c fold_vars.c part_func.c energy_par.c read_epars.c
VIENNAOBJS= edit_cost.o dist_vars.o utils.o treedist.o fold.o fold_vars.o part_func.o energy_par.o read_epars.o
VIENNAHDRS= edit_cost.h dist_vars.h utils.h treedist.h fold.h fold_vars.h part_func.h pair_mat.h intloops.h energy_const.h energy_par.h

################################################################
# Targets that actually build the squid executables

all: libvienna.a
.c.o:
	$(CC) $(CFLAGS) $(MDEFS) -c $<		
################################################################


################################################################
# Targets expected by packages (e.g. HMMER) that
# include SQUID as a module. 
#
module: libvienna.a

libvienna.a: $(VIENNAOBJS)
	$(AR) libvienna.a $(VIENNAOBJS)
	$(RANLIB) libvienna.a
	chmod 644 libvienna.a

clean:
	-rm -f core.* *.o *~  
