############################################################
# Makefile for HMMER src directory
# CVS $Id: Makefile.in,v 1.19 2003/06/13 20:05:31 eddy Exp $
###########
# HMMER - Biological sequence analysis with profile HMMs
# Copyright (C) 1992-2003 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.
###########

## your compiler and compiler flags
#
CC       = icc
CFLAGS   = -O3 -axMKW -static
CPPFLAGS = 
LDFLAGS  = 
DEFS     = -DHAVE_CONFIG_H
LIBS     =  -lm

## archiving command, and ranlib command if you need one.
#  In general, you shouldn't need to change these, and they're
#  only used for building the testsuite anyway... e.g. we
#  make a "libhmmer.a" library for building the testsuite.
#
AR     = /usr/bin/ar rcv 
RANLIB = ranlib

# Configuration for optional pthreads multiprocessor support
#
PTHREAD_LIBS   = 
PTHREAD_CFLAGS = -pthread


# Configuration for optional PVM functionality
#
PVMLIBDIR = -L/usr/seshare/Linux/pvm3/lib/LINUX
PVMINCDIR = -I/usr/seshare/Linux/pvm3/include
PVMLIBS   = -lpvm3
PVMPROGS  = hmmcalibrate-pvm hmmpfam-pvm hmmsearch-pvm

SHELL    = /bin/sh
MYLIBS   = -lsquid
MYLIBDIR = -L../squid
MYINCDIR = -I../squid

PROGS = hmmalign\
	hmmbuild\
	hmmcalibrate\
	hmmconvert\
	hmmemit\
	hmmfetch\
	hmmindex\
	hmmpfam\
	hmmsearch\
	${PVMPROGS}

OBJS =  alphabet.o\
	core_algorithms.o\
	debug.o\
	display.o\
	emit.o\
	emulation.o\
	fast_algorithms.o\
	histogram.o\
	hmmio.o\
	mathsupport.o\
        masks.o\
	misc.o\
	modelmakers.o\
	plan7.o\
	plan9.o\
	postprob.o\
	prior.o\
	pvm.o\
	threads.o\
	tophits.o\
	trace.o 

HDRS =  config.h\
	funcs.h\
	globals.h\
	postprob.h\
	structs.h

.c.o:
	${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} ${PTHREAD_CFLAGS} ${MYINCDIR} ${PVMINCDIR} -c $<

#################################################################
## Targets defining how to make HMMER executables.
##
all: 	$(PROGS) 

${PROGS}: %: %.o ${OBJS} 
	${CC} ${CFLAGS} ${PTHREAD_CFLAGS} ${DEFS} ${LDFLAGS} ${MYLIBDIR} ${PVMLIBDIR} -o $@ $@.o ${OBJS} ${PVMLIBS} ${MYLIBS} ${PTHREAD_LIBS} ${LIBS}


#################################################################
## Targets used in making HMMER module for testsuite compilation.
##
module: libhmmer.a

libhmmer.a: $(OBJS) 
	$(AR) libhmmer.a $(OBJS) 
	$(RANLIB) libhmmer.a
	chmod 644 libhmmer.a


#################################################################
## Miscellaneous targets.
##
distclean:
	make clean
	-rm -f Makefile 

clean:
	-rm -f *.o *~ Makefile.bak core $(PROGS) TAGS gmon.out libhmmer.a

binclean:
	-rm -f *.o *~ Makefile.bak core TAGS gmon.out libhmmer.a

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

