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

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



reply via email to

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