From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4e7df01d3b597a03 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.227.230 with SMTP id sd6mr2400057pbc.8.1334753614031; Wed, 18 Apr 2012 05:53:34 -0700 (PDT) Path: r9ni70441pbh.0!nntp.google.com!news1.google.com!postnews.google.com!ca2g2000vbb.googlegroups.com!not-for-mail From: Rolf Newsgroups: comp.lang.ada Subject: Re: Converting a simple makefile in a GPS project. Date: Wed, 18 Apr 2012 05:45:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1ecb1d65-9192-4f8a-88ec-9156e55fb9db@ca2g2000vbb.googlegroups.com> References: <428617.3.1334627550218.JavaMail.geo-discussion-forums@ynnn9> NNTP-Posting-Host: 217.89.139.138 Mime-Version: 1.0 X-Trace: posting.google.com 1334753613 29159 127.0.0.1 (18 Apr 2012 12:53:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 18 Apr 2012 12:53:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: ca2g2000vbb.googlegroups.com; posting-host=217.89.139.138; posting-account=-RRRjAkAAAAGFvmHqTCN-L7gNQ7lRGfd User-Agent: G2/1.0 X-HTTP-Via: 1.1 www-proxy-mozilla.vi.vector.int:8080 (squid/2.7.STABLE9), 1.0 vistrem1.vector-informatik.com:8080 (squid/2.7.STABLE5) X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-04-18T05:45:53-07:00 List-Id: On 17 Apr., 03:52, "Rego, P." wrote: > I'm getting a bit difficult in converting this makefile in a .gpr project= file. > > -- makefile > all: main.hex main.lss sizedummy > > program: > =A0 =A0 =A0 =A0 avrdude -pm8 -Uflash:w:"main.hex" > > main.elf: force > =A0 =A0 =A0 =A0 avr-gnatmake main -o $@ -Os -mmcu=3Davr4 --RTS=3Dzfp -lar= gs crtm8._o -nostdlib -lgcc -mavr4 -Tdata=3D0x00800200 > > main.lss: main.elf > =A0 =A0 =A0 =A0 -avr-objdump -h -S main.elf =A0>"main.lss" > > main.hex: main.elf > =A0 =A0 =A0 =A0 avr-objcopy -O ihex $< $@ > > sizedummy: main.elf > =A0 =A0 =A0 =A0 -avr-size --format=3Davr --mcu=3Datmega8 main.elf > > clean: > =A0 =A0 =A0 =A0 $(RM) *.o leds =A0*.ihex *.ali *.elf *.hex *.lss *.map > > -- test.gpr > project Test is > > =A0 =A0for Source_Dirs use (".", "src"); > =A0 =A0for Object_Dir use "obj"; > =A0 =A0for Exec_Dir use "bin"; > =A0 =A0for Main use ("main.adb"); > > =A0 =A0package Compiler is > =A0 =A0 =A0 for Default_Switches ("ada") use ("-gnatwa", "-gnat05"); > =A0 =A0end Compiler; > > =A0 =A0package Ide is > =A0 =A0 =A0 for Gnat use "avr-gnat"; > =A0 =A0 =A0 for Gnatlist use "avr-gnatls"; > =A0 =A0 =A0 for Debugger_Command use "avr-gdb"; > =A0 =A0end 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