You copied the Doc URL to your clipboard.

-M

Produces a list of makefile dependency rules suitable for use by a make utility.

The compiler executes only the preprocessor step of the compilation. By default, output is on the standard output stream.

If you specify multiple source files, a single dependency file is created.

Note

The -MT option lets you override the target name in the dependency rules.

Note

The -MD option lets you compile the source files as well as produce makefile dependency rules.

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

Related reference

Was this page helpful? Yes No