1# $Id: makefile,v 1.242 1998/04/29 16:13:03 bsmith Exp balay $ 2# 3# This is the makefile for installing PETSc. See the file 4# Installation for directions on installing PETSc. 5# See also bmake/common for additional commands. 6# 7ALL: all 8 9DIRS = src include docs 10 11include ${PETSC_DIR}/bmake/${PETSC_ARCH}/base 12 13# 14# Basic targets to build PETSc libraries. 15# all : builds the c, fortran,f90 libraries 16# fortran : builds the fortran libary 17# f90 : builds the fortran and the f90 libraries. 18# 19all : info chkpetsc_dir deletelibs build_kernels build_c \ 20 shared build_fortran build_fortran90 21fortran : info chkpetsc_dir build_fortran 22fortran90 : fortran build_fortran90 23 24# 25# Prints information about the system and PETSc being compiled 26# 27info: 28 -@echo "==========================================" 29 -@echo On `date` on `hostname` 30 -@echo Machine characteristics: `uname -a` 31 -@echo "-----------------------------------------" 32 -@echo "Using C compiler: ${CC} ${COPTFLAGS}" 33 -@if [ -n "${CCV}" -a "${CCV}" != "unknown" ] ; then \ 34 echo "Compiler version:" `${CCV}` ; fi 35 -@echo "Using Fortran compiler: ${FC} ${FFLAGS} ${FOPTFLAGS}" 36 -@echo "-----------------------------------------" 37 -@grep PETSC_VERSION_NUMBER include/petsc.h | sed "s/........//" 38 -@echo "-----------------------------------------" 39 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 40 -@echo "-----------------------------------------" 41 -@echo "Using configuration flags:" 42 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 43 -@echo "-----------------------------------------" 44 -@echo "Using include paths: ${PETSC_INCLUDE}" 45 -@echo "-----------------------------------------" 46 -@echo "Using PETSc directory: ${PETSC_DIR}" 47 -@echo "Using PETSc arch: ${PETSC_ARCH}" 48 -@echo "------------------------------------------" 49 -@echo "Using C linker: ${CLINKER}" 50 -@echo "Using libraries: ${PETSC_LIB}" 51 -@echo "Using Fortran linker: ${FLINKER}" 52 -@echo "Using Fortran libraries: ${PETSC_FORTRAN_LIB}" 53 -@echo "==========================================" 54 55# 56# Build the PETSc libraries 57# 58build_c: 59 -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 60 -@echo "=========================================" 61 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 62 -@cd ${PETSC_DIR}/src/sys/src/time ; \ 63 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} rs6000_time 64 ${RANLIB} ${PDIR}/*.a 65 -@chmod g+w ${PDIR}/*.a 66 -@echo "Completed building libraries" 67 -@echo "=========================================" 68 69# 70# Builds PETSc Fortran interface libary 71# Note: libfast cannot run on .F files on certain machines, so we 72# use lib and check for errors here. 73 74build_fortran: 75 -@echo "BEGINNING TO COMPILE FORTRAN INTERFACE LIBRARY" 76 -@echo "=========================================" 77 -${RM} -f ${PDIR}/libpetscfortran.* 78 -@cd src/fortran/auto; \ 79 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libfast 80 -@cd src/fortran/custom; \ 81 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 82 grep -v clog trashz | grep -v "information sections" | \ 83 egrep -i '(Error|warning|Can)' >> /dev/null;\ 84 if [ "$$?" != 1 ]; then \ 85 cat trashz ; fi; ${RM} trashz 86 ${RANLIB} ${PDIR}/libpetscfortran.a 87 -@chmod g+w ${PDIR}/*.a 88 -@echo "Completed compiling Fortran interface library" 89 -@echo "=========================================" 90 91# 92# Builds PETSc Fortran90 interface libary 93# Note: F90 interface currently supported in NAG, IRIX, IBM F90 compilers. 94# 95build_fortran90: 96 -@echo "BEGINNING TO COMPILE FORTRAN90 INTERFACE LIBRARY" 97 -@echo "=========================================" 98 -@cd src/fortran/f90; \ 99 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 100 grep -v clog trashz | grep -v "information sections" | \ 101 egrep -i '(Error|warning|Can)' >> /dev/null;\ 102 if [ "$$?" != 1 ]; then \ 103 cat trashz ; fi; ${RM} trashz 104 ${RANLIB} ${PDIR}/libpetscfortran.a 105 -@chmod g+w ${PDIR}/*.a 106 -@echo "Completed compiling Fortran90 interface library" 107 -@echo "=========================================" 108 109# 110# Builds PETSc Fortran kernels; some numerical kernels have 111# a Fortran version that may give better performance on certain 112# machines. These always provide better performance for complex numbers. 113# 114fortrankernels: chkpetsc_dir 115 -${RM} -f ${PDIR}/libpetsckernels.* 116 -@echo "BEGINNING TO COMPILE FORTRAN KERNELS LIBRARY" 117 -@echo "=========================================" 118 -@cd src/fortran/kernels; \ 119 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 120 -@chmod g+w ${PDIR}/*.a 121 -@echo "Completed compiling Fortran kernels library" 122 -@echo "=========================================" 123 124# If fortrankernels are used, build them. 125build_kernels: 126 -@kernel_var=`echo "${PETSCFLAGS}" | sed 's/-DUSE_FORTRAN_KERNELS//g'`; \ 127 if [ "${PETSCFLAGS}" != "$$kernel_var" ] ; then \ 128 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} fortrankernels; fi 129 130petscblas: info chkpetsc_dir 131 -${RM} -f ${PDIR}/libpetscblas.* 132 -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 133 -@echo "=========================================" 134 -@cd src/adic/blas; \ 135 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libfast 136 -@cd src/adic/lapack; \ 137 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 138 ${RANLIB} ${PDIR}/libpetscblas.a 139 -@chmod g+w ${PDIR}/*.a 140 -@echo "Completed compiling C version of BLAS and LAPACK" 141 -@echo "=========================================" 142 143 144# Builds PETSc test examples for a given BOPT and architecture 145testexamples: info chkopts 146 -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 147 -@echo "Due to different numerical round-off on certain" 148 -@echo "machines some of the numbers may not match exactly." 149 -@echo "=========================================" 150 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 151 ACTION=testexamples_1 tree 152 -@echo "Completed compiling and running test examples" 153 -@echo "=========================================" 154 155# Builds PETSc test examples for a given BOPT and architecture 156testfortran: info chkopts 157 -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 158 -@echo "=========================================" 159 -@echo "Due to different numerical round-off on certain" 160 -@echo "machines or the way Fortran formats numbers" 161 -@echo "some of the results may not match exactly." 162 -@echo "=========================================" 163 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 164 ACTION=testexamples_3 tree 165 -@echo "Completed compiling and running Fortran test examples" 166 -@echo "=========================================" 167 168# Builds PETSc test examples for a given BOPT and architecture 169testexamples_uni: info chkopts 170 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 171 -@echo "Due to different numerical round-off on certain" 172 -@echo "machines some of the numbers may not match exactly." 173 -@echo "=========================================" 174 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 175 ACTION=testexamples_4 tree 176 -@echo "Completed compiling and running uniprocessor test examples" 177 -@echo "=========================================" 178testfortran_uni: info chkopts 179 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 180 -@echo "Due to different numerical round-off on certain" 181 -@echo "machines some of the numbers may not match exactly." 182 -@echo "=========================================" 183 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 184 ACTION=testexamples_9 tree 185 -@echo "Completed compiling and running uniprocessor fortran test examples" 186 -@echo "=========================================" 187 188# Ranlib on the libraries 189ranlib: 190 ${RANLIB} ${PDIR}/*.a 191 192# Deletes PETSc libraries 193deletelibs: chkopts_basic 194 -${RM} -f ${PDIR}/* 195 196 197# ------------------------------------------------------------------ 198# 199# All remaining actions are intended for PETSc developers only. 200# PETSc users should not generally need to use these commands. 201# 202 203 204# To access the tags in EMACS, type M-x visit-tags-table and specify 205# the file petsc/TAGS. 206# 1) To move to where a PETSc function is defined, enter M-. and the 207# function name. 208# 2) To search for a string and move to the first occurrence, 209# use M-x tags-search and the string. 210# To locate later occurrences, use M-, 211 212TAGS_INCLUDE_FILES = include/*.h include/pinclude/*.h bmake/*/petscconf.h \ 213 include/finclude/*.h 214TAGS_BMAKE_FILES = bmake/common bmake/*/base* 215TAGS_EXAMPLE_FILES = src/*/examples/*/*.[c,h,F,f] src/*/examples/*/*/*.[c,h,F,f] \ 216 src/benchmarks/*.c src/contrib/*/examples/*/*.[c,h,F,f]\ 217 src/fortran/f90/tests/*.[c,h,F,f] 218TAGS_FEXAMPLE_FILES = src/*/examples/*/*.[F,f] src/*/examples/*/*/*.[F,f] \ 219 src/contrib/*/examples/*/*.[F,f]\ 220 src/fortran/f90/tests/*.[F,f] 221TAGS_DOC_FILES = docs/tex/manual/routin.tex docs/tex/manual/manual.tex \ 222 docs/tex/manual/manual_tex.tex docs/tex/manual/intro.tex \ 223 docs/tex/manual/part1.tex docs/tex/manual/developer.tex docs/tex/manual/part2.tex 224TAGS_SRC_FILES = src/sys/src/*/*.c src/*/*.[c,h] src/*/interface/*.[c,h] src/*/src/*.[c,h] \ 225 src/*/utils/*.[c,h] \ 226 src/*/impls/*.[c,h] src/*/impls/*/*.[c,h] src/*/impls/*/*/*.[c,h] \ 227 src/snes/interface/noise/*.[c,F,h] src/gvec/impls/*/*/*/*/*.[c,h] \ 228 src/contrib/*/*.[c,h] \ 229 src/contrib/*/src/*.[c,h] src/fortran/custom/*.[c,h,F] \ 230 src/fortran/kernels/*.[c,h,F] \ 231 src/fortran/f90/*.[c,h,F] src/fortran/f90/*/*.[c,h,F] \ 232 src/adic/blas/*.c src/lapack/src[1,2,3]/*.c 233TAGS_MAKEFILE_FILES = include/makefile include/*/makefile \ 234 makefile src/sys/src/*/makefile \ 235 src/makefile src/*/makefile src/*/src/makefile \ 236 src/*/interface/makefile \ 237 src/*/utils/makefile \ 238 src/*/impls/makefile src/*/impls/*/makefile src/*/impls/*/*/makefile \ 239 src/snes/interface/noise/makefile src/*/examples/makefile \ 240 src/*/examples/*/makefile src/*/examples/*/*/makefile \ 241 src/gvec/impls/*/*/*/*/makefile src/gvec/impls/*/*/*/makefile \ 242 src/fortran/*/makefile src/fortran/f90/*/makefile \ 243 src/contrib/*/makefile src/contrib/*/src/makefile \ 244 src/contrib/*/examples/makefile src/contrib/*/examples/*/makefile \ 245 src/contrib/sif/*/makefile docs/makefile src/adic/*/makefile \ 246 src/adic/lapack/*/makefile 247 248# Builds all etags files 249alletags: 250 -${OMAKE} etags_complete 251 -${OMAKE} etags 252 -${OMAKE} etags_noexamples 253 -${OMAKE} etags_examples 254 -${OMAKE} etags_makefiles 255 -${OMAKE} ctags 256 257# Builds the basic etags file. This should be employed by most users. 258etags: 259 -${RM} TAGS 260 -etags -f TAGS ${TAGS_INCLUDE_FILES} 261 -etags -a -f TAGS ${TAGS_SRC_FILES} 262 -etags -a -f TAGS ${TAGS_EXAMPLE_FILES} 263 -etags -a -f TAGS ${TAGS_MAKEFILE_FILES} 264 -etags -a -f TAGS ${TAGS_BMAKE_FILES} 265 -chmod g+w TAGS 266 267# Builds complete etags list; only for PETSc developers. 268etags_complete: 269 -${RM} TAGS_COMPLETE 270 -etags -f TAGS_COMPLETE ${TAGS_SRC_FILES} 271 -etags -a -f TAGS_COMPLETE ${TAGS_INCLUDE_FILES} 272 -etags -a -f TAGS_COMPLETE ${TAGS_EXAMPLE_FILES} 273 -etags -a -f TAGS_COMPLETE ${TAGS_MAKEFILE_FILES} 274 -etags -a -f TAGS_COMPLETE ${TAGS_BMAKE_FILES} 275 -etags -a -f TAGS_COMPLETE ${TAGS_DOC_FILES} 276 -chmod g+w TAGS_COMPLETE 277 278# Builds the etags file that excludes the examples directories 279etags_noexamples: 280 -${RM} TAGS_NO_EXAMPLES 281 -etags -f TAGS_NO_EXAMPLES ${TAGS_SRC_FILES} 282 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_INCLUDE_FILES} 283 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_MAKEFILE_FILES} 284 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_BMAKE_FILES} 285 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_DOC_FILES} 286 -chmod g+w TAGS_NO_EXAMPLES 287 288# Builds the etags file for makefiles 289etags_makefiles: 290 -${RM} TAGS_MAKEFILES 291 -etags -f TAGS_MAKEFILES ${TAGS_MAKEFILE_FILES} 292 -etags -a -f TAGS_MAKEFILES ${TAGS_BMAKE_FILES} 293 -chmod g+w TAGS_MAKEFILES 294 295# Builds the etags file for examples 296etags_examples: 297 -${RM} TAGS_EXAMPLES 298 -etags -f TAGS_EXAMPLES ${TAGS_EXAMPLE_FILES} 299 -chmod g+w TAGS_EXAMPLES 300etags_fexamples: 301 -${RM} TAGS_FEXAMPLES 302 -etags -f TAGS_FEXAMPLES ${TAGS_FEXAMPLE_FILES} 303 -chmod g+w TAGS_FEXAMPLES 304 305# 306# To use the tags file from VI do the following: 307# 1. within vi invoke the command - :set tags=/home/bsmith/petsc/vitags 308# or add the command to your ~/.exrc file - set tags=/home/bsmith/petsc/vitags 309# 2. now to go to a tag do - :tag TAGNAME for eg - :tag MatCreate 310# 311ctags: 312 -${RM} vitags 313 -ctags -w -f vitags ${TAGS_INCLUDE_FILES} 314 -ctags -w -a -f vitags ${TAGS_SRC_FILES} 315 -ctags -w -a -f vitags ${TAGS_EXAMPLE_FILES} 316 -ctags -w -a -f vitags ${TAGS_MAKEFILE_FILES} 317 -ctags -w -a -f vitags ${TAGS_BMAKE_FILES} 318 -chmod g+w vitags 319# 320# These are here for the target allci and allco 321# 322 323DOCS = maint/addlinks maint/builddist \ 324 maint/buildlinks maint/wwwman maint/xclude maint/crontab\ 325 bmake/common bmake/*/base* maint/autoftp docs/manualpages/sec/* \ 326 include/foldinclude/generateincludes bin/petscviewinfo.text \ 327 bin/petscoptsinfo.text bmake/*/petscconf.h 328 329# Deletes man pages (HTML version) 330deletemanualpages: 331 ${RM} -f ${PETSC_DIR}/docs/manualpages/man*/* \ 332 ${PETSC_DIR}/docs/manualpages/man?.html \ 333 ${PETSC_DIR}/docs/manualpages/manualpages.cit 334 335# Deletes man pages (LaTeX version) 336deletelatexpages: 337 ${RM} -f ${PETSC_DIR}/docs/tex/rsum/*sum*.tex 338 339# Builds all versions of the man pages 340allmanpages: allmanualpages alllatexpages 341allmanualpages: deletemanualpages 342 -${OMAKE} ACTION=manualpages_buildcite tree 343 -cd src/fortran/custom; ${OMAKE} manualpages_buildcite 344 -cd src/fortran/custom; ${OMAKE} manualpages 345 -${OMAKE} ACTION=manualpages tree 346 -maint/wwwman ${PETSC_DIR} 347 -maint/examplesindex.tcl 348 -maint/htmlkeywords.tcl 349 -@chmod g+w docs/manualpages/man*/* 350 351alllatexpages: deletelatexpages 352 -${OMAKE} ACTION=latexpages tree 353 -cd src/fortran/custom; ${OMAKE} latexpages 354 -@chmod g+w docs/tex/rsum/* 355 356# Builds Fortran stub files 357allfortranstubs: 358 -@include/foldinclude/generateincludes 359 -@${RM} -f src/fortran/auto/*.c 360 -${OMAKE} ACTION=fortranstubs tree 361 -@cd src/fortran/auto; ${OMAKE} -f makefile fixfortran 362 chmod g+w src/fortran/auto/*.c 363 364allci: 365 -@cd src/fortran/custom ; ${OMAKE} BOPT=${BOPT} ci 366 -@cd src/fortran/f90 ; ${OMAKE} BOPT=${BOPT} ci 367 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci tree 368 369allco: 370 -@cd src/fortran/custom ; ${OMAKE} BOPT=${BOPT} co 371 -@cd src/fortran/f90 ; ${OMAKE} BOPT=${BOPT} co 372 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co tree 373 374# 375# The commands below are for generating ADIC versions of the code; 376# they are not currently used. 377# 378alladicignore: 379 -@${RM} ${PDIR}/adicignore 380 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 381 382alladic: 383 -@echo "Beginning to compile ADIC source code in all directories" 384 -@echo "Using ADIC compiler: ${ADIC_CC} ${CFLAGS}" 385 -@echo "=========================================" 386 -@cd include ; \ 387 ${ADIC_CC} -s -f 1 ${CFLAGS} petsc.h 388 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 389 -@cd src/inline ; \ 390 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 391 -@cd src/adic/blas ; \ 392 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 393 -@cd src/adic/lapack ; \ 394 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 395 396alladiclib: 397 -@echo "Beginning to compile ADIC libraries in all directories" 398 -@echo "Using compiler: ${CC} ${COPTFLAGS}" 399 -@echo "-----------------------------------------" 400 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 401 -@echo "-----------------------------------------" 402 -@echo "Using configuration flags:" 403 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 404 -@echo "-----------------------------------------" 405 -@echo "Using include paths: ${PETSC_INCLUDE}" 406 -@echo "-----------------------------------------" 407 -@echo "Using PETSc directory: ${PETSC_DIR}" 408 -@echo "Using PETSc arch: ${PETSC_ARCH}" 409 -@echo "=========================================" 410 -@${RM} -f ${PDIR}/*adic.a 411 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 412 -@cd src/adic/blas ; \ 413 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adiclib 414 -@cd src/adic/lapack ; \ 415 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 416 -@cd src/adic/src ; \ 417 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 418 419# ------------------------------------------------------------------------------- 420# 421# Some macros to check if the fortran interface is up-to-date. 422# 423countfortranfunctions: 424 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 425 cut -d'(' -f1 | tr -s '' ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 426 sed "s/_$$//" | sort > /tmp/countfortranfunctions 427 428countcfunctions: 429 -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s '' ' ' | \ 430 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '' '\012' | \ 431 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 432 433difffortranfunctions: countfortranfunctions countcfunctions 434 -@echo -------------- Functions missing in the fortran interface --------------------- 435 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 436 -@echo ----------------- Functions missing in the C interface ------------------------ 437 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 438 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 439 440checkbadfortranstubs: 441 -@echo "=========================================" 442 -@echo "Functions with MPI_Comm as an Argument" 443 -@echo "=========================================" 444 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 445 tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 446 -@echo "=========================================" 447 -@echo "Functions with a String as an Argument" 448 -@echo "=========================================" 449 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 450 tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 451 -@echo "=========================================" 452 -@echo "Functions with Pointers to PETSc Objects as Argument" 453 -@echo "=========================================" 454 -@cd ${PETSC_DIR}/src/fortran/auto; \ 455 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s '' ' ' | \ 456 cut -d' ' -f 3 | tr -s '' '\012' | grep -v '{' | cut -d'*' -f1 | \ 457 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 458 for OBJ in $$_p_OBJ; do \ 459 grep "$$OBJ \*" *.c | tr -s '' ' ' | tr -s ':' ' ' | \ 460 cut -d'(' -f1 | cut -d' ' -f1,3; \ 461 done 462# Builds noise routines (not yet publically available) 463# Note: libfast cannot run on .F files on certain machines, so we 464# use lib and check for errors here. 465noise: info chkpetsc_dir 466 -@echo "Beginning to compile noise routines" 467 -@echo "=========================================" 468 -@cd src/snes/interface/noise; \ 469 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 470 grep -v clog trashz | grep -v "information sections" | \ 471 egrep -i '(Error|warning|Can)' >> /dev/null;\ 472 if [ "$$?" != 1 ]; then \ 473 cat trashz ; fi; ${RM} trashz 474 ${RANLIB} ${PDIR}/libpetscsnes.a 475 -@chmod g+w ${PDIR}/libpetscsnes.a 476 -@echo "Completed compiling noise routines" 477 -@echo "=========================================" 478 479