####################################################################
#   Copyright (c) 1996 NPACT Working Group. You may copy,          #
#   distribute, and modify it freely as long as you preserve this  #
#   copyright and permission notice.                               #
#                                                                  #
#   NPACT Working Group is a joint force of                        #
#      NPAC at Syracuse University,                                #
#      PACT at Harbin Institute of Technology, and                 #
#      PACT at Peking University                                   #   
####################################################################

#
#  Makefile for Basic lib 
#

SHELL       = @CONFIGSHELL@

VERSION     = @VERSION@

srcdir      = @srcdir@
top_srcdir  = @top_srcdir@

config_dir  = ../include

prefix      = @prefix@

exec_prefix = ${prefix}
bindir      = ${exec_prefix}/bin

htmldir	    = $(HOME)/index

VPATH       = .:${srcdir}

INCLUDEDIR  = ${top_srcdir}/src/include

CFLAGS   = @CFLAGS@ @DEFS@ -I. -I${srcdir} -I$(config_dir) -I$(INCLUDEDIR)
CXXFLAGS = @CXXFLAGS@ @DEFS@ -I. -I${srcdir} -I$(config_dir) -I$(INCLUDEDIR)

CC  = @CC@
CXX = @CXX@

LIB=../xsageop/libxsage.a ../basicop/libbasic.a
LIBS = -lxsage -lbasic 
LIBDIR = -L../xsageop -L../basicop

PROGRAM = trans1

OBJS = trans1.o combine.o info.o align2dummy.o collapseAlign.o 	\
	coefficient.o dist2whole.o alignroot.o func_hedr.o  	\
	allocate.o standardPrint.o

.SUFFIXES:
.SUFFIXES: .o .c .cc

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

.cc.o:
	$(CXX) -c $(CXXFLAGS) $<


all: Makefile $(PROGRAM)

Makefile: Makefile.in
	@echo 
	@echo Please configure the package to generate new makefile ...
	@exit 1

clean:
	rm -f *.o core $(PROGRAM)

$(PROGRAM): $(LIB) $(OBJS)
	$(CXX) -g -o $@ $(OBJS) $(LIBDIR) $(LIBS)

install: $(PROGRAM)
	if [ ! -d ${bindir} ] ; then mkdir ${bindir} ; fi
	cp $(PROGRAM) ${bindir}

uninstall:
	rm -f ${bindir}/$(PROGRAM)


############
# file dependence information
############

trans1.o: trans1.cc  pass.h ext_func.h ../include/fromsagexx.h ../include/strategy.h
combine.o: combine.cc  pass.h ext_func.h ../include/fromsagexx.h
info.o : info.cc pass.h ext_func.h ../include/fromsagexx.h 
align2dummy.o: align2dummy.cc  pass.h ext_func.h ../include/fromsagexx.h
collapseAlign.o: collapseAlign.cc  pass.h ext_func.h ../include/fromsagexx.h
coefficient.o : coefficient.cc pass.h ext_func.h ../include/fromsagexx.h 
dist2whole.o : dist2whole.cc pass.h ext_func.h ../include/fromsagexx.h 
alignroot.o : alignroot.cc pass.h ext_func.h ../include/fromsagexx.h  ../include/strategy.h
func_hedr.o : func_hedr.cc pass.h ext_func.h ../include/fromsagexx.h 
allocate.o:  allocate.cc pass.h ext_func.h ../include/fromsagexx.h
standardPrint.o:  standardPrint.cc pass.h ext_func.h ../include/fromsagexx.h

html: $(htmldir)/trans1/index.html

$(htmldir)/trans1/index.html: pass.h
	doc++ -d $(htmldir)/trans1 pass.h
