#######################################################################
#
# This makefile is now used to make both the flat file (suffix "FF")
# and pubstruct (suffix "PS") production versions of vastsrv. The
# previous version (6.24) was used only for building the flat file version.
#
# Historical comments that are no longer relevant have been removed.
#
#######################################################################
#
# $Log: make.vastsrv,v $
# Revision 6.12  2000/06/23 22:35:57  lewisg
# get rid of hardcoded urls
#
# Revision 6.11  1999/07/26 14:30:31  zimmerma
# Reorganized lines dealing with debug vs production build
#
# Revision 6.10  1999/06/11 19:38:00  zimmerma
# new make for both binaries - file & pubstruct retrieval
#
# 
#######################################################################

# Define sybase libs before ncbi.mk to allow them to be overridden:
NCBI_SYBLIBS_CT = -L$(NCBI_SYBASE)/lib -lblk -lct -lcs -ltcl -lcomn -lintl

include $(NCBI)/ncbi.mk
CC = $(NCBI_CC)
CFLAGS1 = -c
OTHERLIBS = -lm
INCPATH = $(NCBI_INCDIR)

#development mode
# OPTFLAG = -g
# LIBPATH = $(NCBI_ALTLIB)

#production mode
OPTFLAG = $(NCBI_OPTFLAG)
LIBPATH = $(NCBI_LIBDIR)

SHARED_SRC = vastsrv.c vastlocl.c vast2mage.c vast2pdb.c vast2cn3d.c vastsubs.c \
	     vastchkid.c mkbioseq_vs.c mkbioseqA.c mkbioseqB.c

SRC_FF = $(SHARED_SRC) mmdbFF.c
SRC_PS = $(SHARED_SRC) mmdb_pubstruct.c PubStructAsn.c

CFLAGS = $(CFLAGS1) $(OPTFLAG) -I$(INCPATH)
LDFLAGS = -I$(INCPATH) $(OPTFLAG) -L../lib -L$(LIBPATH)

LIB1 = -lncbi
LIB2 = -lncbiobj
LIB3 = -lncbicdr
LIB6 = -lnetcli
LIB7 = -lnetentr
LIB8 = -lncbiNacc
LIB22 = -lncbimmdb
LIB28 = -lncbimsc1
LIB29 = -lncbiwww

## if need a .o, compile the .c

.c.o :
	$(CC) $(CFLAGS) $<

## make individual applications and components
##$

vastsrv.FF : $(SRC_FF)
	$(CC) -o $@ -I./ $(LDFLAGS) $(SRC_FF)  \
        $(LIB29) $(LIB22) $(LIB8) $(LIB7) $(LIB6) $(LIB3) $(LIB2) $(LIB1) \
        $(LIB28) $(NCBI_OTHERLIBS)

vastsrv.PS : $(SRC_PS)
	$(CC) -o $@ -I./ $(LDFLAGS) $(NCBI_SYBFLAG) $(SRC_PS) -lnlmzip -lctutils $(NCBI_SYBLIBS_CT) \
        $(LIB29) $(LIB22) $(LIB8) $(LIB7) $(LIB6) $(LIB3) $(LIB2) $(LIB1) \
        $(LIB28) $(NCBI_OTHERLIBS)
