Non-Confidential | ![]() | DUI0774J | ||
| ||||
Home > Compiler Command-line Options > -MP |
Emits dummy dependency rules.
These rules work around make errors that are generated if you remove header files without a corresponding update to the makefile.
-MP
option only has an effect when
used in conjunction with the -M
, -MD
, -MM
, or -MMD
options.This example sends dependency rules to standard output, without compiling the source.
source.c
includes a header file:
#include <stdio.h> int main(void){ puts("Hello world\n"); return 0; }
This first example is compiled without the -MP
option, and results in a dependency rule for
source.o
:
armclang --target=aarch64-arm-none-eabi -mcpu=cortex-a53 -M source.c source.o: source.c \ /include/stdio.h
This second example is compiled with the -MP
option, and results in a dependency rule for source.o
and a dummy
rule for the header file:
armclang --target=aarch64-arm-none-eabi -mcpu=cortex-a53 -M -MP source.c source.o: source.c \ /include/stdio.h /include/stdio.h: