Sorry, I don&#x27;t follow. I am doing out-of-tree builds?<p>The problem is that there is no way to generate multiple files from one rule. If you write:<p><pre><code>    $(OBJDIR)&#x2F;foo.o: src&#x2F;foo.c
</code></pre>
...you get <i>one</i> rule, which will build <i>one</i> object file. If you want to generate two object files with two different settings, you have to have two rules.<p><pre><code>    $(OBJDIR1)&#x2F;foo.o: src&#x2F;foo.c
    $(OBJDIR2)&#x2F;foo.o: src&#x2F;foo.c
</code></pre>
There is no way round this. Target-specific variables look like they solve this, but they basically don&#x27;t work for anything useful. There are only three options here: (1) hardcode multiple rules; (2) use make macros to generate multiple rules; (3) invoke the makefile multiple times with different settings. All of these options are horrible.