[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Make file to recursivly generate code for more than
From: |
Douglas Dotson |
Subject: |
Re: [avr-gcc-list] Make file to recursivly generate code for more than one target ? |
Date: |
Thu, 3 Jun 2004 14:08:17 -0700 (PDT) |
Just create a target like:
all : target_atmega8.rom target_atmega16.rom \
target_atmega128.rom
Then a target for each platform.
Doug
--- Anton Erasmus <address@hidden> wrote:
>
> On 2004/06/03 at 09:31 E. Weddington wrote:
>
> >On 2 Jun 2004 at 22:56, Anton Erasmus wrote:
> >
> >> Hi,
> >>
> >> Does anyone have a nice example of a
makefile
> that can generate code
> >> for more than one target ? On one PCB I
can use
> either the ATMega16 or
> >ATMega32.
> >> I want my makefile to generate a
target_16.rom
> and a target_32.rom every
> >time I
> >> build the code. For library code it
would also be
> nice to be able to
> >build the
> >> library for all possible AVR targets
with one
> make command.
> >>
> >> Regards
> >> Anton Erasmus
> >
> >[Note: I'm replying to the list as well as
> personally, but I've had some
> >recent
> >problems with messages not getting to the
list.]
> >
> >Take a look at the make user manual. You'll
find
> that make can recursively
> >call
> >itself. So you can set up seperate targets
for
> building the mega16 and for
> >building the mega32. Then create another
target
> which all it does is
> >recursively calls make to clean the project
(via a
> target), then makes the
> >mega16 target, cleans the project again, and
then
> makes the mega32 target.
> >
> >HTH
> >Eric
>
> Hi,
>
> I have read through the makefile docs, even
bought a
> book on make by O'Reilly. With enough
> persistance I have managed to do quite a few
things
> with make. I find however that an explained
> working example helps a lot to understand
> everything. Debugging the makefiles can be quite
> painfull
> because one often gets a terse "Nothing to make"
or
> some other non-sensical error, when one makes
> a small mistake.
> My current version of the makefile, I do a "make
> MCU=<arch>" which generates a target
> file of target_arch.rom. I would like to have a
list
> of avr types in the makefile: something like
> MCUS=atmega8 atmega16 atmega128
> then on doing a make, it should build
> target_atmega8.rom, target_atmega16.rom and
> target_atmega128.rom
>
> It seems that one either get extremely simple
basic
> makefiles, or super complex ones generated by
> automake type tools.
>
> Regards
> Anton Erasmus
>
> [Note: I received only one copy, so it seems you
> still have some problems with sending to the
list]
>
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list