philip,

  thanks alot for the answer, you were right, i read some nmake book on the 
subject instead. never heard of the patsubst function.

  uzi

Friday, November 17, 2006, 9:01:09 PM, you wrote:

> 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

Reply via email to