automake
[Top][All Lists]
Advanced

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

Re: Automake puts unwanted flags in compilation command


From: Daniel Campoverde Carrión [Alx741]
Subject: Re: Automake puts unwanted flags in compilation command
Date: Tue, 29 Dec 2015 19:40:44 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Dec 29, 2015 at 10:45:22PM +0000, Gavin Smith wrote:
> >
> >>PIC_DEVICE=18f4550
> >>CC=sdcc
> >>LD=sdcc
> >>FLAGS= --use-non-free -mpic16 -p$(PIC_DEVICE)
> >>AM_CFLAGS = $(FLAGS)
> >>AM_LDFLAGS=
> >>override CFLAGS=
> >>
> >>COMPILE=$(CC) $(FLAGS) -c -o
> >>LINK=$(LD) $(FLAGS) -o $@
> >>
> >>noinst_PROGRAMS = firmware.hex
> >>firmware_hex_SOURCES = firmware.c
> >
> > * Notice i've tried (with no success) AM_CFLAGS, AM_LDFLAGS, override CFLAGS
> 
> I don't think override CFLAGS means anything.
> 
> Maybe try taking all of this out of Makefile.am and giving this
> information on the configure command-line:
> 
> ./configure CC=sdcc LD=sdcc CFLAGS='--use-non-free -mpic16 -p18f4550'
> 
> and so on.

Thank you for the fast response, wouldn't that use SDCC for the whole project?
The problem is the project consist of C (pc) software and a firmware, so the
bigger part is build with GCC and just the firmware with SDCC.


> 
> > I need to compile the code using SDCC compiler with the flags i specified 
> > there,
> > but when i try `make` i got error because of additional flags being added 
> > that
> > SDCC doesn't recognize:
> 
> Right, I reckon the configure script isn't seeing what you put in
> Makefile.am, finds another C compiler and is using flags appropriate
> for that compiler. Putting CC=sdcc on the command line will let it
> know. (I believe the error message you're getting is to do with the
> "dependency style" of the C compiler that was found.)

Oh i see... but how can i compile the code that do need GCC? my code structure
is basically like this:

src/
|
+---app/
|
+---firmware/


`app` is C software (compiled with GCC) but `firmware` is for the
microcontroller (compiled with SDCC).

I want a Makefile.am per directory so `app` and `firmware` are compiled when
*make* is triggered from the project root, everything (including the nested
Makefile.am files) works so far, except for this problem.

So is there a way i should specify this when invoking configure?

Thanks!

-- 
Daniel Campoverde Carrión [alx741]
GPG key id: 12622B78 (keys.gnupg.net)
http://silly-bytes.blogspot.com/

Attachment: signature.asc
Description: Digital signature


reply via email to

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