Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

Compiler Command-Line Driver
2012-2013 Microchip Technology Inc. DS50002071C-page 101
-M Tell the preprocessor to output a rule suitable for make describ-
ing the dependencies of each object file. For each source file,
the preprocessor outputs one make-rule whose target is the
object file name for that source file and whose dependencies
are all the #include header files it uses. This rule may be a
single line or may be continued with \-newline if it is long. The
list of rules is printed on standard output instead of the prepro-
cessed C program.
-M implies -E (see Section 5.7.2 Options for Controlling the
Kind of Output).
-MD Like -M but the dependency information is written to a file and
compilation continues. The file containing the dependency infor-
mation is given the same name as the source file with a .d
extension.
-MF file When used with -M or -MM, specifies a file in which to write the
dependencies. If no -MF switch is given, the preprocessor
sends the rules to the same place it would have sent
preprocessed output.
When used with the driver options, -MD or -MMD, -MF,
overrides the default dependency output file.
-MG Treat missing header files as generated files and assume they
live in the same directory as the source file. If -MG is specified,
then either -M or -MM must also be specified. -MG is not
supported with -MD or -MMD.
-MM Like -M but the output mentions only the user header files
included with #include file. System header files included
with #include <file> are omitted.
-MMD Like -MD except mention only user header files, not system
header files.
-MP This option instructs CPP to add a phony target for each depen-
dency other than the main file, causing each to depend on noth-
ing. These dummy rules work around errors make gives if you
remove header files without updating the make-file to match.
This is typical output:
test.o: test.c test.h
test.h:
-MQ
Same as -MT, but it quotes any characters which are special to
make.
-MQ '$(objpfx)foo.o' gives $$(objpfx)foo.o:
foo.c
The default target is automatically quoted, as if it were given
with -MQ.
-MT target Change the target of the rule emitted by dependency
generation. By default, CPP takes the name of the main input
file, including any path, deletes any file suffix such as .c, and
appends the platforms usual object suffix. The result is the
target.
An -MT option will set the target to be exactly the string you
specify. If you want multiple targets, you can specify them as a
single argument to -MT, or use multiple -MT options.
For example:
-MT '$(objpfx)foo.o' might give $(objpfx)foo.o:
foo.c
TABLE 5-14: PREPROCESSOR OPTIONS (CONTINUED)
Option Definition

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh