15.1. Our Makefile System

Up: Contents Next: Makefile Commands Previous: Makefiles

To make a program named ex1, one may use the command

   make BOPT=[g,O] PETSC_ARCH=arch  ex1 
which will compile a debugging, optimized, or profiling version of the example and automatically link the appropriate libraries. The architecture, arch, is one of sun4, solaris, rs6000, IRIX, hpux, etc. Note that when using command line options with make (as illustrated above), one must not place spaces on either side of the ``='' signs. The variables BOPT and PETSC_ARCH can also be set as environmental variables. Although PETSc is written in C, it can be compiled with a C++ compiler. For many C++ users this may be the preferred route. To compile with the C++ compiler, one should use the option BOPT=g_c++ or BOPT=O_c++. The options BOPT=g_complex and BOPT=O_complex will create versions that use complex double-precision numbers.


Up: Contents Next: Makefile Commands Previous: Makefiles