Specifies the target for the output generated by the -qmakedep or -M option.
>>- -MF--file--------------------------------------------------><
file is the target output path which can be a file or directory.
Command line | Generated dependency file |
---|---|
xlc -c -qmakedep mysource.c | mysource.d |
xlc -c -qmakedep foo_src.c -MF mysource.d | mysource.d |
xlc -c -qmakedep foo_src.c -MF ../deps/mysource.d | ../deps/mysource.d |
xlc -c -qmakedep foo_src.c -MF /tmp/mysource.d | /tmp/mysource.d |
xlc -c -qmakedep foo_src.c -o foo_obj.o | foo_obj.d |
xlc -c -qmakedep foo_src.c -o foo_obj.o -MF mysource.d | mysource.d |
xlc -c -qmakedep foo_src.c -MF mysource1.d -MF mysource2.d | mysource2.d |
xlc -c -qmakedep foo_src1.c foo_src2.c -MF mysource.d | mysource.d ( It contains rules for foo_src2.d source file) |
xlc -c -qmakedep foo_src1.c foo_src2.c -MF /tmp |
/tmp/foo_src1.d /tmp/foo_src2.d |
-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