HP C A.06.05 Reference Manual

Compiling and Running HP C Programs
Compiling HP C Programs
Chapter 9 223
For example, the following in C shell notation
setenv CCOPTS -v
cc -g prog.c
is equivalent to
cc -v -g prog.c
For example, the following in C shell notation
setenv CCOPTS "-v | +O1"
cc +O2 prog.c
is equivalent to
cc -v +O2 prog.c +O1
In the above example, level 1 optimization is performed, since the +O1 argument appearing
after the vertical bar in CCOPTS takes precedence over the cc command line arguments.
CCROOTDIR Environment Variable
The CCROOTDIR environment variable causes aCC to invoke all subprocesses from an alternate
aCC directory, rather than from their default directory. The default aCC root directory is
/opt/aCC.
Syntax:
export CCROOTDIR=
directory ksh/sh notation
setenv CCROOTDIR
directory csh notation
directory
is an aCC root directory where you want the HP aC++ driver to search for
subprocesses.
Example:
export CCROOTDIR=/mnt/CXX2.1
In this example, HP aC++ searches the directories under /mnt/CXX2.1 (/mnt/CXX2.1/bin
and /mnt/CXX2.1/lbin) for subprocesses rather than their respective default directories.
TMPDIR Environment Variable
Another environment variable, TMPDIR, allows you to change the location of temporary files
that the compiler creates and uses. The directory specified in TMPDIR replaces /var/tmp as
the default directory for temporary files. The syntax for TMPDIR in C shell notation is:
export TMPDIR=directory (ksh/sh notation)
setenv TMPDIR directory (csh notation)