This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: private header files unaccessible from package dirs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]