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