2005-11-13 01:58:54 +03:00
|
|
|
# FIncludes <dirs> ;
|
|
|
|
#
|
|
|
|
# Overridden to support a second argument, the option to be used.
|
|
|
|
#
|
2011-06-14 04:41:12 +04:00
|
|
|
rule FIncludes
|
|
|
|
{
|
|
|
|
return $(2:E="--bad-include-option ")$(1) ;
|
|
|
|
}
|
|
|
|
|
2005-11-13 01:58:54 +03:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
# FSysIncludes <dirs> ;
|
|
|
|
#
|
|
|
|
# Counterpart of FIncludes for system include search paths.
|
|
|
|
#
|
2011-06-14 04:41:12 +04:00
|
|
|
rule FSysIncludes
|
|
|
|
{
|
|
|
|
return $(2:E="--bad-include-option ")$(1) ;
|
|
|
|
}
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
|
|
|
|
rule SubDirSysHdrs
|
|
|
|
{
|
|
|
|
# SubDirSysHdrs <dirs> ;
|
|
|
|
#
|
|
|
|
# Adds directories to the system include search paths for the current
|
|
|
|
# subdirectory. Counterpart of SubDirHdrs which adds non-system include
|
|
|
|
# search paths.
|
|
|
|
#
|
|
|
|
# <dirs>: The directories to be added to the current subdir's system
|
|
|
|
# include search paths.
|
|
|
|
#
|
|
|
|
SUBDIRSYSHDRS += [ FDirName $(1) ] ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule ObjectSysHdrs
|
|
|
|
{
|
|
|
|
# ObjectSysHdrs <sources or objects> : <headers> : <gristed objects>
|
|
|
|
#
|
|
|
|
# Adds directories to the system include search paths for the given
|
|
|
|
# sources or objects. Counterpart of ObjectHdrs which adds non-system
|
|
|
|
# include search paths.
|
|
|
|
#
|
|
|
|
# NOTE: With this incarnation of the Haiku build system this rule doesn't
|
|
|
|
# need to be invoked *after* the rule that generates the objects anymore.
|
|
|
|
# Actually it is even encouraged to do that *before*. Same for ObjectHdrs.
|
|
|
|
#
|
|
|
|
# <sources or objects>: The targets for which to add system include
|
|
|
|
# search paths.
|
|
|
|
# <dirs>: The directories to be added to the given objects' system
|
|
|
|
# include search paths.
|
|
|
|
#
|
|
|
|
|
|
|
|
local objects = [ FGristFiles $(1:S=$(SUFOBJ)) ] $(3) ;
|
|
|
|
local headers = $(2) ;
|
|
|
|
|
|
|
|
local file ;
|
|
|
|
for file in $(objects) {
|
|
|
|
on $(file) {
|
|
|
|
local sysHeaders = $(SYSHDRS) $(headers) ;
|
|
|
|
SYSHDRS on $(file) = $(sysHeaders) ;
|
|
|
|
|
|
|
|
# reformat ASHDRS and CCHDRS
|
2005-11-13 01:58:54 +03:00
|
|
|
local fileHeaders ;
|
|
|
|
|
|
|
|
if $(PLATFORM) = host {
|
|
|
|
fileHeaders =
|
|
|
|
[ FIncludes $(HDRS) : $(HOST_LOCAL_INCLUDES_OPTION) ]
|
|
|
|
$(HOST_INCLUDES_SEPARATOR)
|
|
|
|
[ FSysIncludes $(sysHeaders)
|
|
|
|
: $(HOST_SYSTEM_INCLUDES_OPTION) ] ;
|
|
|
|
} else {
|
2013-08-01 10:51:16 +04:00
|
|
|
local architecture = $(TARGET_PACKAGING_ARCH) ;
|
2005-11-13 01:58:54 +03:00
|
|
|
fileHeaders =
|
2013-08-01 10:51:16 +04:00
|
|
|
[ FIncludes $(HDRS)
|
|
|
|
: $(TARGET_LOCAL_INCLUDES_OPTION_$(architecture)) ]
|
|
|
|
$(TARGET_INCLUDES_SEPARATOR_$(architecture))
|
2005-11-13 01:58:54 +03:00
|
|
|
[ FSysIncludes $(sysHeaders)
|
2013-08-01 10:51:16 +04:00
|
|
|
: $(TARGET_SYSTEM_INCLUDES_OPTION_$(architecture)) ] ;
|
2005-11-13 01:58:54 +03:00
|
|
|
}
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
ASHDRS on $(file) = $(fileHeaders) ;
|
|
|
|
CCHDRS on $(file) = $(fileHeaders) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule SourceHdrs
|
|
|
|
{
|
|
|
|
# SourceHdrs <sources> : <headers> [ : <gristed objects> ] ;
|
|
|
|
#
|
|
|
|
# Is a wrapper for ObjectHdrs, that passes <sources> and <headers> or,
|
|
|
|
# if supplied <objects> and <headers>, and also adjusts HDRSEARCH (not
|
|
|
|
# done by ObjectHdrs).
|
|
|
|
|
|
|
|
local sources = [ FGristFiles $(1) ] ;
|
|
|
|
local headers = $(2) ;
|
|
|
|
local objects = $(3) ;
|
|
|
|
|
|
|
|
ObjectHdrs $(sources) : $(headers) : $(objects) ;
|
|
|
|
|
|
|
|
# Also add the header search dirs to HDRSEARCH. Note, that these dirs
|
|
|
|
# will be listed after the STDHDRS (if any), but that's better than not
|
|
|
|
# being listed at all.
|
|
|
|
HDRSEARCH on $(sources) += $(headers) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule SourceSysHdrs
|
|
|
|
{
|
|
|
|
# SourceSysHdrs <sources> : <headers> [ : <gristed objects> ] ;
|
|
|
|
#
|
|
|
|
# Is a wrapper for ObjectSysHdrs, that passes <sources> and <headers> or,
|
|
|
|
# if supplied <objects> and <headers>, and also adjusts HDRSEARCH (not
|
|
|
|
# done by ObjectSysHdrs).
|
|
|
|
|
|
|
|
local sources = [ FGristFiles $(1) ] ;
|
|
|
|
local headers = $(2) ;
|
|
|
|
local objects = $(3) ;
|
|
|
|
|
|
|
|
ObjectSysHdrs $(sources) : $(headers) : $(objects) ;
|
|
|
|
|
|
|
|
# Also add the header search dirs to HDRSEARCH. Note, that these dirs
|
|
|
|
# will be listed after the STDHDRS (if any), but that's better than not
|
|
|
|
# being listed at all.
|
|
|
|
HDRSEARCH on $(sources) += $(headers) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule PublicHeaders
|
|
|
|
{
|
|
|
|
# PublicHeaders <group list>
|
|
|
|
#
|
|
|
|
# Returns the directory names for the public header dirs identified by
|
|
|
|
# <group list>.
|
|
|
|
|
|
|
|
local list = $(1) ;
|
2007-08-14 19:12:04 +04:00
|
|
|
local dirs ;
|
2014-07-31 20:05:36 +04:00
|
|
|
local i ;
|
2005-10-29 20:27:43 +04:00
|
|
|
for i in $(list) {
|
|
|
|
dirs += [ FDirName $(HAIKU_TOP) headers os $(i) ] ;
|
|
|
|
}
|
|
|
|
return $(dirs) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule PrivateHeaders
|
|
|
|
{
|
|
|
|
# PrivateHeaders <group list>
|
|
|
|
#
|
|
|
|
# Returns the directory names for the private header dirs identified by
|
|
|
|
# <group list>.
|
|
|
|
|
|
|
|
local list = $(1) ;
|
|
|
|
local dirs ;
|
2014-07-31 20:05:36 +04:00
|
|
|
local i ;
|
2005-10-29 20:27:43 +04:00
|
|
|
for i in $(list) {
|
|
|
|
dirs += [ FDirName $(HAIKU_TOP) headers private $(i) ] ;
|
|
|
|
}
|
|
|
|
return $(dirs) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2011-06-14 04:46:33 +04:00
|
|
|
rule PrivateBuildHeaders
|
|
|
|
{
|
|
|
|
# PrivateBuildHeaders <group list>
|
|
|
|
#
|
|
|
|
# Returns the directory names for the private build header dirs identified
|
|
|
|
# by <group list>.
|
|
|
|
|
|
|
|
local list = $(1) ;
|
|
|
|
local dirs ;
|
2014-07-31 20:05:36 +04:00
|
|
|
local i ;
|
2011-06-14 04:46:33 +04:00
|
|
|
for i in $(list) {
|
|
|
|
dirs += [ FDirName $(HAIKU_TOP) headers build private $(i) ] ;
|
|
|
|
}
|
|
|
|
return $(dirs) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule LibraryHeaders
|
|
|
|
{
|
|
|
|
# LibraryHeaders <group list>
|
|
|
|
#
|
|
|
|
# Returns the directory names for the library header dirs identified by
|
|
|
|
# <group list>.
|
|
|
|
|
|
|
|
local list = $(1) ;
|
|
|
|
local dirs ;
|
2014-07-31 20:05:36 +04:00
|
|
|
local i ;
|
2005-10-29 20:27:43 +04:00
|
|
|
for i in $(list) {
|
|
|
|
dirs += [ FDirName $(HAIKU_TOP) headers libs $(i) ] ;
|
|
|
|
}
|
|
|
|
return $(dirs) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule ArchHeaders
|
|
|
|
{
|
|
|
|
# usage: ArchHeaders <arch> ;
|
|
|
|
#
|
|
|
|
# <arch> specifies the architecture (e.g. x86).
|
|
|
|
|
|
|
|
return [ FDirName $(HAIKU_TOP) headers private kernel arch $(1) ] ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UseHeaders
|
|
|
|
{
|
|
|
|
# UseHeaders <headers> [ : <system> ] ;
|
|
|
|
#
|
|
|
|
# Adds the C header dirs <headers> to the header search
|
|
|
|
# dirs of the subdirectory.
|
|
|
|
# If <system> is "true", the dirs are added as system otherwise local
|
|
|
|
# search dirs.
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the objects.
|
|
|
|
|
|
|
|
local header ;
|
|
|
|
if $(2) = true {
|
|
|
|
for header in $(1) {
|
|
|
|
SubDirSysHdrs $(header) ;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
for header in $(1) {
|
|
|
|
SubDirHdrs $(header) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UsePublicHeaders
|
|
|
|
{
|
|
|
|
# UsePublicHeaders <group list> ;
|
|
|
|
#
|
|
|
|
# Adds the public C header dirs given by <group list> to the header search
|
|
|
|
# dirs of the subdirectory.
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the
|
|
|
|
# objects.
|
|
|
|
|
|
|
|
UseHeaders [ PublicHeaders $(1) ] : true ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UsePublicObjectHeaders
|
|
|
|
{
|
|
|
|
# UsePublicObjectHeaders <sources> : <group list> [ : <objects> ] ;
|
|
|
|
#
|
|
|
|
# Adds the public C header dirs given by <group list> to the header search
|
|
|
|
# dirs of either the object targets of <sources> or if supplied to
|
|
|
|
# <objects>. Also adjusts HDRSEARCH of <sources>.
|
|
|
|
|
|
|
|
SourceSysHdrs $(1) : [ PublicHeaders $(2) ] : $(3) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UsePrivateHeaders
|
|
|
|
{
|
|
|
|
# UsePrivateHeaders <group list> [ : <system> ] ;
|
|
|
|
#
|
|
|
|
# Adds the private C header dirs given by <group list> to the header search
|
|
|
|
# dirs of the subdirectory.
|
|
|
|
# <system> specifies whether to add the dirs as system or local header
|
|
|
|
# search dirs. Defaults to "true".
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the objects.
|
|
|
|
|
|
|
|
local system = $(2) ;
|
2009-08-18 01:13:51 +04:00
|
|
|
system ?= true ;
|
2005-10-29 20:27:43 +04:00
|
|
|
|
|
|
|
UseHeaders [ PrivateHeaders $(1) ] : $(system) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UsePrivateObjectHeaders
|
|
|
|
{
|
|
|
|
# UsePrivateObjectHeaders <sources> : <group list> [ : <objects>
|
|
|
|
# [ : <system> ] ] ;
|
|
|
|
#
|
|
|
|
# Adds the private C header dirs given by <group list> to the header search
|
|
|
|
# dirs of either the object targets of <sources> or if supplied to
|
|
|
|
# <objects>. Also adjusts HDRSEARCH of <sources>.
|
|
|
|
# <system> specifies whether to add the dirs as system or local header
|
|
|
|
# search dirs. Defaults to "true".
|
|
|
|
|
|
|
|
local system = $(4) ;
|
2009-08-18 01:13:51 +04:00
|
|
|
system ?= true ;
|
2005-10-29 20:27:43 +04:00
|
|
|
|
|
|
|
if $(system) = true {
|
|
|
|
SourceSysHdrs $(1) : [ PrivateHeaders $(2) ] : $(3) ;
|
|
|
|
} else {
|
|
|
|
SourceHdrs $(1) : [ PrivateHeaders $(2) ] : $(3) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2011-06-14 04:46:33 +04:00
|
|
|
rule UsePrivateBuildHeaders
|
|
|
|
{
|
|
|
|
# UsePrivateBuildHeaders <group list> [ : <system> ] ;
|
|
|
|
#
|
|
|
|
# Adds the private build C header dirs given by <group list> to the header
|
|
|
|
# search dirs of the subdirectory.
|
|
|
|
# <system> specifies whether to add the dirs as system or local header
|
|
|
|
# search dirs. Defaults to "true".
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the objects.
|
|
|
|
|
|
|
|
local system = $(2) ;
|
|
|
|
system ?= true ;
|
|
|
|
|
|
|
|
UseHeaders [ PrivateBuildHeaders $(1) ] : $(system) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UseCppUnitHeaders
|
|
|
|
{
|
|
|
|
SubDirSysHdrs [ FDirName $(HAIKU_TOP) headers tools cppunit ] ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UseCppUnitObjectHeaders
|
|
|
|
{
|
|
|
|
# UseCppUnitObjectHeaders <sources> [ : <objects> ] ;
|
|
|
|
SourceSysHdrs $(1) : [ FDirName $(HAIKU_TOP) headers tools cppunit ]
|
|
|
|
: $(2) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UseArchHeaders
|
|
|
|
{
|
|
|
|
# usage: UseArchHeaders <arch> ;
|
|
|
|
#
|
|
|
|
# <arch> specifies the architecture (e.g. x86).
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the objects.
|
|
|
|
|
|
|
|
local headers = [ ArchHeaders $(1) ] ;
|
|
|
|
|
|
|
|
UseHeaders $(headers) : true ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UseArchObjectHeaders
|
|
|
|
{
|
|
|
|
# usage: UseArchObjectHeaders <sources> : <arch> : [ <objects> ] ;
|
|
|
|
#
|
|
|
|
# <arch> specifies the architecture (e.g. x86).
|
|
|
|
# <sources_or_objects> Source or object files.
|
|
|
|
|
|
|
|
local sources = $(1) ;
|
|
|
|
local headers = [ ArchHeaders $(2) ] ;
|
|
|
|
local objects = $(3) ;
|
|
|
|
local targets ;
|
|
|
|
if $(objects) {
|
|
|
|
targets = $(objects) ;
|
|
|
|
} else {
|
|
|
|
targets = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
|
|
|
|
}
|
|
|
|
|
|
|
|
SourceSysHdrs $(sources) : $(headers) : $(objects) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UsePosixObjectHeaders
|
|
|
|
{
|
|
|
|
# UsePosixObjectHeaders <sources> [ : <objects> ] ;
|
|
|
|
#
|
|
|
|
# Adds the POSIX header dir to the header search
|
|
|
|
# dirs of either the object targets of <sources> or if supplied to
|
|
|
|
# <objects>. Also adjusts HDRSEARCH of <sources>.
|
|
|
|
|
|
|
|
SourceSysHdrs $(1) : [ FDirName $(HAIKU_TOP) headers posix ] : $(2) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule UseLibraryHeaders
|
|
|
|
{
|
|
|
|
# UseLibraryHeaders <group list> ;
|
|
|
|
#
|
|
|
|
# Adds the library header dirs given by <group list> to the header search
|
|
|
|
# dirs of the subdirectory.
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the objects.
|
|
|
|
|
|
|
|
UseHeaders [ LibraryHeaders $(1) ] : true ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-11-03 18:14:06 +03:00
|
|
|
rule UseLegacyHeaders
|
|
|
|
{
|
2006-06-01 00:31:59 +04:00
|
|
|
# usage: UseLegacyHeaders <group list> ;
|
2005-11-03 18:14:06 +03:00
|
|
|
#
|
|
|
|
# NOTE: This rule must be invoked *before* the rule that builds the objects.
|
|
|
|
|
2006-06-01 00:31:59 +04:00
|
|
|
UseHeaders [ FDirName $(HAIKU_TOP) headers legacy $(1) ] : true ;
|
2005-11-03 18:14:06 +03:00
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-11-03 18:14:06 +03:00
|
|
|
rule UseLegacyObjectHeaders
|
|
|
|
{
|
|
|
|
# UseLegacyObjectHeaders <sources> [ : <objects> ] ;
|
|
|
|
#
|
|
|
|
# Adds the legacy header dir to the header search
|
|
|
|
# dirs of either the object targets of <sources> or if supplied to
|
|
|
|
# <objects>. Also adjusts HDRSEARCH of <sources>.
|
|
|
|
|
|
|
|
SourceSysHdrs $(1) : [ FDirName $(HAIKU_TOP) headers legacy ] : $(2) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2007-08-09 23:42:21 +04:00
|
|
|
rule UsePrivateKernelHeaders
|
|
|
|
{
|
|
|
|
UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2008-05-14 07:55:16 +04:00
|
|
|
rule UsePrivateSystemHeaders
|
|
|
|
{
|
2013-08-01 10:51:16 +04:00
|
|
|
UseHeaders $(TARGET_PRIVATE_SYSTEM_HEADERS_$(TARGET_PACKAGING_ARCH))
|
|
|
|
: true ;
|
2008-05-14 07:55:16 +04:00
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2014-05-01 14:50:11 +04:00
|
|
|
rule UseBuildFeatureHeaders feature : attribute
|
2013-05-06 06:31:27 +04:00
|
|
|
{
|
|
|
|
# UseBuildFeatureHeaders <feature> : [ <attribute> ] ;
|
|
|
|
# A shorthand for
|
|
|
|
# UseHeaders [ BuildFeatureAttribute <feature> : <attribute> ] : true ;
|
|
|
|
# Moreover the default value for <attribute> is "headers", which usually
|
|
|
|
# allows the rule to be called with the feature name as the only parameter.
|
|
|
|
|
|
|
|
local headers = [ BuildFeatureAttribute $(feature) : $(attribute:E=headers)
|
|
|
|
: path ] ;
|
|
|
|
UseHeaders $(headers) : true ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
rule FStandardOSHeaders
|
|
|
|
{
|
|
|
|
local osIncludes = add-ons add-ons/file_system add-ons/graphics
|
2006-06-10 00:48:50 +04:00
|
|
|
add-ons/input_server add-ons/registrar
|
|
|
|
add-ons/screen_saver
|
2005-10-29 20:27:43 +04:00
|
|
|
add-ons/tracker app device drivers game interface
|
2013-12-23 09:36:02 +04:00
|
|
|
kernel locale media mail midi midi2 net storage
|
2009-09-19 02:23:34 +04:00
|
|
|
support translation ;
|
2009-08-18 01:13:51 +04:00
|
|
|
|
2007-08-14 19:23:52 +04:00
|
|
|
return [ FDirName $(HAIKU_TOP) headers os ]
|
|
|
|
[ PublicHeaders $(osIncludes) ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2013-08-01 10:51:16 +04:00
|
|
|
rule FStandardHeaders architecture
|
2005-10-29 20:27:43 +04:00
|
|
|
{
|
|
|
|
local osIncludes = add-ons add-ons/file_system add-ons/graphics
|
2006-06-10 00:48:50 +04:00
|
|
|
add-ons/input_server add-ons/registrar
|
|
|
|
add-ons/screen_saver
|
2005-10-29 20:27:43 +04:00
|
|
|
add-ons/tracker app device drivers game interface
|
2013-12-23 09:36:02 +04:00
|
|
|
kernel locale media mail midi midi2 net storage
|
2009-09-19 02:23:34 +04:00
|
|
|
support translation ;
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2009-01-23 06:23:21 +03:00
|
|
|
local headers = ;
|
|
|
|
|
2014-07-31 20:05:36 +04:00
|
|
|
# The C++ headers and gcc headers.
|
|
|
|
if $(architecture) != x86_gcc2 {
|
|
|
|
headers += [ C++HeaderDirectories $(architecture) ] ;
|
|
|
|
headers += [ GccHeaderDirectories $(architecture) ] ;
|
2009-01-23 06:23:21 +03:00
|
|
|
} else {
|
|
|
|
headers += [ FDirName $(HAIKU_TOP) headers cpp ] ;
|
2014-07-31 20:05:36 +04:00
|
|
|
headers += [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ;
|
2009-01-23 06:23:21 +03:00
|
|
|
}
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
# Use headers directory, to allow to do things like include <posix/string.h>
|
2008-03-16 20:21:37 +03:00
|
|
|
headers += [ FDirName $(HAIKU_TOP) headers ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
|
|
|
|
# Use posix headers directory
|
|
|
|
headers += [ FDirName $(HAIKU_TOP) headers posix ] ;
|
|
|
|
|
|
|
|
# Use glibc headers
|
|
|
|
headers += [ FDirName $(HAIKU_TOP) headers glibc ] ;
|
|
|
|
|
|
|
|
# Use public OS header directories
|
2007-08-14 19:23:52 +04:00
|
|
|
headers += [ FDirName $(HAIKU_TOP) headers os ] ;
|
2005-10-29 20:27:43 +04:00
|
|
|
headers += [ PublicHeaders $(osIncludes) ] ;
|
|
|
|
|
|
|
|
# Use the root of the private headers -- not so nice, but simplifies things.
|
|
|
|
headers += [ PrivateHeaders $(DOT) ] ;
|
|
|
|
|
|
|
|
return $(headers) ;
|
|
|
|
}
|
|
|
|
|
2011-06-14 04:41:12 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
# SUBDIRSYSHDRS shall be reset automatically for each subdir
|
|
|
|
SUBDIRRESET += SYSHDRS ;
|