1*23f40d59SSatish Balay# $Id: makefile,v 1.190 1997/09/30 03:27:36 bsmith Exp balay $ 211b6ed10SLois Curfman McInnes# 3cfd69a58SBarry Smith# This is the makefile for installing PETSc. See the file 4cfd69a58SBarry Smith# Installation for directions on installing PETSc. 5cfd69a58SBarry Smith# See also bmake/common for additional commands. 611b6ed10SLois Curfman McInnes# 711b6ed10SLois Curfman McInnes 8ab94cc7aSSatish BalayCFLAGS = 961523587SBarry SmithSOURCEC = 1061523587SBarry SmithSOURCEF = 115eea60f9SBarry SmithDOCS = Changes Machines Readme maint/addlinks \ 1243a90d84SBarry Smith maint/builddist FAQ Installation BugReporting\ 13deb7fc1cSBarry Smith maint/buildlinks maint/wwwman maint/xclude maint/crontab\ 14630a6785SBarry Smith bmake/common bmake/*/base* maint/autoftp docs/www/sec/* \ 15630a6785SBarry Smith include/finclude/generateincludes bin/petscviewinfo.text \ 16630a6785SBarry Smith bin/petscoptsinfo.text 1761523587SBarry SmithOBJSC = 1861523587SBarry SmithOBJSF = 1961523587SBarry SmithLIBBASE = libpetscvec 20b16a3bb1SBarry SmithDIRS = src include docs 2161523587SBarry Smith 224e627d3aSBarry Smithinclude $(PETSC_DIR)/bmake/$(PETSC_ARCH)/base 2361523587SBarry Smith 24efd74e9bSBarry Smith# 25efd74e9bSBarry Smith# Prints information about the system and PETSc being compiled 26efd74e9bSBarry Smith# 27efd74e9bSBarry Smithinfo: 28efd74e9bSBarry Smith -@echo "==========================================" 291d91fb6eSBarry Smith -@echo On `date` on `hostname` 3030fdcc7aSBarry Smith -@echo Machine characteristics: `uname -a` 31efd74e9bSBarry Smith -@echo "-----------------------------------------" 32efd74e9bSBarry Smith -@echo "Using C compiler: $(CC) $(COPTFLAGS)" 3381eac796SBarry Smith -@if [ "$(CCV)" != "unknown" ] ; then \ 34376ee591SBarry Smith echo "Compiler version:" ; \ 35376ee591SBarry Smith $(CCV) ; fi 36efd74e9bSBarry Smith -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 3747794344SBarry Smith -@echo "-----------------------------------------" 38*23f40d59SSatish Balay -@grep PETSC_VERSION_NUMBER include/petsc.h | sed "s/........//" 39f265ae5cSBarry Smith -@echo "-----------------------------------------" 40b14e8f29SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 4147794344SBarry Smith -@echo "-----------------------------------------" 42b14e8f29SBarry Smith -@echo "Using configuration flags: $(CONF)" 4347794344SBarry Smith -@echo "-----------------------------------------" 44b14e8f29SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 4547794344SBarry Smith -@echo "-----------------------------------------" 46c2c9bc36SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 47c2c9bc36SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 48efd74e9bSBarry Smith -@echo "------------------------------------------" 49efd74e9bSBarry Smith -@echo "Using C linker: $(CLINKER)" 50efd74e9bSBarry Smith -@echo "Using libraries: $(PETSC_LIB)" 51efd74e9bSBarry Smith -@echo "Using Fortran linker: $(FLINKER)" 52efd74e9bSBarry Smith -@echo "Using Fortran libraries: $(PETSC_FORTRAN_LIB) 53efd74e9bSBarry Smith -@echo "==========================================" 54efd74e9bSBarry Smith 55efd74e9bSBarry Smith# Builds PETSc libraries for a given BOPT and architecture 56efd74e9bSBarry Smithall: info chkpetsc_dir 57efd74e9bSBarry Smith -$(RM) -f $(PDIR)/* 58efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 5947794344SBarry Smith -@echo "=========================================" 60e35bd481SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 61f3848965SBarry Smith ACTION=libfast tree 62f88f42abSSatish Balay -@cd $(PETSC_DIR)/src/sys/src ; \ 63f88f42abSSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) rs6000_time 644e04c1a0SBarry Smith $(RANLIB) $(PDIR)/*.a 650be1b381SSatish Balay -@chmod g+w $(PDIR)/*.a 660b3634f8SBarry Smith -@echo "Completed building libraries" 6747794344SBarry Smith -@echo "=========================================" 680b3634f8SBarry Smith 690b3634f8SBarry Smith# Builds PETSc test examples for a given BOPT and architecture 70efd74e9bSBarry Smithtestexamples: info chkopts 71efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 72eb817c50SBarry Smith -@echo "Due to different numerical round-off on certain" 73eb817c50SBarry Smith -@echo "machines some of the numbers may not match exactly." 7447794344SBarry Smith -@echo "=========================================" 750b3634f8SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 760b3634f8SBarry Smith ACTION=testexamples_1 tree 770b3634f8SBarry Smith -@echo "Completed compiling and running test examples" 7847794344SBarry Smith -@echo "=========================================" 790b3634f8SBarry Smith 800b3634f8SBarry Smith# Builds PETSc test examples for a given BOPT and architecture 81efd74e9bSBarry Smithtestexamples_uni: info chkopts 82efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 838475343bSBarry Smith -@echo "Due to different numerical round-off on certain" 848475343bSBarry Smith -@echo "machines some of the numbers may not match exactly." 8547794344SBarry Smith -@echo "=========================================" 868475343bSBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 878475343bSBarry Smith ACTION=testexamples_4 tree 888475343bSBarry Smith -@echo "Completed compiling and running uniprocessor test examples" 8947794344SBarry Smith -@echo "=========================================" 908475343bSBarry Smith 9135ca7349SBarry Smith# 9211b6ed10SLois Curfman McInnes# Builds PETSc Fortran interface libary 9311b6ed10SLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 9435ca7349SBarry Smith# use lib and check for errors here. 95efd74e9bSBarry Smithfortran: info chkpetsc_dir 96efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE FORTRAN INTERFACE LIBRARY" 9747794344SBarry Smith -@echo "=========================================" 98efd74e9bSBarry Smith -$(RM) -f $(PDIR)/libpetscfortran.* 99b16a3bb1SBarry Smith -@cd src/fortran/custom; \ 10035ca7349SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 10135ca7349SBarry Smith grep -v clog trashz | grep -v "information sections" | \ 10235ca7349SBarry Smith egrep -i '(Error|warning|Can)' >> /dev/null;\ 10335ca7349SBarry Smith if [ "$$?" != 1 ]; then \ 10435ca7349SBarry Smith cat trashz ; fi; $(RM) trashz 105b16a3bb1SBarry Smith -@cd src/fortran/auto; \ 10635ca7349SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast 10783f0b094SBarry Smith $(RANLIB) $(PDIR)/libpetscfortran.a 1080be1b381SSatish Balay -@chmod g+w $(PDIR)/*.a 1090b3634f8SBarry Smith -@echo "Completed compiling Fortran interface library" 11047794344SBarry Smith -@echo "=========================================" 11183f0b094SBarry Smith 112971c2310SBarry Smith# 113971c2310SBarry Smith# Builds PETSc Fortran kernels; some numerical kernels have 114971c2310SBarry Smith# a Fortran version that may give better performance on certain 115971c2310SBarry Smith# machines. It always gives better performance for complex numbers. 116efd74e9bSBarry Smithfortrankernels: info chkpetsc_dir 117971c2310SBarry Smith -$(RM) -f $(PDIR)/libpetsckernels.* 118efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE FORTRAN KERNELS LIBRARY" 119971c2310SBarry Smith -@echo "=========================================" 120971c2310SBarry Smith -@cd src/fortran/kernels; \ 121971c2310SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib 122971c2310SBarry Smith -@chmod g+w $(PDIR)/*.a 123971c2310SBarry Smith -@echo "Completed compiling Fortran kernels library" 124971c2310SBarry Smith -@echo "=========================================" 125971c2310SBarry Smith 126727c161cSBarry Smith# Builds PETSc test examples for a given BOPT and architecture 127efd74e9bSBarry Smithtestfortran: info chkopts 128efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 12947794344SBarry Smith -@echo "=========================================" 130e4ef9893SBarry Smith -@echo "Due to different numerical round-off on certain" 131e4ef9893SBarry Smith -@echo "machines or the way Fortran formats numbers" 132e4ef9893SBarry Smith -@echo "some of the results may not match exactly." 133e4ef9893SBarry Smith -@echo "=========================================" 134e4ef9893SBarry Smith -@echo "On some machines you may get messages of the form" 135e4ef9893SBarry Smith -@echo "PetscScalarAddressToFortran:C and Fortran arrays are" 136e4ef9893SBarry Smith -@echo "not commonly aligned or are too far apart to be indexed" 137e4ef9893SBarry Smith -@echo "by an integer. Locations: C xxxc Fortran xxxf" 138e4ef9893SBarry Smith -@echo "Locations/sizeof(Scalar): C yyc Fortran yyf" 139e4ef9893SBarry Smith -@echo "This indicates that you may not be able to use the" 140e4ef9893SBarry Smith -@echo "PETSc routines VecGetArray() and MatGetArray() from Fortran" 141e4ef9893SBarry Smith -@echo "=========================================" 142727c161cSBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 143727c161cSBarry Smith ACTION=testexamples_3 tree 144727c161cSBarry Smith -@echo "Completed compiling and running Fortran test examples" 14547794344SBarry Smith -@echo "=========================================" 146b1f85764SBarry Smith# 147b1f85764SBarry Smith# Builds PETSc Fortran90 interface libary 148b1f85764SBarry Smith# Note: libfast cannot run on .F files on certain machines, so we 149b1f85764SBarry Smith# use lib and check for errors here. 150b1f85764SBarry Smith# Note: F90 interface currently only supported in NAG F90 compiler 151efd74e9bSBarry Smithfortran90: info chkpetsc_dir fortran 152efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE FORTRAN90 INTERFACE LIBRARY" 153b1f85764SBarry Smith -@echo "=========================================" 154b1f85764SBarry Smith -@cd src/fortran/f90; \ 155b1f85764SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 156b1f85764SBarry Smith grep -v clog trashz | grep -v "information sections" | \ 157b1f85764SBarry Smith egrep -i '(Error|warning|Can)' >> /dev/null;\ 158b1f85764SBarry Smith if [ "$$?" != 1 ]; then \ 159b1f85764SBarry Smith cat trashz ; fi; $(RM) trashz 160b1f85764SBarry Smith $(RANLIB) $(PDIR)/libpetscfortran.a 1610be1b381SSatish Balay -@chmod g+w $(PDIR)/*.a 162b1f85764SBarry Smith -@echo "Completed compiling Fortran90 interface library" 163b1f85764SBarry Smith -@echo "=========================================" 164b1f85764SBarry Smith 165ad96cc0dSLois Curfman McInnes# Builds noise routines (not yet publically available) 166ad96cc0dSLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 167ad96cc0dSLois Curfman McInnes# use lib and check for errors here. 168efd74e9bSBarry Smithnoise: info chkpetsc_dir 169ad96cc0dSLois Curfman McInnes -@echo "Beginning to compile noise routines" 170ad96cc0dSLois Curfman McInnes -@echo "=========================================" 171ad96cc0dSLois Curfman McInnes -@cd src/snes/interface/noise; \ 172ad96cc0dSLois Curfman McInnes $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 173ad96cc0dSLois Curfman McInnes grep -v clog trashz | grep -v "information sections" | \ 174ad96cc0dSLois Curfman McInnes egrep -i '(Error|warning|Can)' >> /dev/null;\ 175ad96cc0dSLois Curfman McInnes if [ "$$?" != 1 ]; then \ 176ad96cc0dSLois Curfman McInnes cat trashz ; fi; $(RM) trashz 177ad96cc0dSLois Curfman McInnes $(RANLIB) $(PDIR)/libpetscsnes.a 178ad96cc0dSLois Curfman McInnes -@chmod g+w $(PDIR)/libpetscsnes.a 179ad96cc0dSLois Curfman McInnes -@echo "Completed compiling noise routines" 180ad96cc0dSLois Curfman McInnes -@echo "=========================================" 181ad96cc0dSLois Curfman McInnes 182efd74e9bSBarry Smithpetscblas: info chkpetsc_dir 18366341c5dSSatish Balay -$(RM) -f $(PDIR)/libpetscblas.* 184efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 18566341c5dSSatish Balay -@echo "=========================================" 18666341c5dSSatish Balay -@cd src/adic/blas; \ 18766341c5dSSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast 18866341c5dSSatish Balay -@cd src/adic/lapack; \ 18966341c5dSSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=libfast tree 19066341c5dSSatish Balay $(RANLIB) $(PDIR)/libpetscblas.a 19166341c5dSSatish Balay -@chmod g+w $(PDIR)/*.a 192229e8d5cSBarry Smith -@echo "Completed compiling C version of BLAS and LAPACK" 19366341c5dSSatish Balay -@echo "=========================================" 19466341c5dSSatish Balay 195ad96cc0dSLois Curfman McInnes 1968c37ef55SBarry Smithranlib: 1974e04c1a0SBarry Smith $(RANLIB) $(PDIR)/*.a 19861523587SBarry Smith 19911b6ed10SLois Curfman McInnes# Deletes PETSc libraries 20061523587SBarry Smithdeletelibs: 2014e04c1a0SBarry Smith -$(RM) -f $(PDIR)/*.a $(PDIR)/complex/* $(PDIR)/c++/* 202d44968ceSBarry Smith 20311b6ed10SLois Curfman McInnes# Deletes man pages (HTML version) 204b346654fSBarry Smithdeletewwwpages: 205dea827f2SLois Curfman McInnes $(RM) -f $(PETSC_DIR)/docs/www/man*/* $(PETSC_DIR)/docs/www/www.cit \ 206dea827f2SLois Curfman McInnes $(PETSC_DIR)/docs/www/man*.html 207b346654fSBarry Smith 20811b6ed10SLois Curfman McInnes# Deletes man pages (LaTeX version) 209b346654fSBarry Smithdeletelatexpages: 2107857610eSBarry Smith $(RM) -f $(PETSC_DIR)/docs/tex/rsum/*sum*.tex 21120563c6bSBarry Smith 2127acb7333SLois Curfman McInnes# To access the tags in emacs, type M-x visit-tags-table and specify 2137acb7333SLois Curfman McInnes# the file petsc/TAGS. Then, to move to where a PETSc function is 2147acb7333SLois Curfman McInnes# defined, enter M-. and the function name. To search for a string 2157acb7333SLois Curfman McInnes# and move to the first occurrence, use M-x tags-search and the string. 2167acb7333SLois Curfman McInnes# To locate later occurrences, use M-, 2177acb7333SLois Curfman McInnes 218b38bb785SSatish BalayTAGS_INCLUDE_FILES = include/*.h include/pinclude/*.h include/FINCLUDE/*.h 219b38bb785SSatish BalayTAGS_BMAKE_FILES = bmake/common bmake/*/base* 220b38bb785SSatish BalayTAGS_EXAMPLE_FILES = src/*/examples/*/*.[c,h,F,f] src/*/examples/*/*/*.[c,h,F,f] \ 221b38bb785SSatish Balay src/benchmarks/*.c src/contrib/*/examples/*/*.[c,h,F,f] 222b38bb785SSatish BalayTAGS_DOC_FILES = docs/tex/manual/routin.tex docs/tex/manual/manual.tex \ 223b38bb785SSatish Balay docs/tex/manual/manual_tex.tex docs/tex/manual/intro.tex \ 224b38bb785SSatish Balay docs/tex/manual/part1.tex docs/tex/manual/part2.tex 2254431cf12SSatish BalayTAGS_SRC_FILES = src/*/*.[c,h] src/*/interface/*.[c,h] src/*/src/*.[c,h] \ 226b38bb785SSatish Balay src/*/utils/*.[c,h] \ 227b38bb785SSatish Balay src/*/impls/*.[c,h] src/*/impls/*/*.[c,h] src/*/impls/*/*/*.[c,h] \ 228b334301eSBarry Smith src/gvec/impls/*/*/*/*/*.[c,h] src/contrib/*/*.[c,h] \ 229b334301eSBarry Smith src/contrib/*/src/*.[c,h] src/fortran/custom/*.[c,h,F] 230b38bb785SSatish BalayTAGS_MAKEFILE_FILES = include/makefile include/*/makefile \ 231b38bb785SSatish Balay makefile \ 232b38bb785SSatish Balay src/makefile src/*/makefile src/*/src/makefile \ 233b38bb785SSatish Balay src/*/interface/makefile \ 234b38bb785SSatish Balay src/*/utils/makefile \ 235b38bb785SSatish Balay src/*/impls/makefile src/*/impls/*/makefile src/*/impls/*/*/makefile \ 236b38bb785SSatish Balay src/*/examples/makefile src/*/examples/*/makefile src/*/examples/*/*/makefile \ 237b38bb785SSatish Balay src/gvec/impls/*/*/*/*/makefile src/gvec/impls/*/*/*/makefile \ 238b38bb785SSatish Balay src/fortran/*/makefile \ 239b38bb785SSatish Balay src/contrib/*/makefile src/contrib/*/src/makefile \ 240b38bb785SSatish Balay src/contrib/*/examples/makefile src/contrib/*/examples/*/makefile \ 241b38bb785SSatish Balay docs/makefile 242b38bb785SSatish Balay 24311b6ed10SLois Curfman McInnes# Builds all etags files 24411b6ed10SLois Curfman McInnesalletags: 2459ae7ee0fSLois Curfman McInnes -make etags_complete 24611b6ed10SLois Curfman McInnes -make etags 24711b6ed10SLois Curfman McInnes -make etags_noexamples 24811b6ed10SLois Curfman McInnes -make etags_makefiles 24911b6ed10SLois Curfman McInnes 25011b6ed10SLois Curfman McInnes# Builds the basic etags file. This should be employed by most users. 25120563c6bSBarry Smithetags: 252edd2f0e1SBarry Smith $(RM) TAGS 253b38bb785SSatish Balay etags -f TAGS $(TAGS_INCLUDE_FILES) 254b38bb785SSatish Balay etags -a -f TAGS $(TAGS_SRC_FILES) 255b38bb785SSatish Balay etags -a -f TAGS $(TAGS_EXAMPLE_FILES) 256b38bb785SSatish Balay etags -a -f TAGS $(TAGS_MAKEFILE_FILES) 257b38bb785SSatish Balay etags -a -f TAGS $(TAGS_BMAKE_FILES) 25828988994SBarry Smith chmod g+w TAGS 259bfce26a3SBarry Smith 26029cdf679SBarry Smith# Builds complete etags list; only for PETSc developers. 26129cdf679SBarry Smithetags_complete: 26229cdf679SBarry Smith $(RM) TAGS_COMPLETE 2639ca56a1bSSatish Balay etags -f TAGS_COMPLETE $(TAGS_SRC_FILES) 2649ca56a1bSSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_INCLUDE_FILES) 265b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_EXAMPLE_FILES) 266b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_MAKEFILE_FILES) 267b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_BMAKE_FILES) 268b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_DOC_FILES) 26929cdf679SBarry Smith chmod g+w TAGS_COMPLETE 27029cdf679SBarry Smith 27111b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 272bfce26a3SBarry Smithetags_noexamples: 273bfce26a3SBarry Smith $(RM) TAGS_NO_EXAMPLES 2749ca56a1bSSatish Balay etags -f TAGS_NO_EXAMPLES $(TAGS_SRC_FILES) 2759ca56a1bSSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_INCLUDE_FILES) 276b38bb785SSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_MAKEFILE_FILES) 277b38bb785SSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_BMAKE_FILES) 278b38bb785SSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_DOC_FILES) 279bfce26a3SBarry Smith chmod g+w TAGS_NO_EXAMPLES 280b16a3bb1SBarry Smith 28111b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 282b16a3bb1SBarry Smithetags_makefiles: 283b16a3bb1SBarry Smith $(RM) TAGS_MAKEFILES 284b38bb785SSatish Balay etags -f TAGS_MAKEFILES $(TAGS_MAKEFILE_FILES) 285b38bb785SSatish Balay etags -a -f TAGS_MAKEFILES $(TAGS_BMAKE_FILES) 286b16a3bb1SBarry Smith chmod g+w TAGS_MAKEFILES 28711b6ed10SLois Curfman McInnes 288dc80aa23SSatish Balay# Builds the etags file for examples 289dc80aa23SSatish Balayetags_examples: 290dc80aa23SSatish Balay $(RM) TAGS_EXAMPLES 291dc80aa23SSatish Balay etags -f TAGS_EXAMPLES $(TAGS_EXAMPLE_FILES) 292dc80aa23SSatish Balay chmod g+w TAGS_EXAMPLES 293dc80aa23SSatish Balay 294b38bb785SSatish Balay# 295b38bb785SSatish Balay# ctags builds the tags file required for VI. 296b38bb785SSatish Balay# To use the tags file do the following: 297b38bb785SSatish Balay# 1. within vi invole the command - :set tags=/home/bsmith/petsc/tags 298b38bb785SSatish Balay# or add the command to your ~/.exrc file - set tags=/home/bsmith/petsc/tags 299b38bb785SSatish Balay# 2. now to go to a tag do - :tag TAGNAME for eg - :tag MatCreate 300b38bb785SSatish Balay# 301b38bb785SSatish Balayctags: 302b38bb785SSatish Balay $(RM) tags 303b8319b70SSatish Balay ctags -w -f tags $(TAGS_INCLUDE_FILES) 304b8319b70SSatish Balay ctags -w -a -f tags $(TAGS_SRC_FILES) 305b38bb785SSatish Balay ctags -w -a -f tags $(TAGS_EXAMPLE_FILES) 306b38bb785SSatish Balay ctags -w -a -f tags $(TAGS_MAKEFILE_FILES) 307b38bb785SSatish Balay ctags -w -a -f tags $(TAGS_BMAKE_FILES) 308b38bb785SSatish Balay chmod g+w tags 309b38bb785SSatish Balay 31011b6ed10SLois Curfman McInnes# ------------------------------------------------------------------ 31111b6ed10SLois Curfman McInnes# 31211b6ed10SLois Curfman McInnes# All remaining actions are intended for PETSc developers only. 31311b6ed10SLois Curfman McInnes# PETSc users should not generally need to use these commands. 31411b6ed10SLois Curfman McInnes# 31511b6ed10SLois Curfman McInnes 31611b6ed10SLois Curfman McInnes# Builds all versions of the man pages 317956e605aSBarry Smithallmanpages: allwwwpages alllatexpages 318dea827f2SLois Curfman McInnesallwwwpages: deletewwwpages 319299192b9SLois Curfman McInnes -make ACTION=wwwpages_buildcite tree 320c3e30b67SBarry Smith -cd src/fortran/custom; make wwwpages_buildcite 321c3e30b67SBarry Smith -cd src/fortran/custom; make wwwpages 322dea827f2SLois Curfman McInnes -make ACTION=wwwpages tree 323dea827f2SLois Curfman McInnes -maint/wwwman 3249921e35aSSatish Balay -maint/examplesindex.tcl -www 325f8cfbf3fSSatish Balay -maint/htmlkeywords.tcl 32651c61065SBarry Smith -@chmod g+w docs/www/man*/* 327e01137a2SSatish Balay 328e01137a2SSatish Balay#This is similar to allwwwpages except -www -> -wwwhome 329e01137a2SSatish Balay#The wwwmanpages built this way can pe placed at PETSc Home Page 330e01137a2SSatish Balayallwwwhomepages: deletewwwpages 331e01137a2SSatish Balay -make ACTION=wwwpages_buildcite tree 332e01137a2SSatish Balay -cd src/fortran/custom; make wwwpages_buildcite 333e01137a2SSatish Balay -cd src/fortran/custom; make wwwpages 334e01137a2SSatish Balay -make ACTION=wwwpages tree 335e01137a2SSatish Balay -maint/wwwman 336e01137a2SSatish Balay -maint/examplesindex.tcl -wwwhome 33784047b72SSatish Balay -maint/htmlkeywords.tcl -wwwhome 338e01137a2SSatish Balay -@chmod g+w docs/www/man*/* 339e01137a2SSatish Balay 340416022c9SBarry Smithalllatexpages: deletelatexpages 341416022c9SBarry Smith -make ACTION=latexpages tree 342c3e30b67SBarry Smith -cd src/fortran/custom; make latexpages 34351c61065SBarry Smith -@chmod g+w docs/tex/rsum/* 344416022c9SBarry Smith 34511b6ed10SLois Curfman McInnes# Builds Fortran stub files 34611b6ed10SLois Curfman McInnesallfortranstubs: 34735aab85fSBarry Smith -@include/finclude/generateincludes 3480a0eb2c5SBarry Smith -@$(RM) -f src/fortran/auto/*.c 34911b6ed10SLois Curfman McInnes -make ACTION=fortranstubs tree 3500a0eb2c5SBarry Smith chmod g+w src/fortran/auto/*.c 351f6ff2982SSatish Balay 352d55938c2SBarry Smithallci: 353d55938c2SBarry Smith -@cd src/fortran/custom ; $(OMAKE) BOPT=$(BOPT) ci 354b951964fSBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=ci tree 355b951964fSBarry Smith 356d55938c2SBarry Smithallco: 357d55938c2SBarry Smith -@cd src/fortran/custom ; $(OMAKE) BOPT=$(BOPT) co 358d55938c2SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=co tree 359d55938c2SBarry Smith 360b334301eSBarry Smith# 361b334301eSBarry Smith# The commands below are for generating ADIC versions of the code; 362b334301eSBarry Smith# they are not currently used. 363b334301eSBarry Smith# 364b334301eSBarry SmithCFLAGS = $(CPPFLAGS) $(CONF) 3655eea60f9SBarry Smithalladicignore: 3665eea60f9SBarry Smith -@$(RM) $(PDIR)/adicignore 3675eea60f9SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adicignore tree 3685eea60f9SBarry Smith 3695eea60f9SBarry Smithalladic: 370d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC source code in all directories" 371d18b0ea7SBarry Smith -@echo "Using ADIC compiler: $(ADIC_CC) $(CFLAGS)" 372d18b0ea7SBarry Smith -@echo "=========================================" 37347794344SBarry Smith -@cd include ; \ 374f218b1c0SBarry Smith $(ADIC_CC) -s -f 1 $(CFLAGS) petsc.h 375ba8edd79SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adic tree 37647794344SBarry Smith -@cd src/inline ; \ 37747794344SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adic 3787e351921SBarry Smith -@cd src/adic/blas ; \ 3797e351921SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adic 3807e351921SBarry Smith -@cd src/adic/lapack ; \ 381e1063516SSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adic tree 3826e81b665SBarry Smith 38347794344SBarry Smithalladiclib: 384d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC libraries in all directories" 385d18b0ea7SBarry Smith -@echo "Using compiler: $(CC) $(COPTFLAGS)" 386d18b0ea7SBarry Smith -@echo "-----------------------------------------" 387d18b0ea7SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 388d18b0ea7SBarry Smith -@echo "-----------------------------------------" 389d18b0ea7SBarry Smith -@echo "Using configuration flags: $(CONF)" 390d18b0ea7SBarry Smith -@echo "-----------------------------------------" 391d18b0ea7SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 392d18b0ea7SBarry Smith -@echo "-----------------------------------------" 393d18b0ea7SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 394d18b0ea7SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 395d18b0ea7SBarry Smith -@echo "=========================================" 396f218b1c0SBarry Smith -@$(RM) -f $(PDIR)/*adic.a 39747794344SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adiclib tree 3987e351921SBarry Smith -@cd src/adic/blas ; \ 3997e351921SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adiclib 4007e351921SBarry Smith -@cd src/adic/lapack ; \ 401e1063516SSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adiclib tree 4027e351921SBarry Smith -@cd src/adic/src ; \ 403cb3b3f49SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib 4045eea60f9SBarry Smith 4059e417c50SSatish Balay# ------------------------------------------------------------------------------- 4069e417c50SSatish Balay# 4079e417c50SSatish Balay# Some macros to check if the fortran interface is up-to-date. 4089e417c50SSatish Balay# 4099e417c50SSatish Balaycountfortranfunctions: 4109e417c50SSatish Balay -@cd $(PETSC_DIR)/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 4119e417c50SSatish Balay cut -d'(' -f1 | tr -s '' ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 4129e417c50SSatish Balay sed "s/_$$//" | sort > /tmp/countfortranfunctions 413b334301eSBarry Smith 4149e417c50SSatish Balaycountcfunctions: 4159e417c50SSatish Balay -@ grep extern $(PETSC_DIR)/include/*.h *.h | grep "(" | tr -s '' ' ' | \ 4169e417c50SSatish Balay cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '' '\012' | \ 4179e417c50SSatish Balay tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 4189e417c50SSatish Balay 4199e417c50SSatish Balaydifffortranfunctions: countfortranfunctions countcfunctions 4209e417c50SSatish Balay -@echo -------------- Functions missing in the fortran interface --------------------- 4219e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 4229e417c50SSatish Balay -@echo ----------------- Functions missing in the C interface ------------------------ 4239e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 4249e417c50SSatish Balay -@$(RM) /tmp/countcfunctions /tmp/countfortranfunctions 425b334301eSBarry Smith 4263f4c9a3aSSatish Balaycheckbadfortranstubs: 4273f4c9a3aSSatish Balay -@echo "=========================================" 4283f4c9a3aSSatish Balay -@echo "Functions with MPI_Comm as an Argument" 4293f4c9a3aSSatish Balay -@echo "=========================================" 4303f4c9a3aSSatish Balay -@cd $(PETSC_DIR)/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 4313f4c9a3aSSatish Balay tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 4323f4c9a3aSSatish Balay -@echo "=========================================" 4333f4c9a3aSSatish Balay -@echo "Functions with a String as an Argument" 4343f4c9a3aSSatish Balay -@echo "=========================================" 4353f4c9a3aSSatish Balay -@cd $(PETSC_DIR)/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 4363f4c9a3aSSatish Balay tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 4373f4c9a3aSSatish Balay -@echo "=========================================" 4383f4c9a3aSSatish Balay -@echo "Functions with Pointers to PETSc Objects as Argument" 4393f4c9a3aSSatish Balay -@echo "=========================================" 4403f4c9a3aSSatish Balay -@cd $(PETSC_DIR)/src/fortran/auto; \ 4413f4c9a3aSSatish Balay _p_OBJ=`grep _p_ $(PETSC_DIR)/include/*.h | tr -s '' ' ' | \ 4423f4c9a3aSSatish Balay cut -d' ' -f 3 | tr -s '' '\012' | grep -v '{' | cut -d'*' -f1 | \ 4433f4c9a3aSSatish Balay sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 4443f4c9a3aSSatish Balay for OBJ in $$_p_OBJ; do \ 4453f4c9a3aSSatish Balay grep "$$OBJ \*" *.c | tr -s '' ' ' | tr -s ':' ' ' | \ 4463f4c9a3aSSatish Balay cut -d'(' -f1 | cut -d' ' -f1,3; \ 4473f4c9a3aSSatish Balay done 448