[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with gmake.
From: |
Brian Bruinewoud |
Subject: |
Help with gmake. |
Date: |
10 Jul 2002 21:13:17 -0700 |
Maybe its just me, but I think the following would be really useful:
LIB-NAMES = A B
LIB-A-OBJS = a.o ma.o
LIB-B-OBJS = b.o bl.o
LIBS: $(patsubst %, lib%.a, $(LIB-NAMES))
lib%.a: $(LIB-%-OBJS)
When I discovered that this didn't work, I tried various other ways to get
similar functionality, such as using $(foreach...) to generate the rules, etc.
None of them worked. Is there some way to get this functionality?
That is, how do I write a generic file that can generate libraries given a list
of library names an appropriately named list of constituent objects.
My version of gnu make is:
$ gmake --version
GNU Make version 3.75, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Thanks,
Brian.
- Help with gmake.,
Brian Bruinewoud <=