5.7.8.15 MT: Change Rule Target Option
The -MT
target option changes the target of the rule
emitted by dependency generation.
By default, the preprocessor takes the name of the main input file, including any path,
deletes any file suffix such as .c
, and appends the platform’s usual
object suffix. The result is the target. An -MT
option sets 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