####################################################################
#   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 = @exec_prefix@
libdir      = @libdir@

VPATH       = .:${srcdir}

INCLUDEDIR  = ${top_srcdir}/src/include

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

CC =  @CC@

RANLIB = @RANLIB@

LIB = libbasic.a

OBJS = makebfnd.o makellnd.o makesymb.o makeblob.o makelist.o \
       maketype.o makelabel.o makehash.o readnodes.o writenodes.o

AR      = ar
ARFLAGS = ru

.SUFFIXES:
.SUFFIXES: .o .c 

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

all: Makefile $(LIB)

Makefile: ${srcdir}/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
#

makebfnd.o : Makefile makebfnd.c $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
makellnd.o : Makefile makellnd.c $(INCLUDEDIR)/tags.h $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
makesymb.o : Makefile makesymb.c $(INCLUDEDIR)/tags.h $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
makeblob.o : Makefile makeblob.c $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
makelist.o : Makefile makelist.c $(INCLUDEDIR)/tags.h $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
maketype.o : Makefile maketype.c $(INCLUDEDIR)/tags.h $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
makelabel.o : Makefile makelabel.c $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
makehash.o : Makefile makehash.c $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/makenodes.h
readnodes.o : Makefile readnodes.c $(INCLUDEDIR)/tags.h $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/dep.h $(INCLUDEDIR)/dep_struct.h
writenodes.o : Makefile writenodes.c $(INCLUDEDIR)/tags.h $(INCLUDEDIR)/bif.h $(INCLUDEDIR)/ll.h \
	$(INCLUDEDIR)/symb.h $(INCLUDEDIR)/typedef.h $(INCLUDEDIR)/dep.h $(INCLUDEDIR)/dep_struct.h 













