1338b8dc3SIngo WeinholdSubDir HAIKU_TOP ; 269b97469SIngo Weinhold 3f35b607dSJérôme DuvalNotFile doc_files ; 4f35b607dSJérôme DuvalDepends files : doc_files ; 5f35b607dSJérôme Duval 6f4eb5cf7SMatt Madia# Prepare the optional build features before parsing the Jamfile tree. 7b0944c78SIngo Weinholdlocal architectureObject ; 8b0944c78SIngo Weinholdfor architectureObject in [ MultiArchSubDirSetup ] { 9b0944c78SIngo Weinhold on $(architectureObject) { 10f0cacbb3SIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ; 11b0944c78SIngo Weinhold } 12b0944c78SIngo Weinhold} 13f4eb5cf7SMatt Madia 140e82d313SMatt Madia# Include packages that are required by all images. 1548b1ed42SIngo Weinholdif ! $(HAIKU_BOOTSTRAP_BUILD) { 16271e9484SIngo Weinhold # primary architecture 1778f4c163SIngo Weinhold AddHaikuImagePackages 185fd5e562SAlexander von Gluck IV bzip2 ctags grep sed tar which zlib 195fd5e562SAlexander von Gluck IV ffmpeg freetype icu jpeg libpng libsolv 205fd5e562SAlexander von Gluck IV mesa mesa_devel mesa_swrast glu 2178f4c163SIngo Weinhold ; 22271e9484SIngo Weinhold 23271e9484SIngo Weinhold # secondary architectures 24271e9484SIngo Weinhold local architectureObject ; 25271e9484SIngo Weinhold for architectureObject 26271e9484SIngo Weinhold in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] { 27271e9484SIngo Weinhold on $(architectureObject) { 28271e9484SIngo Weinhold AddHaikuImagePackages 29271e9484SIngo Weinhold ffmpeg freetype glu icu jpeg libpng libsolv mesa zlib 30271e9484SIngo Weinhold ; 31271e9484SIngo Weinhold } 32271e9484SIngo Weinhold } 3378f4c163SIngo Weinhold} 34429618d2SMatt Madia 35429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image. 3657190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] { 3798c6dfa4SIngo Weinhold AddHaikuImagePackages openssl ; 38429618d2SMatt Madia} 39a5c31cbbSMatt Madia 4024796718SIngo Weinhold# add additionally requested packages 4124796718SIngo WeinholdAddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ; 4224796718SIngo Weinhold 4348d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory. 4448d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) { 4548d60fa6SIngo Weinhold # Don't include "src", but at least include the stuff needed for the 4648d60fa6SIngo Weinhold # build. 4748d60fa6SIngo Weinhold SubInclude HAIKU_TOP src build ; 4848d60fa6SIngo Weinhold SubInclude HAIKU_TOP src tools ; 4948d60fa6SIngo Weinhold} else { 50338b8dc3SIngo Weinhold SubInclude HAIKU_TOP src ; 5148d60fa6SIngo Weinhold} 52a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) { 53a7ec9c1dSFrançois Revol SubInclude HAIKU_TOP 3rdparty ; 54a7ec9c1dSFrançois Revol} 5548d60fa6SIngo Weinhold 56be8a6e43SIngo Weinhold# Perform deferred SubIncludes. 57be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ; 58be8a6e43SIngo Weinhold 59689e6794SIngo Weinhold# reset subdir 60689e6794SIngo WeinholdSubDir HAIKU_TOP ; 61ad27081fSIngo Weinhold 62ad27081fSIngo Weinhold# Execute post-build-target user config rules. 63ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets ; 64689e6794SIngo Weinhold 65*be5e6fefSIngo Weinhold# specify the Haiku repository contents 66*be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ; 67*be5e6fefSIngo Weinhold 68b39c8d37SIngo Weinhold# specify the Haiku image and network boot archive contents 6978f4c163SIngo Weinholdif $(HAIKU_BOOTSTRAP_BUILD) { 7078f4c163SIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImageBootstrap ] ; 7178f4c163SIngo Weinhold} else { 72e8c5236aSIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ; 7378f4c163SIngo Weinhold} 74e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ; 75e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ; 76e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ; 77e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ; 78e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ; 79e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ; 8037aefc9cSIngo Weinhold 8137aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist. 8237aefc9cSIngo Weinholdlocal package ; 8337aefc9cSIngo Weinholdlocal packageError ; 8437aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) { 8537aefc9cSIngo Weinhold if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] { 8637aefc9cSIngo Weinhold Echo "ERROR: Requested optional package \"$(package)\" does not" 8737aefc9cSIngo Weinhold "exist." ; 8837aefc9cSIngo Weinhold packageError = 1 ; 8937aefc9cSIngo Weinhold } 9037aefc9cSIngo Weinhold} 9137aefc9cSIngo Weinholdif $(packageError) { 9237aefc9cSIngo Weinhold Exit ; 9337aefc9cSIngo Weinhold} 9480ad173eSMatt Madia 9580ad173eSMatt Madia# Pseudo-target to build all targets that are localized. 96a8fcb885SMatt MadiaNotFile LocalizedTargets ; 97a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ; 989de5b022SMatt Madia 999de5b022SMatt MadiaNotFile catalogs ; 1009de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ; 1019de5b022SMatt Madia 1029de5b022SMatt MadiaNotFile catkeys ; 1039de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ; 104