Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: OT: cross compiling: `?=` or `+=` for `INCLUDES`
Date: Sun, 12 Dec 2010 17:29:23 +0100	[thread overview]
Message-ID: <4D04F863.6000006@opendreambox.org> (raw)
In-Reply-To: <1292169236.13905.40.camel@mattotaupa>

On 12/12/2010 04:53 PM, Paul Menzel wrote:
> Dear OE folks,
> 
> 
> what is the best practice for Makefiles with `INCLUDES`? On the VDR list
> it was requested to use `+=` instead of `?=`. [1]
> 
>         However, in the Makefile changes:
>         -INCLUDES = -I/usr/include/freetype2
>         +INCLUDES ?= -I/usr/include/freetype2
>         
>         Shouldn't that be += instead of ?=.
>         
>         In my case, my IDE sets INCLUDES with some custom stuff. Therefore the
>         Makefile does not touch INCLUDES any more and I get an error.
> 
> Is it common when changing `INCLUDES` that one has to take care about
> this by oneself, i. e. by adding `-I/usr/include/freetype2` to
> `INCLUDES`? Or is there a better way?

IMO you should use pkg-config or freetype-config instead, e.g.:

INCLUDES ?= `pkg-config --cflags freetype2`

or better, instead of using INCLUDES at all:

FREETYPE_CFLAGS ?= `pkg-config --cflags freetype2`
CFLAGS += $(FREETYPE_CFLAGS)

This will work in most environments.

Regards,
Andreas



      reply	other threads:[~2010-12-12 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-12 15:53 OT: cross compiling: `?=` or `+=` for `INCLUDES` Paul Menzel
2010-12-12 16:29 ` Andreas Oberritter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D04F863.6000006@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox