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 66b5873e3SBarry SmithIPETSCDIR = . 761523587SBarry Smith 84b828684SBarry SmithCFLAGS = -I$(IPETSCDIR)/include -I.. -I$(IPETSCDIR) $(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\ 146b2e9f06SBarry Smith bmake/common bmake/*/*.* 1561523587SBarry SmithOBJSC = 1661523587SBarry SmithOBJSF = 1761523587SBarry SmithLIBBASE = libpetscvec 18b16a3bb1SBarry SmithDIRS = src include docs 1961523587SBarry Smith 207857610eSBarry Smithinclude $(IPETSCDIR)/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 82*0429b4e3SLois 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 85f5354500SBarry Smith etags -a -f TAGS makefile src/*/src/makefile src/makefile 86f5354500SBarry Smith etags -a -f TAGS src/*/impls/makefile src/*/impls/*/makefile 873ebb8ef7SBarry Smith etags -a -f TAGS src/*/utils/makefile src/*/examples/makefile 883ebb8ef7SBarry Smith etags -a -f TAGS src/*/makefile src/*/impls/*/*/makefile 890675aaacSBarry Smith etags -a -f TAGS bmake/common bmake/sun4/sun4* bmake/rs6000/rs6000* 90deb7fc1cSBarry Smith etags -a -f TAGS bmake/solaris/solaris* 910675aaacSBarry Smith etags -a -f TAGS bmake/IRIX/IRIX* bmake/freebsd/freebsd* 92017faef8SBarry Smith etags -a -f TAGS bmake/hpux/hpux* bmake/alpha/alpha* 930675aaacSBarry Smith etags -a -f TAGS bmake/t3d/t3d* bmake/paragon/paragon* 9470a6ad8cSBarry Smith etags -a -f TAGS docs/tex/routin.tex docs/tex/manual.tex 956f817ba4SBarry Smith etags -a -f TAGS docs/tex/intro.tex docs/tex/part1.tex 9628988994SBarry Smith chmod g+w TAGS 97bfce26a3SBarry Smith 9811b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 99bfce26a3SBarry Smithetags_noexamples: 100bfce26a3SBarry Smith $(RM) TAGS_NO_EXAMPLES 101bfce26a3SBarry Smith etags -f TAGS_NO_EXAMPLES src/*/impls/*/*.h src/*/impls/*/*/*.h 102c9589998SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/*.h src/*/interface/*.c 10364f8aa17SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES src/*/src/*.c src/*/impls/*/*.c 104*0429b4e3SLois Curfman McInnes etags -a -f TAGS_NO_EXAMPLES src/*/impls/*/*/*.c 105b16a3bb1SBarry Smith etags -a -f TAGS_NO_EXAMPLES include/*.h include/pinclude/*.h 106b16a3bb1SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/common 107464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/impls/*.c src/*/utils/*.c 108464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES makefile src/*/src/makefile src/makefile 109464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/impls/makefile src/*/impls/*/makefile 110464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/utils/makefile 111464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES src/*/makefile src/*/impls/*/*/makefile 112464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/common bmake/sun4/sun4* 113464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/rs6000/rs6000* 114464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/solaris/solaris* 115464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/IRIX/IRIX* bmake/freebsd/freebsd* 116464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/hpux/hpux* bmake/alpha/alpha* 117464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES bmake/t3d/t3d* bmake/paragon/paragon* 118464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES docs/tex/routin.tex docs/tex/manual.tex 119464493b3SBarry Smith etags -a -f TAGS_NO_EXAMPLES docs/tex/intro.tex docs/tex/part1.tex 120bfce26a3SBarry Smith chmod g+w TAGS_NO_EXAMPLES 121b16a3bb1SBarry Smith 12211b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 123b16a3bb1SBarry Smithetags_makefiles: 124b16a3bb1SBarry Smith $(RM) TAGS_MAKEFILES 125b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/common 126b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES makefile src/*/src/makefile src/makefile 127b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES src/*/impls/makefile src/*/impls/*/makefile 1282328c152SLois Curfman McInnes etags -a -f TAGS_MAKEFILES src/*/utils/makefile src/*/interface/makefile 129b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES src/*/makefile src/*/impls/*/*/makefile 130b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/common bmake/sun4/sun4* 131b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/rs6000/rs6000* 132b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/solaris/solaris* 133b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/IRIX/IRIX* bmake/freebsd/freebsd* 134b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/hpux/hpux* bmake/alpha/alpha* 135b16a3bb1SBarry Smith etags -a -f TAGS_MAKEFILES bmake/t3d/t3d* bmake/paragon/paragon* 136b16a3bb1SBarry Smith chmod g+w TAGS_MAKEFILES 13711b6ed10SLois Curfman McInnes 13811b6ed10SLois Curfman McInnes# ------------------------------------------------------------------ 13911b6ed10SLois Curfman McInnes# 14011b6ed10SLois Curfman McInnes# All remaining actions are intended for PETSc developers only. 14111b6ed10SLois Curfman McInnes# PETSc users should not generally need to use these commands. 14211b6ed10SLois Curfman McInnes# 14311b6ed10SLois Curfman McInnes 14411b6ed10SLois Curfman McInnes# Builds all versions of the man pages 14511b6ed10SLois Curfman McInnesallmanpages: deletemanpages deletewwwpages deletelatexpages 14611b6ed10SLois Curfman McInnes -make ACTION=manpages tree 14711b6ed10SLois Curfman McInnes -make ACTION=wwwpages tree 14811b6ed10SLois Curfman McInnes -make ACTION=latexpages tree 14911b6ed10SLois Curfman McInnes -maint/wwwman 15011b6ed10SLois Curfman McInnes 15111b6ed10SLois Curfman McInnes# Builds Fortran stub files 15211b6ed10SLois Curfman McInnesallfortranstubs: 15311b6ed10SLois Curfman McInnes -@$(RM) $(PETSC_DIR)/fortran/auto/*.c 15411b6ed10SLois Curfman McInnes -make ACTION=fortranstubs tree 15511b6ed10SLois Curfman McInnes 156