#
# Makefile for Generic UNIX
#
# CAUTION:  Make changes to Makefile (not makefile), then run
# "make -f Makefile depend" before running "make all".
#
RANLIB = ../gish/bin/ranlib
INCLUDES = -I../include -I../blast -I../gish/include -I../ncbi/include
CFLAGS = ${CCOPT} $(INCLUDES) ${OPTIONS}
MKDEPFLAG = -M
# Solaris is different
#MKDEPFLAG = -xM

SRC = sump.c weights.c codonfq.c \
	banner.c busage.c parsearg.c defaults.c context.c getquery.c queryack.c \
	ckalloc.c ckopen.c bfatal.c warning.c \
	initdb.c dbase.c blastdb.c header.c collate.c \
	prt_hsps.c prt_hdr.c stats.c \
	ckqtype.c lambdak.c signals.c hist.c \
	sort.c gcode.c maxscore.c revcomp.c \
	hspprint.c printp.c printn.c printx.c printt.c printtx.c \
	runwild.c process.c \
	fasta.c mfasta.c getseq.c filter.c translat.c \
	stkprint.c bsrv.c dbinfo.c asnout1.c asnout2.c asnin1.c asnin2.c \
	asncin1.c asncin2.c asncout2.c

OBJ = sump.o weights.o codonfq.o \
	banner.o busage.o parsearg.o defaults.o context.o getquery.o queryack.o \
	ckalloc.o ckopen.o bfatal.o warning.o \
	initdb.o dbase.o blastdb.o header.o collate.o \
	prt_hsps.o prt_hdr.o stats.o \
	ckqtype.o lambdak.o signals.o hist.o \
	sort.o gcode.o maxscore.o revcomp.o \
	hspprint.o printp.o printn.o printx.o printt.o printtx.o \
	runwild.o process.o \
	fasta.o mfasta.o getseq.o filter.o translat.o \
	stkprint.o bsrv.o dbinfo.o asnout1.o asnout2.o asnin1.o asnin2.o \
	asncin1.o asncin2.o asncout2.o

all:	$(OBJ) libapp.a

clean:
	@- rm -f libapp.a
	@- rm -f $(OBJ)
	@- rm -f makefile makefile.old

depend:
	- mv -f  makefile makefile.old
	@ sed -n -e '1,/[D]O NOT MAKE ANY CHANGES/p' Makefile > makefile
	@ echo "" >> makefile
	@ $(CC) ${CCOPT} $(INCLUDES) ${OPTIONS} ${MKDEPFLAG} $(SRC) >> makefile

libapp.a: $(OBJ)
	ar cru $@ $(OBJ)
	$(RANLIB) $@

#DO NOT MAKE ANY CHANGES ON OR BELOW THIS LINE
