[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a way to work around the following oddity with % in GNU Mak
From: |
Andrew Koenig |
Subject: |
Re: Is there a way to work around the following oddity with % in GNU Make? |
Date: |
28 Sep 2005 11:31:33 -0700 |
User-agent: |
G2/0.2 |
I may have misspoken, because the example above works -- but it is also
an oversimplification. Here's another try.
In one place in my makefile (that is included, because it appears in
many related makefiles), I would like to say this:
%.exe: %.o
$(CC) -o $@ $^
Subsequently in the same makefile, I would like to add lib.o as a
dependency to every .exe file in this directory, which one would think
I could do by saying
%.exe: lib.o
This doesn't work because it overrides the previous rule.