-MT

Category

Output control

@PROCESS

None.

Purpose

Specifies the target name of the object file in the make rule in the dependency output file that is generated by the -qmakedep or -M option.

For more information about the -qmakedep and -M options, see -qmakedep and -M.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -MT--target------------------------------------------------><

Defaults

If -MT is not specified, the target name is the base name of the object file.

Parameters

target
The name that you specify for the object file in the generated dependency file.

Usage

Only one target is accepted. If you specify multiple -MT options, the target from the last -MT option is used.

Examples

A source file named mysource.f contains the following code:
#include "options.h"
MODULE m
  USE n

CONTAINS
  SUBROUTINE sub
    IMPLICIT NONE
    INCLUDE 'constants.h'
    CALL my_print(pi)
  END SUBROUTINE
END MODULE
To compile mysource.f and create a dependency output file named mysource.u, and also to include path information /home/user/sample/ as part of the target name of the object file in the mysource.u file, enter:
xlf -c -qmakedep mysource.f -MT '/home/user/sample/mysource.o'
The generated mysource.u file is as follows:
/home/user/sample/mysource.o m.mod: n.mod
/home/user/sample/mysource.o m.mod: option.h
/home/user/sample/mysource.o m.mod: mysource.f
/home/user/sample/mysource.o m.mod: constants.h

Related information