Specifying Compilation Output Overview

When compiling and linking a set of source files, you can use the -o or -S option to give the resulting file a name other than that of the first source or object file on the command line.

-c

Compile to object only (.o), do not link.

-S

Produce assembly file or directory for multiple assembly files. The compilation stops at producing the assembly file.

-ofile

Produce an output file based on the phase options used previously: none, -c or -S. If no phase option has been used, produces an executable and places it in specified file.  Combined with -S, indicates assembly file or directory for multiple assembly files.
Combined with -c, indicates object file name or directory for multiple object files.

If you are processing a single file, you can use the -ofile option to specify an alternate name for an object file (.o), an assembly file (.s) or an executable file. You can also use these options to override the default filename extensions: .o and .s.

See Compilation Output options summary.