2005-10-29 18:27:43 +02:00
|
|
|
# Haiku Jamrules
|
2005-03-05 15:11:02 +01:00
|
|
|
|
2005-10-29 18:27:43 +02:00
|
|
|
# Main directories used by the build.
|
|
|
|
HAIKU_OUTPUT_DIR ?= [ FDirName $(HAIKU_TOP) generated ] ;
|
|
|
|
HAIKU_BUILD_OUTPUT_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) build ] ;
|
|
|
|
HAIKU_BUILD_DIR = [ FDirName $(HAIKU_TOP) build ] ;
|
|
|
|
HAIKU_BUILD_RULES_DIR = [ FDirName $(HAIKU_BUILD_DIR) jam ] ;
|
|
|
|
HAIKU_OBJECT_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) objects ] ;
|
|
|
|
HAIKU_COMMON_PLATFORM_OBJECT_DIR = [ FDirName $(HAIKU_OBJECT_DIR) common ] ;
|
2007-09-05 20:36:17 +02:00
|
|
|
HAIKU_DOWNLOAD_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) download ] ;
|
2009-04-08 12:07:17 +02:00
|
|
|
HAIKU_OPTIONAL_BUILD_PACKAGES_DIR = [ FDirName $(HAIKU_OUTPUT_DIR)
|
|
|
|
build_packages ] ;
|
2002-11-20 01:46:04 +01:00
|
|
|
|
|
|
|
# Cache files for header scanning and jamfile caching
|
|
|
|
HCACHEFILE = header_cache ;
|
|
|
|
JCACHEFILE = jamfile_cache ;
|
2005-10-29 18:27:43 +02:00
|
|
|
LOCATE on $(HCACHEFILE) $(JCACHEFILE) = $(HAIKU_BUILD_OUTPUT_DIR) ;
|
|
|
|
|
2008-10-23 23:45:24 +02:00
|
|
|
# include BuildConfig
|
|
|
|
local buildConfig = [ GLOB $(HAIKU_BUILD_OUTPUT_DIR) : BuildConfig ] ;
|
|
|
|
if ! $(buildConfig) {
|
|
|
|
ECHO "No `BuildConfig' found in $(HAIKU_BUILD_OUTPUT_DIR)!" ;
|
|
|
|
EXIT "Run ./configure in the source tree's root directory first!" ;
|
|
|
|
}
|
|
|
|
LOCATE on BuildConfig = $(HAIKU_BUILD_OUTPUT_DIR) ;
|
|
|
|
include BuildConfig ;
|
|
|
|
|
2005-10-29 18:27:43 +02:00
|
|
|
# The build setup and rules are neatly organized in several files. Include
|
|
|
|
# them now. Start with the side-effect-less rules, since they are the most
|
|
|
|
# likely to be used in the top level context (i.e. not only in rules).
|
|
|
|
# At the end include BuildSetup that sets up global variables etc. The
|
|
|
|
# optional user-defined UserBuildConfig is included thereafter.
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) HelperRules ] ;
|
2007-04-06 04:37:12 +02:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) MathRules ] ;
|
2005-10-29 18:27:43 +02:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) BeOSRules ] ;
|
2009-02-23 23:33:09 +01:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) CommandLineArguments ] ;
|
2005-10-29 18:27:43 +02:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) ConfigRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) DocumentationRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) FileRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) FreetypeRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) HeadersRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) KernelRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) ImageRules ] ;
|
2009-02-15 03:34:32 +01:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) CDRules ] ;
|
2005-10-29 18:27:43 +02:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) MainBuildRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) MiscRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OverriddenJamRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) PackageRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) TestsRules ] ;
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildSetup ] ;
|
|
|
|
|
2008-12-03 03:02:28 +01:00
|
|
|
# Declare no-op user-overridable build rules.
|
|
|
|
rule UserBuildConfigRulePostBuildTargets { }
|
|
|
|
rule UserBuildConfigRulePreImage { }
|
|
|
|
rule UserBuildConfigRulePostImage { }
|
|
|
|
|
2005-10-29 18:27:43 +02:00
|
|
|
# Include UserBuildConfig.
|
2009-05-27 02:45:44 +02:00
|
|
|
if ! $(HAIKU_IGNORE_USER_BUILD_CONFIG) {
|
2005-10-29 18:27:43 +02:00
|
|
|
local userBuildConfig
|
|
|
|
= [ GLOB $(HAIKU_BUILD_RULES_DIR) : UserBuildConfig ] ;
|
|
|
|
if $(userBuildConfig) {
|
|
|
|
include $(userBuildConfig) ;
|
|
|
|
}
|
2009-02-08 14:20:19 +01:00
|
|
|
|
|
|
|
# allow for a separate UserBuildConfig per output directory
|
|
|
|
local userBuildConfig
|
|
|
|
= [ GLOB $(HAIKU_OUTPUT_DIR) : UserBuildConfig ] ;
|
|
|
|
if $(userBuildConfig) {
|
|
|
|
include $(userBuildConfig) ;
|
|
|
|
}
|
2005-10-29 18:27:43 +02:00
|
|
|
}
|
|
|
|
|
2008-10-22 17:52:36 +02:00
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) ReleaseBuildProfiles ] ;
|
|
|
|
|
2008-04-02 22:29:43 +02:00
|
|
|
# If a build profile was specified on the command line, now is the time to
|
|
|
|
# check whether it is unknown or one of the default profiles.
|
|
|
|
if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
|
|
|
|
# define the obvious default profiles
|
|
|
|
if $(HAIKU_BUILD_PROFILE) in image vmware-image install {
|
|
|
|
DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
|
|
|
|
} else {
|
|
|
|
Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
[ARM]
- consolidate board specific definitions into build/jam/board/*/BoardSetup to avoid duplicating address values everywhere,
- add various addresses, boot script, custom C/C++ flags and SD card definition,
- not sure BoardSetup is included at the best place though,
- replaced board-specific ldscript with passing the loader address directly to LD from BoardSetup,
- added haiku.mmc target which generates an mmc/SD card image with a FAT partition with the files needed to boot for the board, should later be integrated with haiku.image with the BFS partition offset passed to bfs_shell, requires apt:sfdisk,mtools on GNU/Linux,
- added some more rules, one to build a script for the SD image,
- fake a NetBSD loader for now, U-Boot doesn't know haiku, and we'll need a way to pass the tgz image and RAM size, we'll either use standlone way (usual C argv[]) or the NetBSD args,
- style fixes,
- 80 cols, /me pets Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-12 18:12:35 +02:00
|
|
|
# Include embedded board-specific file.
|
|
|
|
# UserBuildConfig can override HAIKU_BOOT_BOARD.
|
|
|
|
if $(HAIKU_BOOT_BOARD) {
|
|
|
|
include [ FDirName $(HAIKU_BUILD_RULES_DIR) board $(HAIKU_BOOT_BOARD) BoardSetup ] ;
|
|
|
|
}
|
|
|
|
|
2005-10-29 18:27:43 +02:00
|
|
|
PrepareConfigVariables ;
|