[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can gnu make do this?
From: |
Paul D. Smith |
Subject: |
Re: can gnu make do this? |
Date: |
Thu, 20 Dec 2001 11:31:27 -0500 |
%% "Mr. Feed" <address@hidden> writes:
f> compile several executable based on different .o set, and have a
f> generic make file to compile them.
f> aaaOBJS = a.o, aa.o
f> bbbOBJS = b.o, bb.o
f> I want to do:
f> $(OBJDIR)/%: $(%OBJS)
f> i.e. use different set of .o file set based on the stem name.
No, not really.
You have to list the prerequisites explicitly. You don't have to
rewrite the rule every time, though:
$(OBJDIR)/aaa: a.o aa.o
$(OBJDIR)/bbb: b.o bb.o
...
$(OBJDIR)/%:
...
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist