####################################################################
#   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                                   #   
####################################################################

#
#

SHELL       = /bin/sh

VERSION     = @VERSION@

srcdir      = @srcdir@
top_srcdir  = @top_srcdir@

prefix      = @prefix@
exec_prefix = @exec_prefix@

bindir      = @bindir@
libdir      = @libdir@

config_dir  = ../include

VPATH       = .:${srcdir}

INCLUDEDIR  = ${top_srcdir}/src/include

CFLAGS   = -g -DHAVE_CONFIG_H -I. -I${srcdir} -I$(config_dir) -I$(INCLUDEDIR)
CXXFLAGS = -g -I$(INCLUDEDIR)

CC  = @CC@
CXX = @CXX@

RANLIB = @RANLIB@

LIB = libxsage.a

OBJS = make_nodes.o db.o dbutils.o low_level.o \
       fromsage++.o attribute.o baseClasses.o sgCallGraph.o sgClassHierarchy.o \
       finline.o

ULIBS = -lbasic
LIBDIR = ../basicop

AR      = ar
ARFLAGS = ru

.SUFFIXES:
.SUFFIXES: .o .c .C

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

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

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

$(LIB): $(OBJS)
	$(AR) $(ARFLAGS) $(LIB) $(OBJS)
	if test ${RANLIB} != ':' ; then ${RANLIB} $(LIB) ; fi

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

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

uninstall:
	rm -f ${libdir}/$(LIB)

############
# file dependence information
# there must be more...
############

finline.o: fromsage++.h
fromsage++.o: fromsage++.h
attribute.o: fromsage++.h
baseClasses.o: fromsage++.h
sgCallGraph.o: fromsage++.h
sgClassHierarchy.o: fromsage++.h 











