[Top][All Lists]

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

Re: [avr-chat] HowTo split a program into several files ?

From: Vincent Trouilliez
Subject: Re: [avr-chat] HowTo split a program into several files ?
Date: Mon, 12 Sep 2005 23:32:17 +0200

On Mon, 2005-09-12 at 22:49 +0200, Joerg Wunsch wrote:
> Vincent Trouilliez <address@hidden> wrote:
> > "Makefile:18: *** missing separator (did you mean TAB instead of 8
> > spaces?).  Stop. "
> Well, that's quite explicit, isn't it?
> Do *not* indent commands by 8 spaces, use hard TABs.

Thanks Joerg & David, in the demo Makefile, I replaced by hand all the
spaces with tabs, just typed "make", and it generated dozens of files. I
searched for demo.hex, downloaded it into the AVr and oh, the LED is
glowing ! :-)
Can't believe I was THAT close from using a make file...

Now, how do I modify it to work when there are two files, main.c and
lcd.c (and lcd.h of course) in my case ?

At the very top of the Makefile it says :

PRG             = demo
OBJ             = demo.o
MCU_TARGET      = atmega32
OPTIMIZE        = -O2
DEFS            =
LIBS            =
# You should not have to change anything below here.

Looks like "PRG" is used to specify all the source files ?

I tried writing PRG = main lcd and OBJ = main.o
but it's not happy with that apparently...

Joerg, I guess it's stupid easy again ;-) ... what is the syntax to
specify multiple source files then ? Should I separate them with
colons ? semi-colons ? some other character ??

> Or, <blatant plug>use Mfile</blatant plug>.

Huuuu, please forgive me, but what is Mfile, which I understand you
wrote ! ;o) What can it do for poor users like me ?! ;o)



reply via email to

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