avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] unknown Make %. behavior


From: Sander Pool
Subject: [avr-gcc-list] unknown Make %. behavior
Date: Sun, 12 Jan 2003 20:24:55 -0800

Hi,

it's been quite a few years since I wrote makefiles as part of my job and
this was on Solaris with Sun make. Far less capable than gmake. So I'm a
little stumped right now. I use WinAVR on Win2k which comes with Gnu-make
3.78.1. The sample makefile that Eric provided with the package contains
these lines:

.SECONDARY : $(TARGET).elf
%.elf: $(OBJ)
        $(COMPILE) $(LDFLAGS) $(OBJ) $(LIBFLAGS) --output $@

The OBJ variable contains the .0 files that make up the project. The odd
thing is that after the compile/link is done the .o's get removed! There is
no rule in the makefile to do that. If I change the lines above to this:

.SECONDARY : $(TARGET).elf
$(TARGET).elf: $(OBJ)
        $(COMPILE) $(LDFLAGS) $(OBJ) $(LIBFLAGS) --output $@

It leaves the .o files alone, as it should.

Does anyone know what's going on? I have attached the whole Makefile in case
you want to look at it.

Thanks,

        Sander

Attachment: makefile
Description: Binary data


reply via email to

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