Changing the Compiler’s Behavior With Environment Variables
2-22
In the following examples, each time you run the compiler shell, it runs the
linker. Any options following
−
z on the command line or in C_OPTION are
passed to the linker. This enables you to use the C_OPTION environment vari-
able to specify default compiler and linker options and then specify additional
compiler and linker options on the shell command line. If you have set
−
z in
the environment variable and want to compile only, use the
−
c option of the
shell. These additional examples assume C_OPTION is set as shown above:
dspcl *c ; compiles and links
dspcl −c *.c ; only compiles
dspcl *.c −z lnk.cmd ; compiles and links using a
; command file
dspcl −c *.c −z lnk.cmd ; only compiles (−c overrides −z)
For more information about shell options, see section 2.3,
Changing the
Compiler’s Behavior With Options
, on page 2-6. For more information about
linker options, see section 4.4,
Linker Options
2.4.2 Specifying a Temporary File Directory (TMP)
The compiler shell program creates intermediate files as it processes your
program. By default, the shell puts intermediate files in the current directory.
However, you can name a specific directory for temporary files by using the
TMP environment variable.
Using the TMP environment variables allows use of a RAM disk or other file
systems. It also allows source files to be compiled from a remote directory
without writing any files into the directory where the source resides. This is
useful for protected directories.
The table below shows how to set the TMP environment variable. Select the
command for your operating system:
Operating System
Enter
DOS or OS/2
set TMP=
pathname
UNIX with C shell
setenv TMP ”
pathname
”
UNIX with Bourne or Korn
shell
TMP=”
pathname
”
export TMP
Note:
For UNIX workstations, be sure to enclose the directory name within quotes.
For example, to set up a directory named temp for intermediate files on your
hard drive for Windows, enter:
set TMP=c:\temp
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...