1338b8dc3SIngo Weinhold# Haiku Jamrules 2979afc6fSAxel Dörfler 3338b8dc3SIngo Weinhold# Main directories used by the build. 4338b8dc3SIngo WeinholdHAIKU_OUTPUT_DIR ?= [ FDirName $(HAIKU_TOP) generated ] ; 5338b8dc3SIngo WeinholdHAIKU_BUILD_OUTPUT_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) build ] ; 6338b8dc3SIngo WeinholdHAIKU_BUILD_DIR = [ FDirName $(HAIKU_TOP) build ] ; 7338b8dc3SIngo WeinholdHAIKU_BUILD_RULES_DIR = [ FDirName $(HAIKU_BUILD_DIR) jam ] ; 8338b8dc3SIngo WeinholdHAIKU_OBJECT_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) objects ] ; 9338b8dc3SIngo WeinholdHAIKU_COMMON_PLATFORM_OBJECT_DIR = [ FDirName $(HAIKU_OBJECT_DIR) common ] ; 1096b421b8SIngo WeinholdHAIKU_DOWNLOAD_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) download ] ; 114ff6d49fSIngo Weinhold 124ff6d49fSIngo Weinhold# Cache files for header scanning and jamfile caching 134ff6d49fSIngo WeinholdHCACHEFILE = header_cache ; 144ff6d49fSIngo WeinholdJCACHEFILE = jamfile_cache ; 15338b8dc3SIngo WeinholdLOCATE on $(HCACHEFILE) $(JCACHEFILE) = $(HAIKU_BUILD_OUTPUT_DIR) ; 169eea4522SIngo Weinhold 17338b8dc3SIngo Weinhold# The build setup and rules are neatly organized in several files. Include 18338b8dc3SIngo Weinhold# them now. Start with the side-effect-less rules, since they are the most 19338b8dc3SIngo Weinhold# likely to be used in the top level context (i.e. not only in rules). 20338b8dc3SIngo Weinhold# At the end include BuildSetup that sets up global variables etc. The 21338b8dc3SIngo Weinhold# optional user-defined UserBuildConfig is included thereafter. 22338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) HelperRules ] ; 2325b12e83SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) MathRules ] ; 24338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) BeOSRules ] ; 25338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) ConfigRules ] ; 26338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) DocumentationRules ] ; 27338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) FileRules ] ; 28338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) FreetypeRules ] ; 29338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) HeadersRules ] ; 30338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) KernelRules ] ; 31338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) ImageRules ] ; 32338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) MainBuildRules ] ; 33338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) MiscRules ] ; 34338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) OverriddenJamRules ] ; 35338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) PackageRules ] ; 36338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) TestsRules ] ; 37338b8dc3SIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildSetup ] ; 38b1e5b60cSAxel Dörfler 39338b8dc3SIngo Weinhold# Include UserBuildConfig. 408c17a26bSIngo Weinhold{ 41338b8dc3SIngo Weinhold local userBuildConfig 42338b8dc3SIngo Weinhold = [ GLOB $(HAIKU_BUILD_RULES_DIR) : UserBuildConfig ] ; 43338b8dc3SIngo Weinhold if $(userBuildConfig) { 44338b8dc3SIngo Weinhold include $(userBuildConfig) ; 458c17a26bSIngo Weinhold } 468c17a26bSIngo Weinhold} 478c17a26bSIngo Weinhold 48*a0a9d225SIngo Weinhold# If a build profile was specified on the command line, now is the time to 49*a0a9d225SIngo Weinhold# check whether it is unknown or one of the default profiles. 50*a0a9d225SIngo Weinholdif $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) { 51*a0a9d225SIngo Weinhold # define the obvious default profiles 52*a0a9d225SIngo Weinhold if $(HAIKU_BUILD_PROFILE) in image vmware-image install { 53*a0a9d225SIngo Weinhold DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ; 54*a0a9d225SIngo Weinhold } else { 55*a0a9d225SIngo Weinhold Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ; 56*a0a9d225SIngo Weinhold } 57*a0a9d225SIngo Weinhold} 58*a0a9d225SIngo Weinhold 59338b8dc3SIngo WeinholdPrepareConfigVariables ; 60