Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Problem using MAKE - seems to be a path problem

2005-04-13 by arhodes19044

I will try out your makefikle as soon as I get home.  I will look at 
those suffix lines on my version of the makefile to see if I can tell 
why the path is an issue.

The makefile must assume SOMETHING about SOMETHING so that the path 
to F: will not work, but C: will work.  

In what way does your Makefile differ from the makefile included with 
the AVR demo project?

That makefile is sufficiently opaque that I really do understall all 
of what it is doing.

I wonder if I use Mfile to create a new makefile whether this will be 
a functional makefile.

-Tony


--- In AVR-Chat@yahoogroups.com, David Kelly <dkelly@h...> wrote:
> 
> On Apr 12, 2005, at 10:05 PM, arhodes19044 wrote:
> 
> > Here is the error report from make:
> >
> > ----------------------------------------
> >> "make.exe" all
> > make.exe: *** No rule to make target `all'.  Stop.
> >
> >> Process Exit Code: 2
> > ---------------------------------------------------
> 
> [...]
> 
> > Any ideas from anyone now?  I am fresh out of ideas of what is 
wrong.
> 
> Your error message makes perfect sense. The rule tree for the 
target 
> "all" is incomplete. From the make.info document:
> 
> `No rule to make target `XXX'.'
> `No rule to make target `XXX', needed by `YYY'.'
>       This means that `make' decided it needed to build a target, 
but
>       then couldn't find any instructions in the makefile on how to 
do
>       that, either explicit or implicit (including in the default 
rules
>       database).
> 
> I *know* the following Makefile works. Save it as "Makefile", 
> capital-M. Also either create an empty file named ".depend" (dot 
> depend) or comment out the last line. If you "make depend" then a 
new 
> .depend will be created including all the #include dependancies it 
> found in your sources. Make sure the indented lines are indented 
with 
> tabs. Some makes are sensitive, some are not. I forgot which way 
GNU 
> make permits/requires.
> 
> Very little editing would be needed to convert this to your 
project. 
> Just the MCU line, SRCS, and change "object.elf", "object.bin", and 
> "object.list" if you don't like that name for the final product.
> 
> #
> #$Id: Makefile,v 1.27 2005/03/22 22:31:36 dkelly Exp $
> #
> CC= avr-gcc
> #MCU=atmega8
> #MCU=atmega16
> #MCU=atmega32
> #MCU=atmega163
> #MCU=atmega323
> #MCU=atmega64
> MCU=atmega128
> 
> CFLAGS= -O -gdwarf-2 -Wall -ffreestanding -mmcu=$(MCU)
> LDFLAGS= -Wl,-Map,$@.map
> 
> .SUFFIXES:
> .SUFFIXES: .c .o .bin .elf .hex .srec .list
> 
> .c.o:
> 	$(CC) $(CFLAGS) -c $<
> 
> .elf.bin:
> 	avr-objcopy -R .eeprom -O binary $< $@
> 
> .elf.hex:
> 	avr-objcopy -O ihex $< $@
> 
> .elf.srec:
> 	avr-objcopy -O srec $< $@
> 
> #
> #  This is a fun conversion, creates an assembly dump
> #  including C source lines interspersed as comments.
> #
> .elf.list:
> 	avr-objdump -DS $< > $@
> 
> #  one per line makes CVS diffs easier to read
> SRCS = \
> 	main.c \
> 	uarts.c \
> 	timers.c \
> 	cmm.c \
> 	cmm_cmd.c \
> 	misc.c \
> 	it.c \
> 	eeprom.c
> 
> OBJS = $(SRCS:.c=.o)
> 
> all:	object.elf object.bin object.list
> 
> object.elf: $(OBJS)
> 	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS)
> 	avr-size $@
> 
> clean:
> 	rm -f *~ *.elf *.cof *.bin *.hex *.srec *.s *.o *.pdf *core 
*.list 
> *.map
> 
> # BSD make automatically reads .depend if it exists
> depend: $(SRCS)
> 	$(CC) -E -M $(SRCS) > .depend
> 
> # GNU make apparently must be told to include .depend
> include .depend
> 
> 
> --
> David Kelly N4HHE, dkelly@H...
> 
======================================================================
==
> Whom computers would destroy, they must first drive mad.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.