-ObjN: Object filename specification

Group

Output

Scope

Assembly Unit

Syntax
  -ObjN<FileName>
  
  
Arguments

<FileName>: Name of the binary output file generated.

Default

-ObjN%n.o when generating a relocatable file or

-ObjN%n.abs when generating an absolute file.

Description

Normally, the object file has the same name than the processed source file, but with the .o extension when relocatable code is generated or the .abs extension when absolute code is generated. This option allows a flexible way to define the output filename. The modifier %n can also be used. It is replaced with the source filename. If <file> in this option contains a path (absolute or relative), the OBJPATH environment variable is ignored.

Example

For ASMOPTIONS=-ObjNa.out, the resulting object file will be a.out. If the OBJPATH environment variable is set to \src\obj, the object file will be \src\obj\a.out.

  For 
  fibo.c -ObjN%n.obj, the resulting object file will be 
  fibo.obj.

  

For myfile.c -ObjN..\objects\_%n.obj, the object file will be named relative to the current directory to ...\objects\_myfile.obj. Note that the environment variable OBJPATH is ignored, because <file> contains a path.

See also

OBJPATH: Object file path environment variable