Overview of the aipsview Makefile
2/2002
The standard procedure for compiling aipsview is:
- Create a directory, src, for the source code and another for the objects.
.------. src myobjs
- Make the symbolic link:
avRCS -> /home/monet/aipsview/VersionControl/RCS
- co avRCS/Makefile.common,v Makefile.common
- gmake -f Makefile.common checkout
The following links will be made and needed files checked out. pgcrvlRCS -> /appl/aips++/weekly/rcs/trial/fortran RCS -> /appl/aips++/weekly/rcs/trial/apps/aipsview wcsRCS -> /appl/aips++/weekly/rcs/aips/wcslib
There are Makefile.<os> for each operating system.
5) cd to the object directory and make Makefile a symbolic link to
Makefile.common in the source directory:
ln -s ../src/Makefile.common Makefile If you try running make from the source directory, it will create ../<osname>, cd to it, create the link and start building.
6) Optional type 'gmake depend'
7) gmake
The Makefile expects the source directory to be at "../src". This can be changed. (See below).
- Targets
# Used within the build directory.
all: (default) Builds aipsview aipsview: Builds aipsview clean: Removes objects and other files. depend: Creates dependency file.
# These need to be done from the source directory
check: Checks to see which files need to be checked out. checkout: Checks out out of date files.
Customizations.
There are a number of macros that can be set from the command line: OPT, DEBUG, TCL, GLISH, SRCDIR, GNU, BIG. Their definitions are below. Alternatively, they can be set in the file "Makefile.local" located within the object directory. eg.
OPT=1
SRCDIR=../mysource
Makefile.local is meant for compile specific customizations and will need to be created whenever a non standard build is desired.
Other than the macros listed above, most macros are probably best not changed in the Makefile.local. Study the Makefile to see if others will work.
An incomplete list of macros.
Macro Default Function
-----------------------------------------------------------------------------
OPT[=1] 0 Enable optimizations
DEBUG[=1] On if OPT Enable debugging.
is 0
OPTIMIZEFLAGS=-O Compiler flags used for optimization.
DEBUGFLAGS=-g Compiler flags used for debugging.
TCL[=1] 0 Enable TCL support.
GLISH[=1] 0 Enable Glish support.
GNU[=1] Defined for Enable GNU compilers.
Linux, otherwise = 0.
If GNU is not 0
CXX=CC CC C++ compiler
CC=cc cc c compiler
FC=f77 f77 FORTRAN compiler.
If GNU is 1:
CXX g++ C++ compiler
CC gcc c compiler
FC g77 FORTRAN compiler.
COMPILEFLAGS empty Added to C, C++ & FORTRAN flags.
CXXFLAGS [OPTIMIZEFLAGS | DEBUGFLAGS] C++ Flags
CFLAGS [OPTIMIZEFLAGS | DEBUGFLAGS] C Flags
FFLAGS [OPTIMIZEFLAGS | DEBUGFLAGS] FORTRAN Flags
CXXDEPFLAG=-M Flags to tell C/C++ compilers to do dependencies
CCDEPFLAG=-M
BIG[=1] 0 Enable 64 bit compiles. (IRIX & Solaris).
SRCDIR=../src Path to source files.
LOCAL[=/usr/local] Generic prefix of where to find pgplot,
tcl and glish libraries.
MOTIF2[=1] undef If defined add -lXpm.
xxxPATH = < path to where xxx is kept>. eg. /usr/local
xxxINCS = -I<xxx/include> Default: $(xxxPATH)/include xxxLIBS = -lyyy -lzzz ... Default: xxxLIBD = -L<xxx/lib> ... Default: -L$(xxxPATH)/lib
Except for Motif, the various xxx paths default to $(LOCAL). The default for Motif is to assume Motif is in the automatically searched paths.
MOTIFPATH= undef Additional path(s) to look for Motif/X libraries.
BASICLIBS -lm Extra required libraries.
To undefine macro 'M' use the construct:
M=
(Set it to nothing).
