####################################################################
#   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       = /bin/sh

VERSION     = @VERSION@

srcdir      = @srcdir@
top_srcdir  = @top_srcdir@

config_dir  = ../include

prefix      = @prefix@

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

VPATH       = .:${srcdir}

INCLUDEDIR  = ${top_srcdir}/src/include

CFLAGS   = @CFLAGS@ -DHAVE_CONFIG_H -I. -I${srcdir} -I$(config_dir) -I$(INCLUDEDIR)
CXXFLAGS = @CXXFLAGS@ -I../xsageop -I$(INCLUDEDIR)

CC  = @CC@
CXX = @CXX@

PROGRAM =transBD 
#hfmain

LIBS = -lxsage -lbasic
LIBDIR = -L../xsageop -L../basicop

TOBJ =trans.o  assign.o  where.o basic_fun.o  
.SUFFIXES:
.SUFFIXES: .o .c .C

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

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

all: Makefile $(PROGRAM)

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

$(PROGRAM): $(LIB) $(TOBJ) ../xsageop/libxsage.a
	$(CXX) -g -o $@ $(TOBJ) $(LIBDIR) $(LIBS)

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

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

############
# file dependence information
############
trans.o : 	global_var.h  basic_fun.h
assign.o:	global_var.h  basic_fun.h
where.o:	global_var.h    basic_fun.h
basic_fun.o:	global_var.h	 basic_fun.h
