Creates an output file that contains targets suitable for inclusion in a description file for the make command.
The -qmakedep option is functionally identical to the -M option.
.d files are not make files; .d files must be edited before they can be used with the make command. For more information on this command, see your operating system documentation.
If you do not specify the -o option, the output file generated by the -qmakedep option is created in the current directory. It has a .d suffix. For example, the command:
xlc++ -qmakedep person_years.C
produces the output file person_years.d.
A .d file is created for every input file with a .c, .C, .cpp, or .i suffix. Also, when compiling C++ programs with the -+ compiler option in effect, any file suffix is accepted and a .d file produced. Otherwise, output .d files are not created for any other files.
For example, the command:
xlc++ -qmakedep conversion.C filter.C /lib/libm.a
produces two output files, conversion.d and filter.d (and an executable file as well). No .d file is created for the library.
If the current directory is not writable, no .d file is created. If you specify -o file_name along with -qmakedep, the .d file is placed in the directory implied by -ofile_name. For example, for the following invocation:
xlc++ -qmakedep -c t.C -o /tmp/t.o
places the .d output file in /tmp/t.d.
The output file contains a line for the input file and an entry for each include file. It has the general form:
file_name.o:include_file_name file_name.o:file_name.C
Include files are listed according to the search order rules for the #include preprocessor directive, described in Directory Search Sequence for Include Files Using Relative Path Names. If the include file is not found, it is not added to the .d file.
Files with no include statements produce output files containing one line that lists only the input file name.
Compiler Command Line Options
M
o
Directory Search Sequence for Include Files Using Relative Path Names