This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: private header files unaccessible from package dirs
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Heiko Panther <heiko dot panther at web dot de>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 7 Oct 2005 19:32:34 +0200
- Subject: Re: [ECOS] private header files unaccessible from package dirs
- References: <43469601.7010801@web.de>
On Fri, Oct 07, 2005 at 08:36:33AM -0700, Heiko Panther wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
> my package sources are organized into several subdirectories, and I also want to
> put private headers into a subdir. However, the compiler is set up to only look
> in the source files directory, and the public header directory. What do you
> recommend to make the private headers available? I don't wannt to have to prefix
> my include files like
> #include "pinclude/myheader.h"
> and I also don't want to export my privates.
You can add addition compiler flags using
cdl_option CYGPKG_forbar_CFLAGS_ADD
eg jffs2 has
cdl_option CYGPKG_FS_JFFS2_CFLAGS_ADD {
display "Additional compiler flags"
flavor data
no_define
# We add '-D__ECOS' to trigger eCos-specific code in places.
# We add '-nostdinc -iwithprefix include' to avoid picking up
# native <linux/*.h> include files when building on Linux.
default_value { "-D__ECOS -nostdinc -iwithprefix include" }
description "
This option modifies the set of compiler flags for
building the JFFS2 package.
These flags are used in addition
to the set of global flags."
}
So doing something like
default_value { "-I$(REPOSITORY)/$(PACKAGE)/src/include" }
might work.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss