BS_DIR = .

LIBBASE  = libBS95
DIRS     = examples src

include bmake/$(PETSC_ARCH)/$(PETSC_ARCH)

LDIR = $(PDIR)

all: chkpetsc_dir
	-$(RM) -f $(PDIR)/*.a
	-@echo "Beginning to compile libraries in all directories"
	-@echo "Using $(CC) $(CFLAGS) $(BASEOPT)"
	-@echo "------------------------------------------"
	-@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \
           ACTION=libfast  tree 
	$(RANLIB) $(PDIR)/*.a
	-@echo "Completed building libraries"
	-@echo "------------------------------------------"

bslib: chkpetsc_dir
	-@if [ ! -d $(LDIR) ]; then \
          echo $(LDIR) ; mkdir -p $(LDIR) ; fi
	-$(RM) -f $(LDIR)/*.a
	-@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \
           PETSC_VERSION=$(PETSC_VERSION) ACTION=lib tree
	$(RANLIB) $(LDIR)/*.a

bsrunexamples:

TAGS_INCLUDE_FILES  = include/*.h
TAGS_EXAMPLE_FILES  = examples/*.[ch]
TAGS_SRC_FILES      = src/*.c
TAGS_DOC_FILES      = doc/manual/*.tex
CTAGS               = /usr/ucb/ctags

# Builds the tags file for emacs and vi.
#   The emacs tags are in ETAGS and the vi ones
#   end up in CTAGS.
# To use the tags file in vi do the following:
# 1. within vi invole the command - :set tags=CTAGS
#    or add  the command to your ~/.exrc file - 
#    set tags=/home/plassman/BlockSolve95/CTAGS
# 2. now to go to a tag do - :tag TAGNAME for eg - :tag MatCreate
# 
bstags:
	$(RM) ETAGS
	etags -f ETAGS $(TAGS_INCLUDE_FILES)
	etags -a -f ETAGS $(TAGS_SRC_FILES)
	etags -a -f ETAGS $(TAGS_EXAMPLE_FILES)
	etags -a -f ETAGS $(TAGS_DOC_FILES)
	$(RM) CTAGS
	$(CTAGS) -w -f CTAGS $(TAGS_INCLUDE_FILES)
	$(CTAGS) -w -a -f CTAGS $(TAGS_SRC_FILES)
	$(CTAGS) -w -a -f CTAGS $(TAGS_EXAMPLE_FILES)
	$(CTAGS) -w -a -f CTAGS $(TAGS_DOC_FILES)

ranlib:
	$(RANLIB) $(LDIR)/*.a

deletelibs:
	-$(RM) $(LDIR)/*.a 



syntax highlighted by Code2HTML, v. 0.9.1