xref: /petsc/makefile (revision 35ca73491e0f9bc7298675751817f0c1af282d30)
16b5873e3SBarry SmithIPETSCDIR = .
261523587SBarry Smith
36b5873e3SBarry SmithCFLAGS   = $(OPT) -I$(IPETSCDIR)/include -I.. -I$(IPETSCDIR) $(CONF)
461523587SBarry SmithSOURCEC  =
561523587SBarry SmithSOURCEF  =
66f817ba4SBarry SmithSOURCEH  = Changes Machines Readme maint/addlinks maint/buildtest \
7bcfa8486SBarry Smith           maint/builddist FAQ Installation Performance BugReporting\
8deb7fc1cSBarry Smith           maint/buildlinks maint/wwwman maint/xclude maint/crontab\
96b2e9f06SBarry Smith           bmake/common bmake/*/*.*
1061523587SBarry SmithOBJSC    =
1161523587SBarry SmithOBJSF    =
1261523587SBarry SmithLIBBASE  = libpetscvec
13b16a3bb1SBarry SmithDIRS     = src include docs
1461523587SBarry Smith
157857610eSBarry Smithinclude $(IPETSCDIR)/bmake/$(PETSC_ARCH)/$(PETSC_ARCH)
1661523587SBarry Smith
177857610eSBarry Smithall: chkpetsc_dir
184e04c1a0SBarry Smith	-$(RM) -f $(PDIR)/*.a
19e35bd481SBarry Smith	-@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \
20f3848965SBarry Smith           ACTION=libfast  tree
214e04c1a0SBarry Smith	$(RANLIB) $(PDIR)/*.a
2261523587SBarry Smith
23*35ca7349SBarry Smith#
24*35ca7349SBarry Smith#  libfast cannot run on .F files on certain machines thus we
25*35ca7349SBarry Smith# use lib and check for errors here.
26*35ca7349SBarry Smith#
2783f0b094SBarry Smithfortran: chkpetsc_dir
28b16a3bb1SBarry Smith	-@cd src/fortran/custom; \
29*35ca7349SBarry Smith          $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \
30*35ca7349SBarry Smith          grep -v clog trashz | grep -v "information sections" | \
31*35ca7349SBarry Smith          egrep -i '(Error|warning|Can)' >> /dev/null;\
32*35ca7349SBarry Smith          if [ "$$?" != 1 ]; then \
33*35ca7349SBarry Smith          cat trashz ; fi; $(RM) trashz
34b16a3bb1SBarry Smith	-@cd src/fortran/auto; \
35*35ca7349SBarry Smith          $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast
3683f0b094SBarry Smith	$(RANLIB) $(PDIR)/libpetscfortran.a
3783f0b094SBarry Smith
388c37ef55SBarry Smithranlib:
394e04c1a0SBarry Smith	$(RANLIB) $(PDIR)/*.a
4061523587SBarry Smith
4161523587SBarry Smithdeletelibs:
424e04c1a0SBarry Smith	-$(RM) -f $(PDIR)/*.a $(PDIR)/complex/* $(PDIR)/c++/*
43d44968ceSBarry Smith
44d44968ceSBarry Smithdeletemanpages:
457857610eSBarry Smith	$(RM) -f $(PETSC_DIR)/Keywords $(PETSC_DIR)/docs/man/man*/*
46d44968ceSBarry Smith
47b346654fSBarry Smithdeletewwwpages:
487857610eSBarry Smith	$(RM) -f $(PETSC_DIR)/docs/www/man*/* $(PETSC_DIR)/docs/www/www.cit
49b346654fSBarry Smith
50b346654fSBarry Smithdeletelatexpages:
517857610eSBarry Smith	$(RM) -f $(PETSC_DIR)/docs/tex/rsum/*sum*.tex
5220563c6bSBarry Smith
53126c565eSBarry Smithallmanpages: deletemanpages deletewwwpages deletelatexpages
54126c565eSBarry Smith	-make ACTION=manpages tree
55126c565eSBarry Smith	-make ACTION=wwwpages tree
56126c565eSBarry Smith	-make ACTION=latexpages tree
57126c565eSBarry Smith	-maint/wwwman
58126c565eSBarry Smith
5983f0b094SBarry Smithallfortranstubs:
6083f0b094SBarry Smith	-@$(RM) $(PETSC_DIR)/fortran/auto/*.c
6183f0b094SBarry Smith	-make ACTION=fortranstubs tree
6297be1f8bSBarry 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
6920563c6bSBarry Smithetags:
70edd2f0e1SBarry Smith	$(RM) TAGS
7170a6ad8cSBarry Smith	etags -f TAGS    src/*/impls/*/*.h src/*/impls/*/*/*.h
72ba6aed2eSLois Curfman McInnes	etags -a -f TAGS src/*/examples/*.c src/*/examples/*/*.c
739b0d1189SLois Curfman McInnes	etags -a -f TAGS src/*/*.h src/*/src/*.c src/*/impls/*/*.c
74d60b1e76SLois Curfman McInnes	etags -a -f TAGS src/*/impls/*/*/*.c src/*/impls/*/*/*/*.c
75b16a3bb1SBarry Smith	etags -a -f TAGS include/*.h include/pinclude/*.h bmake/common
7670a6ad8cSBarry Smith	etags -a -f TAGS src/*/impls/*.c src/*/utils/*.c
77f5354500SBarry Smith	etags -a -f TAGS makefile src/*/src/makefile src/makefile
78f5354500SBarry Smith	etags -a -f TAGS src/*/impls/makefile src/*/impls/*/makefile
793ebb8ef7SBarry Smith	etags -a -f TAGS src/*/utils/makefile src/*/examples/makefile
803ebb8ef7SBarry Smith	etags -a -f TAGS src/*/makefile src/*/impls/*/*/makefile
810675aaacSBarry Smith	etags -a -f TAGS bmake/common bmake/sun4/sun4* bmake/rs6000/rs6000*
82deb7fc1cSBarry Smith	etags -a -f TAGS bmake/solaris/solaris*
830675aaacSBarry Smith	etags -a -f TAGS bmake/IRIX/IRIX* bmake/freebsd/freebsd*
84017faef8SBarry Smith	etags -a -f TAGS bmake/hpux/hpux* bmake/alpha/alpha*
850675aaacSBarry Smith	etags -a -f TAGS bmake/t3d/t3d* bmake/paragon/paragon*
8670a6ad8cSBarry Smith	etags -a -f TAGS docs/tex/routin.tex  docs/tex/manual.tex
876f817ba4SBarry Smith	etags -a -f TAGS docs/tex/intro.tex  docs/tex/part1.tex
8828988994SBarry Smith	chmod g+w TAGS
89bfce26a3SBarry Smith
90bfce26a3SBarry Smithetags_noexamples:
91bfce26a3SBarry Smith	$(RM) TAGS_NO_EXAMPLES
92bfce26a3SBarry Smith	etags -f TAGS_NO_EXAMPLES src/*/impls/*/*.h src/*/impls/*/*/*.h
93464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES src/*/*.h src/*/src/*.c src/*/impls/*/*.c
94464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES src/*/impls/*/*/*.c src/*/impls/*/*/*/*.c
95b16a3bb1SBarry Smith	etags -a -f TAGS_NO_EXAMPLES include/*.h include/pinclude/*.h
96b16a3bb1SBarry Smith	etags -a -f TAGS_NO_EXAMPLES  bmake/common
97464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES src/*/impls/*.c src/*/utils/*.c
98464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES makefile src/*/src/makefile src/makefile
99464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES src/*/impls/makefile src/*/impls/*/makefile
100464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES src/*/utils/makefile
101464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES src/*/makefile src/*/impls/*/*/makefile
102464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES bmake/common bmake/sun4/sun4*
103464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES bmake/rs6000/rs6000*
104464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES bmake/solaris/solaris*
105464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES bmake/IRIX/IRIX* bmake/freebsd/freebsd*
106464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES bmake/hpux/hpux* bmake/alpha/alpha*
107464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES bmake/t3d/t3d* bmake/paragon/paragon*
108464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES docs/tex/routin.tex  docs/tex/manual.tex
109464493b3SBarry Smith	etags -a -f TAGS_NO_EXAMPLES docs/tex/intro.tex  docs/tex/part1.tex
110bfce26a3SBarry Smith	chmod g+w TAGS_NO_EXAMPLES
111b16a3bb1SBarry Smith
112b16a3bb1SBarry Smithetags_makefiles:
113b16a3bb1SBarry Smith	$(RM) TAGS_MAKEFILES
114b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/common
115b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES makefile src/*/src/makefile src/makefile
116b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES src/*/impls/makefile src/*/impls/*/makefile
117b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES src/*/utils/makefile
118b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES src/*/makefile src/*/impls/*/*/makefile
119b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/common bmake/sun4/sun4*
120b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/rs6000/rs6000*
121b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/solaris/solaris*
122b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/IRIX/IRIX* bmake/freebsd/freebsd*
123b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/hpux/hpux* bmake/alpha/alpha*
124b16a3bb1SBarry Smith	etags -a -f TAGS_MAKEFILES bmake/t3d/t3d* bmake/paragon/paragon*
125b16a3bb1SBarry Smith	chmod g+w TAGS_MAKEFILES
126