Makefile error

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wirte file demo.c from A GNU Development Environment for the AVR Microcontroller . ( I develop project from Linux and used AVR-GCC )

and I wirte Makefile ==>

CC=avr-gcc
OBJCOPY=avr-objcopy
CFLAGS=-g -mmcu=at90s2313
rom.hex : demo.out
$(OBJCOPY) -j .text -O ihex demo.out rom.hex
demo.out : demo.o
$(CC) $(CFLAGS) -o demo.out -Wl,-Map,demo.map demo.o
demo.o : demo.c
$(CC) $(CFLAGS) -Os -c demo.c

it same as example.
but it erreor

Makefile *** missing separator Stop.

please help me
thank you

Micro4you,
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there white space (blanks or tab) at the beginning of each of the
command lines (the lines beginning with "$")?

"make" cares.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Go get MFile:

http://www.sax.de/~joerg/mfile/

MFile can generate makefiles for use with AVR GCC and it works for Linux too.