02.05.2013 Views

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using CC<br />

Generic<br />

Command-line<br />

Format<br />

Using the Generic CC Interface<br />

UNIX-based systems, the configuration file is /etc/compiler.ccg.<br />

Alternatively, you can set the CCG environment variable to point to<br />

another configuration file.<br />

<strong>The</strong> online reference for cc provides information on writing your<br />

own configuration files, if you want to use an unsupported compiler<br />

or linker. Certainly, the best way to start is copy and modify one of<br />

the provided configuration files.<br />

<strong>The</strong> cc command is installed in the same directory as the make<br />

command. If this directory is in your search rules, you can call the<br />

command by using the name cc.<br />

<strong>The</strong> supplied default rules file defines the CC macro to refer to your<br />

favorite C compiler. For example, if you use the Borland C compiler,<br />

it would contain<br />

CC = bcc<br />

LD = bcc<br />

To use CC, you would edit your default rules file to<br />

CC = cc<br />

LD = cc<br />

From this point on $(CC) and $(LD) invoke cc instead of your<br />

chosen compiler or linker. Since the installation process sets up<br />

appropriate configuration files, cc converts its generic command line<br />

to the format required by your chosen compiler and linker before<br />

invoking that compiler or linker.<br />

<strong>The</strong> cc command uses the following generic command-line format<br />

for compilation:<br />

cc -c [options] file…<br />

where each option begins with a dash.<br />

For example, the recommended way of selecting compiler memory<br />

models is with the -mmodel option. If you are using Microsoft C<br />

version 6.0 and want a large model program, you enter<br />

cc -c -ml file<br />

instead of using the /AL option. You could still use the /AL option, but<br />

your makefile would not be portable.<br />

<strong>The</strong> files specified on the command line are the C source files you<br />

want compiled. cc invokes your chosen compiler to compile each<br />

source file.<br />

<strong>User</strong> <strong>Guide</strong> 303

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!