-MF

Description

Specifies the target for the output generated by the -qmakedep or -M option.

Syntax

Read syntax diagramSkip visual syntax diagram>>- -MF--file--------------------------------------------------><

file is the target output path which can be a file or directory.

Example

Table 43.
Command line Generated dependency file
xlc -c -qmakedep mysource.c mysource.u
xlc -c -qmakedep foo_src.c -MF mysource.d mysource.u
xlc -c -qmakedep foo_src.c -MF ../deps/mysource.d ../deps/mysource.u
xlc -c -qmakedep foo_src.c -MF /tmp/mysource.d /tmp/mysource.u
xlc -c -qmakedep foo_src.c -o foo_obj.o foo_obj.u
xlc -c -qmakedep foo_src.c -o foo_obj.o -MF mysource.d mysource.u
xlc -c -qmakedep foo_src.c -MF mysource1.d -MF mysource2.d mysource2.u
xlc -c -qmakedep foo_src1.c foo_src2.c -MF mysource.d mysource.u ( It contains rules for foo_src2.d source file)
xlc -c -qmakedep foo_src1.c foo_src2.c -MF /tmp

/tmp/foo_src1.u

/tmp/foo_src2.u

Notes

-MF has effect only if specified with either the -qmakedep or the -M option.

If file is the name of a directory, the dependency file generated by the compiler will be placed into the specified directory, otherwise if you do not specify any path for file , the dependency file will be stored in the current working directory.

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

If you specify -MF option when compiling multiple source files, only a single dependency file will be generated and it will contain the make rule for the last file specified on the command line.

Related information