Hi,
I've a little problem, trying to be as clean as possible
in my makefile :
here is what i do now :
A: $(LIBDIR)/libA.a($(addprefix $(TOP)/,$(OBJ_A)))
B: $(LIBDIR)/libB.a($(addprefix $(TOP)/,$(OBJ_B)))
C: $(LIBDIR)/libC.a($(addprefix $(TOP)/,$(OBJ_C)))
each of the OBJ_x vars being set separately too.
I feel that it can be more elegant (and easy when one have more than 3
lines) and tried something
like :
MODULES := A B C
the one and only rule being now :
$(MODULES) : %: $(LIBDIR)/lib%.a( ...
$(addprefix $(TOP)/,
$(patsubst %.c,%.o,
$(wildcard %/src/*.c)
)
)
) (on the same line :-)
The problem is that the '%' inside the wildcard should be the module
name A B or C. This is not the case in pratice.
How can i do such a thing with one rule only rather
than one for each module WITHOUT doing recursion (i hate recursion) ???
Thanks,
Axel
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make
- Re: the % target does not propagate ?! Alex Tillequin
- Re: the % target does not propagate ?! Paul D. Smith
