comp.lang.ada
 help / color / mirror / Atom feed
From: Rolf <rolf.ebert_nospam_@gmx.net>
Subject: Re: Converting a simple makefile in a GPS project.
Date: Wed, 18 Apr 2012 05:45:53 -0700 (PDT)
Date: 2012-04-18T05:45:53-07:00	[thread overview]
Message-ID: <1ecb1d65-9192-4f8a-88ec-9156e55fb9db@ca2g2000vbb.googlegroups.com> (raw)
In-Reply-To: 428617.3.1334627550218.JavaMail.geo-discussion-forums@ynnn9

On 17 Apr., 03:52, "Rego, P." <pvr...@gmail.com> wrote:
> I'm getting a bit difficult in converting this makefile in a .gpr project file.
>
> -- makefile
> all: main.hex main.lss sizedummy
>
> program:
>         avrdude -pm8 <PROGRAMMER SPECIFIC> -Uflash:w:"main.hex"
>
> main.elf: force
>         avr-gnatmake main -o $@ -Os -mmcu=avr4 --RTS=zfp -largs crtm8._o -nostdlib -lgcc -mavr4 -Tdata=0x00800200
>
> main.lss: main.elf
>         -avr-objdump -h -S main.elf  >"main.lss"
>
> main.hex: main.elf
>         avr-objcopy -O ihex $< $@
>
> sizedummy: main.elf
>         -avr-size --format=avr --mcu=atmega8 main.elf
>
> clean:
>         $(RM) *.o leds  *.ihex *.ali *.elf *.hex *.lss *.map
>
> -- test.gpr
> project Test is
>
>    for Source_Dirs use (".", "src");
>    for Object_Dir use "obj";
>    for Exec_Dir use "bin";
>    for Main use ("main.adb");
>
>    package Compiler is
>       for Default_Switches ("ada") use ("-gnatwa", "-gnat05");
>    end Compiler;
>
>    package Ide is
>       for Gnat use "avr-gnat";
>       for Gnatlist use "avr-gnatls";
>       for Debugger_Command use "avr-gdb";
>    end Ide;
>
> end Test;
>
> Where should I put each makefile sentence?

Most of your Makefile rules cannot be expressed at all in GPR files
for gnatmake (I don't know about gprbuild).  In your case, only the
rule for main.elf can be moved to a GPR file.  See the examples in AVR-
Ada for a working mixture of Makefiles and GPR files.

    Rolf



  reply	other threads:[~2012-04-18 12:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17  1:52 Converting a simple makefile in a GPS project Rego, P.
2012-04-18 12:45 ` Rolf [this message]
2012-04-21 19:56   ` Rego, P.
2012-04-18 12:49 ` Stephen Leake
2012-04-21 19:54   ` Rego, P.
2012-04-22  4:09     ` Configuring --RTS=? on GPS Rego, P.
2012-04-22 14:18     ` Converting a simple makefile in a GPS project Stephen Leake
2012-04-22 15:30       ` Simon Wright
2012-04-23  2:09         ` Rego, P.
2012-04-23  2:04       ` Rego, P.
2012-04-21 19:57   ` Rego, P.
2012-04-23  2:34   ` Rego, P.
2012-04-24 12:17     ` Stephen Leake
2012-04-27  4:07       ` Rego, P.
     [not found]       ` <30582310.1752.1335499373911.JavaMail.geo-discussion-forums@ynjj16>
2012-04-28  7:05         ` Stephen Leake
2012-04-30  2:41           ` Rego, P.
2012-04-30  2:43       ` Rego, P.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox