On 11/17/06, Aleksandar Uzelac <[EMAIL PROTECTED]> wrote:
this will work alright: OBJECTS=$(SOURCES:.c=.o)
but i would need something like this:
OBJECTS=$(TARGETPATH)/$(SOURCES:.c=.o $(TARGETPATH)/)
So, you want to replace
%.c
with
$(TARGETPATH)/%.o
right? As described in the GNU make info pages (you _have_ read
through them, right?), you can do that using the patsubst function:
OBJECTS = $(patsubst $(SOURCES),%.c,$(TARGETPATH)/%.o)
That can also be written as:
OBJECTS=$(SOURCES:%.c=$(TARGETPATH)/%.o)
Philip Guenther
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make