# Generated automatically from Makefile.in by configure.
###############################################################
# Makefile for SQUID library
# CVS $Id: Makefile.in,v 1.25 2001/08/05 20:44:30 eddy Exp $
#
# Note: The autoconf variables in this file must be coordinated
#       with HMMER, if you change them, because HMMER will 
#       create a Makefile from this Makefile.in using its own
#       configure script, not SQUID's.
#
###########
# HMMER - Biological sequence analysis with profile HMMs
# Copyright (C) 1992-1999 Washington University School of Medicine
# All Rights Reserved
# 
#     This source code is distributed under the terms of the
#     GNU General Public License. See the files COPYING and LICENSE
#     for details.
###########

### Installation points
###
# For simple installations, just make sure ${prefix} is set correctly:
# default is /usr/local.
#
# For heterogenous computing environments, also
# set ${exec_prefix}, which gives you some flexibility 
# for installing architecture dependent files (e.g. the programs).
#
# It's less likely that you'll need to set the individual
# variables BINDIR, MANDIR, etc., but they're there if you need 'em.
#
# The (simple) default configuration installs as follows:
#    prefix = /usr/local     
#         executables in   /usr/local/bin
#         man pages in     /usr/local/man/man1
#         header files in  /usr/local/include
#         libsquid.a in    /usr/local/lib
#         scripts in       /usr/local/bin
#
# The St. Louis configuration, an example of a heterogenous 
# computing environment, installs by setting:
#    prefix      = /usr/seshare/
#    exec_prefix = /usr/seshare/`uname`
#
# on a Linux platform, for instance, this results in:
#         executables in   /usr/seshare/Linux/bin
#         man pages in     /usr/seshare/man
#         header files in  /usr/seshare/include
#         libsquid.a in    /usr/seshare/Linux/lib
#         scripts in       /usr/seshare/Linux/bin
#         
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     = cc
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

# Configuration for compiling in optional PVM support
#
PVMFLAG   = 
PVMLIBDIR = 
PVMINCDIR = 
PVMLIBS   = 

#######
## You should not need to modify below this line
#######
SHELL       = /bin/sh
BASENAME    = "squid"
PACKAGE     = "SQUID"
RELEASE     = "1.7"
RELCODE     = "rel1_7"
RELEASEDATE = "July 2000"
COPYRIGHT   = "Copyright \(C\) 1992-2000 HHMI/Washington University School of Medicine"
LICENSE     = "Freely distributed under the GNU General Public License \(GPL\)"
LICENSETAG  = gnu
COMPRESS    = gzip

PROGS =	afetch\
	alistat\
	compalign\
	compstruct\
	sfetch\
	sreformat\
	revcomp\
	seqsplit\
	seqstat\
	shuffle\
	sindex\
	translate\
	weight

MANS =  alistat\
	seqstat\
	sfetch\
	shuffle\
	sreformat\

READMES = 00README INSTALL Makefile.in 

SCRIPTS = 

PRECONFHDRS = \
	squid.h.in\
	squidconf.h.in

POSTCONFHDRS = \
	squid.h\
	squidconf.h\
	version.h

HDRS =	rk.h\
	sqfuncs.h\
	gki.h\
	gsi.h\
	msa.h\
	ssi.h\
	stopwatch.h

OBJS =	a2m.o\
	aligneval.o\
	alignio.o\
	clustal.o\
	cluster.o\
	dayhoff.o\
	eps.o\
	file.o\
	getopt.o\
	gki.o\
	gsi.o\
	hsregex.o\
	iupac.o\
	msa.o\
	msf.o\
	phylip.o\
	revcomp.o\
	rk.o\
	selex.o\
	seqencode.o\
	shuffle.o\
	sqerror.o\
	sqio.o\
	squidcore.o\
	sre_ctype.o\
	sre_math.o\
	sre_string.o\
	ssi.o\
	stack.o\
	stockholm.o\
	stopwatch.o\
	translate.o\
	types.o\
	weight.o

################################################################
# Targets that actually build the squid executables
all: version.h $(PROGS) 

$(PROGS): %: %_main.o version.h $(OBJS) 
	$(CC) $(CFLAGS) $(MDEFS) $(PVMLIBDIR) -o $@ $@_main.o $(OBJS) $(PVMLIBS) $(LIBS)

.c.o:
	$(CC) $(CFLAGS) $(PVMFLAG) $(PVMINCDIR) $(MDEFS) -c $<		
################################################################


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

libsquid.a: version.h $(OBJS)
	$(AR) libsquid.a $(OBJS)
	$(RANLIB) libsquid.a
	chmod 644 libsquid.a
#################################################################


# version.h: 
#   create the version.h file that will define stamps used by 
#   squidcore.c's Banner(), which is called by all executables to
#   print a standard package/copyright/license banner;
#   then puts copies of version.h in all directories that are 
#   going to need it.
#
version.h:
	@echo "Creating version.h..."
	@echo "/* version.h -- automatically generated by a Makefile. DO NOT EDIT. */" > version.h
	@echo "#define PACKAGE     \"$(PACKAGE)\""     >> version.h
	@echo "#define RELEASE     \"$(RELEASE)\""     >> version.h
	@echo "#define RELEASEDATE \"$(RELEASEDATE)\"" >> version.h
	@echo "#define COPYRIGHT   \"$(COPYRIGHT)\""   >> version.h
	@echo "#define LICENSE     \"$(LICENSE)\""     >> version.h

install:  $(PROGS) libsquid.a
	test -d $(LIBDIR)    || mkdir -p $(LIBDIR)
	test -d $(BINDIR)    || mkdir -p $(BINDIR)
	test -d $(SCRIPTDIR) || mkdir -p $(SCRIPTDIR)
	test -d $(INCLUDEDIR)|| mkdir -p $(INCLUDEDIR)
	test -d $(MANDIR)/man$(MANSUFFIX) || mkdir -p $(MANDIR)/man$(MANSUFFIX)
	cp libsquid.a $(LIBDIR)/
	cp $(HDRS)  $(INCLUDEDIR)/
	cp $(PROGS) $(BINDIR)/
	for scriptfile in $(SCRIPTS); do\
	  cp Scripts/$$scriptfile $(SCRIPTDIR)/;\
	done
	@for manpage in $(MANS); do\
	  $(INSTMAN) $$manpage.man $(MANDIR)/man$(MANSUFFIX)/$$manpage.$(MANSUFFIX);\
	done

distclean:
	make clean
	-rm -f Makefile libsquid.a version.h config.cache config.log config.status ${POSTCONFHDRS}

clean:
	-rm -f *.o *~ core TAGS llib-lsquid.ln $(PROGS) 

# dist: build a new distribution directory in squid-$RELEASE, and make a tarball.
#       Extracts straight from the CVS repository, so you must first do
#       a "cvs commit" (it checks to be sure you do, at least for the current
#       working directory). 
dist:
# Delete old versions of the same release
#
	@if test -d ${BASENAME}-$(RELEASE);        then rm -rf ${BASENAME}-$(RELEASE);        fi
	@if test -e ${BASENAME}-$(RELEASE).tar;    then rm -f  ${BASENAME}-$(RELEASE).tar;    fi
	@if test -e ${BASENAME}-$(RELEASE).tar.Z;  then rm -f  ${BASENAME}-$(RELEASE).tar.Z;  fi
	@if test -e ${BASENAME}-$(RELEASE).tar.gz; then rm -f  ${BASENAME}-$(RELEASE).tar.gz; fi
#
# CVS tag and extract. -c: make sure we committed;
#                      -F: allow more than one "make dist" per rel
# prep: must have done "cvs commit", and CVSROOT must be set
#
	cvs tag -c -F ${BASENAME}_${RELCODE}
	cvs export -r ${BASENAME}_${RELCODE} -d ${BASENAME}-${RELEASE} ${BASENAME}
# 
# Make the configure script from configure.in
#
	(cd ${BASENAME}-${RELEASE}; autoconf)
#
# Include the appropriate license files
#
	cp Licenses/LICENSE.${LICENSETAG}     ${BASENAME}-${RELEASE}/LICENSE
	cp Licenses/COPYRIGHT.${LICENSETAG}   ${BASENAME}-${RELEASE}/COPYRIGHT
#
# Put license tags (short licenses) on files that need 'em (replace LICENSE keyword)
#
	for file in $(READMES) *.c ${HDRS} ${PRECONFHDRS}; do\
	   licenseadd.pl Licenses/$(LICENSETAG) ${BASENAME}-${RELEASE}/$$file;\
	done;
#
# Remove files/directories that aren't supposed to go out in the distro.
# Do this last, so other steps (license adding, etc.) have simple loops.
#
	-rm -rf ${BASENAME}-${RELEASE}/Licenses
	-rm -rf ${BASENAME}-${RELEASE}/Docs
	-rm ${BASENAME}-${RELEASE}/LOG
	-rm ${BASENAME}-${RELEASE}/configure.in
	-rm ${BASENAME}-${RELEASE}/test_main.c
#
# pack it up!
#
	tar cvf ${BASENAME}-${RELEASE}.tar ${BASENAME}-${RELEASE}
	${COMPRESS} ${BASENAME}-$(RELEASE).tar

TAGS:
	etags -t *.h *.c Makefile.in


