> 
> So, my modified CFLAGS looks like this;
> CFLAGS                :=      -g -Wall -O2 -Wa,-ahl=file.s

In make there are two different kind of assignments.
The one you used above ":=" where CFLAGS is assigned the
the exact value you specify on the time of assignment.

> The best option I can see for this is using the automatic variable $...@.
> Making CFLAGS look like;
> CFLAGS                :=      -g -Wall -O2 -Wa,[email protected]

And what you want to do here is to tell make to defer the assignmnet
of CFLAGS unitl you use the variable because only at that
time you know the value of $...@.
To do so use "=" as assignment operator like this:

CFLAGS                =      -g -Wall -O2 -Wa,[email protected]

As an further enhancement you can drop the original
suffix like this:
CFLAGS = -g -Wall -O2 -Wa,-ahl=$(@.o=.s)

        Sam


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to