This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: How to tell if a file is being compiled as part of eCos?
- From: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- To: Grant Edwards <grante at visi dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 1 Aug 2008 19:05:57 +0300
- Subject: Re: [ECOS] Re: How to tell if a file is being compiled as part of eCos?
- References: <E8269B3B134D0449B017B595BDBEAB84062458@mail.systech.com> <g6somd$jp9$1@ger.gmane.org>
On Thu, Jul 31, 2008 at 04:19:26PM +0000, Grant Edwards wrote:
> On 2008-07-31, Jay Foster <jay@systech.com> wrote:
>
> > I've seen many eCos packages use "__ECOS" (or sometimes
> > "__ECOS__") for this purpose. __ECOS is usually defined by
> > the associated package CDL file in a ...CFLAGS_ADD option.
>
> I guess that's what I'll do. I thought maybe eCos provided
> something in the default CFLAGS so that it didn't have to be
> done at the package level.
The place exists where CFLAGS definition starts, there is CFLAGS :=
$(subst -finit-priority,,$(CFLAGS)) in packages/pkgconf/rules.mak. So,
it seems for me that build the same as the below can be used as well
ecosconfig new <target>
ecosconfig tree
make CFLAGS=-D__ECOS__
But, it seems, you are right, it is better to fix main definitions in
the rules.mak.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss