armclang executes only the preprocessor step of the compilation or assembly.
By default, output is on the standard output stream.
If you specify multiple source files, a single dependency file is
created.
-M
lists both system header files
and user header files.
-MM
lists only user header
files.
Note:
The -MT
option lets you override
the target name in the dependency rules.
Note:
To compile or assemble the source files and produce makefile dependency rules,
use the -MD
or -MMD
option instead of the -M
or
-MM
option respectively.
Note:
Only dependencies visible to the preprocessor
are included. Files added using the GNU assembler syntax .incbin
or .include
directives (or
armasm syntax INCBIN
, INCLUDE
, or GET
directives) are not
included.
Example
You can redirect output to a file using standard UNIX and MS-DOS notation, the -o
option, or the -MF
option. For
example:
armclang --target=arm-arm-none-eabi -march=armv8-a -M source
.c > deps.mk
armclang --target=arm-arm-none-eabi -march=armv8-a -M source
.c -o deps.mk
armclang --target=arm-arm-none-eabi -march=armv8-a -M source
.c -MF deps.mk