On 22 Feb 2008 at 23:16, Dave N6NZ wrote:

> I'm working on a new generic Makefile for my projects, and am 
> contemplating the most sensible way to define .S handling.
> 
> The first thought that popped to mind is:
> (lots of unrelated stuff omitted)
> AS = avr-as
> ASFLAGS = -mmcu=$(MCU)
> %o: %.S $(HEADERS)
>       $(AS) $(ASFLAGS) -o $@ $<
> 
> (All untested code, as of yet, BTW....)
> 
> So, I starting wondering... does the avr-gcc driver pick up $(ASFLAGS) 
> for .s files, so will my setting of ASFLAGS interact with avr-gcc?
> 
> Maybe it makes more sense for me to pick on a non-standard variable name?
> 
> Anything else silly about the above rules?

Normally .S (Upper case S) should be processed by avr-gcc and not by avr-as. 
.S files are first pre-processed by the normal C processor.

make will expand your command to:
avr-as -mmcu=<mcu> -o file.o file.S

where <mcu> is the value of $(MCU)

avr-gcc have no concept of $(ASFLAGS) or any other make definition.

Regards
  Anton Erasmus-- 
A J Erasmus



_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to