Rockbox mail archive
Subject: New source include-dir usage
From: Daniel Stenberg (daniel_at_haxx.se)
Date: 2003-02-07
Hi
As Kjell Ericson found out, there is a slight confusion in how we deal with
include files etc within the Rockbox project. We need to keep things tidy and
nice, so that we can maintain bulding simulators that work as assumed.
I'm about to re-arrange where we keep include files in the firmware module:
export/
Directory for storing header files for functions and types
the firmware module exports to the apps world. (Except functions that
can be viewed as "libc stuff").
include/
libc stuff. This is general things for libc functionality when
building Rockbox for hardware. This directory MUST NOT be in the
include path when we build the simulators.
Some of the simulator builds or some parts of them, might need one
or two of these files, but they will need to be included explicitly.
This is because stdio.h etc *could* be the host system's version when
we build simulators.
common/
Features include files today in a sort of mixed and uncontrolled
manner. The libc headers that apps need too, should be moved to the
include/, while those functions that are not plain libc versions
should be put in export/. Of course, headers that are not used by
apps may be kept in this dir.
The simulator builds should then make sure to use include paths that use
export/ before the compiler's standard include dir. If a simulator MUST
include a Rockbox-version of a "libc header file", for things such as the DIR
struct definition (in which case we cannot use the host system's own
definition), we put a 'dir.h' file in the simulator's source dir, that
includes the one in include/ explicitly.
I hope the reason for this is evident. I mainly want to make it possible for
the simulator build system to decide whether the system includes should be
used in place of the Rockbox version. Previously, we could not select which
version to use.
Commits that move to this system are pending, will follow promptly.
Questions?
--
Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/
Page was last modified "Jan 10 2012" The Rockbox Crew
|