111b6ed10SLois Curfman McInnes# 211b6ed10SLois Curfman McInnes# This makefile contains some basic commands for building PETSc. 311b6ed10SLois Curfman McInnes# See bmake/common for additional commands. 411b6ed10SLois Curfman McInnes# 511b6ed10SLois Curfman McInnes 60de55854SLois Curfman McInnesPETSC_DIR = . 761523587SBarry Smith 80de55854SLois Curfman McInnesCFLAGS = -I$(PETSC_DIR)/include -I.. -I$(PETSC_DIR) $(CONF) 961523587SBarry SmithSOURCEC = 1061523587SBarry SmithSOURCEF = 116f817ba4SBarry SmithSOURCEH = Changes Machines Readme maint/addlinks maint/buildtest \ 12bcfa8486SBarry Smith maint/builddist FAQ Installation Performance BugReporting\ 13deb7fc1cSBarry Smith maint/buildlinks maint/wwwman maint/xclude maint/crontab\ 14*20957fcfSLois Curfman McInnes bmake/common bmake/*/* 1561523587SBarry SmithOBJSC = 1661523587SBarry SmithOBJSF = 1761523587SBarry SmithLIBBASE = libpetscvec 18b16a3bb1SBarry SmithDIRS = src include docs 1961523587SBarry Smith 200de55854SLois Curfman McInnesinclude $(PETSC_DIR)/bmake/$(PETSC_ARCH)/$(PETSC_ARCH) 2161523587SBarry Smith 2211b6ed10SLois Curfman McInnes# Builds PETSc libraries for a given BOPT and architecture 237857610eSBarry Smithall: chkpetsc_dir 244e04c1a0SBarry Smith -$(RM) -f $(PDIR)/*.a 25e35bd481SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 26f3848965SBarry Smith ACTION=libfast tree 274e04c1a0SBarry Smith $(RANLIB) $(PDIR)/*.a 2861523587SBarry Smith 2935ca7349SBarry Smith# 3011b6ed10SLois Curfman McInnes# Builds PETSc Fortran interface libary 3111b6ed10SLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 3235ca7349SBarry Smith# use lib and check for errors here. 3383f0b094SBarry Smithfortran: chkpetsc_dir 34b16a3bb1SBarry Smith -@cd src/fortran/custom; \ 3535ca7349SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 3635ca7349SBarry Smith grep -v clog trashz | grep -v "information sections" | \ 3735ca7349SBarry Smith egrep -i '(Error|warning|Can)' >> /dev/null;\ 3835ca7349SBarry Smith if [ "$$?" != 1 ]; then \ 3935ca7349SBarry Smith cat trashz ; fi; $(RM) trashz 40b16a3bb1SBarry Smith -@cd src/fortran/auto; \ 4135ca7349SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast 4283f0b094SBarry Smith $(RANLIB) $(PDIR)/libpetscfortran.a 4383f0b094SBarry Smith 448c37ef55SBarry Smithranlib: 454e04c1a0SBarry Smith $(RANLIB) $(PDIR)/*.a 4661523587SBarry Smith 4711b6ed10SLois Curfman McInnes# Deletes PETSc libraries 4861523587SBarry Smithdeletelibs: 494e04c1a0SBarry Smith -$(RM) -f $(PDIR)/*.a $(PDIR)/complex/* $(PDIR)/c++/* 50d44968ceSBarry Smith 5111b6ed10SLois Curfman McInnes# Deletes man pages (xman version) 52d44968ceSBarry Smithdeletemanpages: 537857610eSBarry Smith $(RM) -f $(PETSC_DIR)/Keywords $(PETSC_DIR)/docs/man/man*/* 54d44968ceSBarry Smith 5511b6ed10SLois Curfman McInnes# Deletes man pages (HTML version) 56b346654fSBarry Smithdeletewwwpages: 577857610eSBarry Smith $(RM) -f $(PETSC_DIR)/docs/www/man*/* $(PETSC_DIR)/docs/www/www.cit 58b346654fSBarry Smith 5911b6ed10SLois Curfman McInnes# Deletes man pages (LaTeX version) 60b346654fSBarry Smithdeletelatexpages: 617857610eSBarry Smith $(RM) -f $(PETSC_DIR)/docs/tex/rsum/*sum*.tex 6220563c6bSBarry Smith 637acb7333SLois Curfman McInnes# To access the tags in emacs, type M-x visit-tags-table and specify 647acb7333SLois Curfman McInnes# the file petsc/TAGS. Then, to move to where a PETSc function is 657acb7333SLois Curfman McInnes# defined, enter M-. and the function name. To search for a string 667acb7333SLois Curfman McInnes# and move to the first occurrence, use M-x tags-search and the string. 677acb7333SLois Curfman McInnes# To locate later occurrences, use M-, 687acb7333SLois Curfman McInnes 6911b6ed10SLois Curfman McInnes# Builds all etags files 7011b6ed10SLois Curfman McInnesalletags: 7111b6ed10SLois Curfman McInnes -make etags 7211b6ed10SLois Curfman McInnes -make etags_noexamples 7311b6ed10SLois Curfman McInnes -make etags_makefiles 7411b6ed10SLois Curfman McInnes 7511b6ed10SLois Curfman McInnes# Builds the basic etags file. This should be employed by most users. 7620563c6bSBarry Smithetags: 77edd2f0e1SBarry Smith $(RM) TAGS 7870a6ad8cSBarry Smith etags -f TAGS src/*/impls/*/*.h src/*/impls/*/*/*.h 79ba6aed2eSLois Curfman McInnes etags -a -f TAGS src/*/examples/*.c src/*/examples/*/*.c 80bdec0fbfSBarry Smith etags -a -f TAGS src/*/*.h src/*/interface/*.c 81bdec0fbfSBarry Smith etags -a -f TAGS src/*/src/*.c src/*/impls/*/*.c 820429b4e3SLois Curfman McInnes etags -a -f TAGS src/*/impls/*/*/*.c 83b16a3bb1SBarry Smith etags -a -f TAGS include/*.h include/pinclude/*.h bmake/common 8470a6ad8cSBarry Smith etags -a -f TAGS src/*/impls/*.c src/*/utils/*.c 850de55854SLois Curfman McInnes etags -a -f TAGS makefile src/*/src/makefile 860de55854SLois Curfman McInnes etags -a -f TAGS src/*/interface/makefile src/makefile 87f5354500SBarry Smith etags -a -f TAGS src/*/impls/makefile src/*/impls/*/makefile 883ebb8ef7SBarry Smith etags -a -f TAGS src/*/utils/makefile src/*/examples/makefile 890de55854SLois Curfman McInnes etags -a -f TAGS src/*/examples/*/makefile 903ebb8ef7SBarry Smith etags -a -f TAGS src/*/makefile src/*/impls/*/*/makefile 910de55854SLois Curfman McInnes etags -a -f TAGS include/makefile include/*/makefile docs/makefile 920675aaacSBarry Smith etags -a -f TAGS bmake/common bmake/sun4/sun4* bmake/rs6000/rs6000* 93deb7fc1cSBarry Smith etags -a -f TAGS bmake/solaris/solaris* 940675aaacSBarry Smith etags -a -f TAGS bmake/IRIX/IRIX* bmake/freebsd/freebsd* 95017faef8SBarry Smith etags -a -f TAGS bmake/hpux/hpux* bmake/alpha/alpha* 960675aaacSBarry Smith etags -a -f TAGS bmake/t3d/t3d* bmake/paragon/paragon* 9770a6ad8cSBarry Smith etags -a -f TAGS docs/tex/routin.tex docs/tex/manual.tex 986f817ba4SBarry Smith etags -a -f TAGS docs/tex/intro.tex docs/tex/part1.tex 9928988994SBarry Smith chmod g+w TAGS 100bfce26a3SBarry Smith 10111b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 102bfce26a3SBarry Smithetags_noexamples: 103bfce26a3SBarry Smith $(RM) TAGS_NO_EXAMPLES 104bfce26a3SBarry Smith etags -f TAGS_NO_EXAMPLES src/*/impls/*/*.h src/*/impls/*/*/*.h 105c9589998SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/*.h src/*/interface/*.c 10664f8aa17SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES src/*/src/*.c src/*/impls/*/*.c 1070429b4e3SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES src/*/impls/*/*/*.c 108b16a3bb1SBarry Smith etags -a -f TAGS_NO_EXAMPLES include/*.h include/pinclude/*.h 109b16a3bb1SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/common 110464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/impls/*.c src/*/utils/*.c 1110de55854SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES makefile src/*/src/makefile 1120de55854SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES src/*/interface/makefile src/makefile 113464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/impls/makefile src/*/impls/*/makefile 114464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/utils/makefile 115464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/makefile src/*/impls/*/*/makefile 1160de55854SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES include/makefile include/*/makefile docs/makefile 117464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/common bmake/sun4/sun4* 118464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/rs6000/rs6000* 119464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/solaris/solaris* 120464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/IRIX/IRIX* bmake/freebsd/freebsd* 121464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/hpux/hpux* bmake/alpha/alpha* 122464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/t3d/t3d* bmake/paragon/paragon* 123464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES docs/tex/routin.tex docs/tex/manual.tex 124464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES docs/tex/intro.tex docs/tex/part1.tex 125bfce26a3SBarry Smith chmod g+w TAGS_NO_EXAMPLES 126b16a3bb1SBarry Smith 12711b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 128b16a3bb1SBarry Smithetags_makefiles: 129b16a3bb1SBarry Smith $(RM) TAGS_MAKEFILES 130b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/common 1310de55854SLois Curfman McInnes etags -a -f TAGS_MAKEFILES makefile src/*/src/makefile 1320de55854SLois Curfman McInnes etags -a -f TAGS_MAKEFILES src/*/interface/makefile src/makefile 133b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES src/*/impls/makefile src/*/impls/*/makefile 1342328c152SLois Curfman McInnes etags -a -f TAGS_MAKEFILES src/*/utils/makefile src/*/interface/makefile 135b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES src/*/makefile src/*/impls/*/*/makefile 1360de55854SLois Curfman McInnes etags -a -f TAGS_MAKEFILES src/*/examples/makefile src/*/examples/*/makefile 1370de55854SLois Curfman McInnes etags -a -f TAGS_MAKEFILES include/makefile include/*/makefile docs/makefile 138b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/common bmake/sun4/sun4* 139b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/rs6000/rs6000* 140b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/solaris/solaris* 141b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/IRIX/IRIX* bmake/freebsd/freebsd* 142b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/hpux/hpux* bmake/alpha/alpha* 143b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/t3d/t3d* bmake/paragon/paragon* 144b16a3bb1SBarry Smith chmod g+w TAGS_MAKEFILES 14511b6ed10SLois Curfman McInnes 14611b6ed10SLois Curfman McInnes# ------------------------------------------------------------------ 14711b6ed10SLois Curfman McInnes# 14811b6ed10SLois Curfman McInnes# All remaining actions are intended for PETSc developers only. 14911b6ed10SLois Curfman McInnes# PETSc users should not generally need to use these commands. 15011b6ed10SLois Curfman McInnes# 15111b6ed10SLois Curfman McInnes 15211b6ed10SLois Curfman McInnes# Builds all versions of the man pages 15311b6ed10SLois Curfman McInnesallmanpages: deletemanpages deletewwwpages deletelatexpages 15411b6ed10SLois Curfman McInnes -make ACTION=manpages tree 15511b6ed10SLois Curfman McInnes -make ACTION=wwwpages tree 15611b6ed10SLois Curfman McInnes -make ACTION=latexpages tree 15711b6ed10SLois Curfman McInnes -maint/wwwman 15811b6ed10SLois Curfman McInnes 15911b6ed10SLois Curfman McInnes# Builds Fortran stub files 16011b6ed10SLois Curfman McInnesallfortranstubs: 16111b6ed10SLois Curfman McInnes -@$(RM) $(PETSC_DIR)/fortran/auto/*.c 16211b6ed10SLois Curfman McInnes -make ACTION=fortranstubs tree 16311b6ed10SLois Curfman McInnes 164