-MF

Category

Output control

@PROCESS

None.

Purpose

Specifies the name or location for the dependency output files that are 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
>>- -MF--file_path---------------------------------------------><

Defaults

If -MF is not specified, the dependency output file is generated in the current working directory. The file has the same base name as the object file, but with a .d suffix.

Parameters

file_path
The name or location of the generated dependency output file. file_path can be the path name of a file or a directory. It can be relative or absolute.

If file_path is the name of an existing directory, the generated dependency output file is placed in the specified directory. It will have the same base name as the generated object file, but with a .d suffix. Otherwise, file_path is the name of the generated dependency output file.

For more information, see the Examples section.

Usage

If the file specified by -MF option already exists, it will be overwritten.

If you specify a single file name for the -MF option when you compile multiple source files, only a single dependency file will be generated. The dependency file contains the make rule for the last file specified on the command line.

Examples

To compile source.f and create a dependency output file named mysource.d, enter:
xlf -c -qmakedep source.f -MF mysource.d 
To compile source1.f and source2.f and create two dependency output files, named source1.d and source2.d, respectively, in the /project/deps/ directory, enter:
xlf -c -qmakedep source1.f source2.f -MF /project/deps/
To compile source.f and create a dependency output file named mysource.d in the deps/ directory, enter:
xlf -c -qmakedep source.f -MF deps/mysource.d
To compile source.f and create an object file named object.o and a dependency output file named mysource.d, enter:
xlf -c -qmakedep source.f -o object.o -MF mysource.d

Related information