[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] RE: Make question (how to)

From: Dave Hylands
Subject: Re: [avr-gcc-list] RE: Make question (how to)
Date: Mon, 2 May 2005 13:34:36 -0700

Hi Larry,

> But this doesn't work.  The SRC and ASRC are not substituted for the default
> ones defined earlier in the makefile (MCU and other symbols are).
> How do I do this?  What is the magic incantation to substitute a list?

The problem is that you can' assign variables as part of the recipie
(well, you can, but they only take effect for that one line).

The simplest option is probably to create a spearate makefile for each
target, giving them names like target1.mk

and then having the main makefile just contain something simple like:

TARGETS = target1 target2

all: $(TARGETS)

    $(MAKE) -f address@hidden

There are other options, but they can get complicated in a hurry. I'd
be happy to go into more detail, but I figured I'd see if the first
option works for you.

If you want to do a clean, you can just do:

make -f target1.mk clean

and there are ways of getting the clean incorporated into the main
Makefile, it just requires more thought than what comes off the top of
my head.

Dave Hylands
Vancouver, BC, Canada

reply via email to

[Prev in Thread] Current Thread [Next in Thread]