1338b8dc3SIngo WeinholdSubDir HAIKU_TOP ; 269b97469SIngo Weinhold 3f4eb5cf7SMatt Madia# Prepare the optional build features before parsing the Jamfile tree. 4b0944c78SIngo Weinholdlocal architectureObject ; 5b0944c78SIngo Weinholdfor architectureObject in [ MultiArchSubDirSetup ] { 6b0944c78SIngo Weinhold on $(architectureObject) { 7f0cacbb3SIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ; 8afde4473SOliver Tappe 9afde4473SOliver Tappe # Let the target platform depend on the external header directories such 10afde4473SOliver Tappe # that those will be unpacked before anything is built for the target 11afde4473SOliver Tappe # platform. 12afde4473SOliver Tappe Depends $(TARGET_PLATFORM) : [ 13afde4473SOliver Tappe BuildFeatureAttribute gcc_syslibs_devel : c++-headers 14afde4473SOliver Tappe ] [ 15afde4473SOliver Tappe BuildFeatureAttribute gcc_syslibs_devel : gcc-headers 16afde4473SOliver Tappe ] ; 17b0944c78SIngo Weinhold } 18b0944c78SIngo Weinhold} 19f4eb5cf7SMatt Madia 206d8c8a9dSOliver Tappe# Include required packages: 2172e67791SOliver Tappe# primary architecture 224f44282cSAdrien DestuguesAddHaikuImageSystemPackages [ FFilterByBuildFeatures 23*3b3bcbf7SAdrien Destugues bash bc coreutils freetype libsolv zlib 246d8c8a9dSOliver Tappe 25*3b3bcbf7SAdrien Destugues !gcc2 @{ icu66 }@ 26*3b3bcbf7SAdrien Destugues gcc2 @{ icu icu66_x86@secondary_x86 }@ 276d8c8a9dSOliver Tappe regular_image @{ 28*3b3bcbf7SAdrien Destugues bzip2 diffutils expat ffmpeg findutils glu gutenprint8 gzip 295e15819dSAugustin Cavalier lame less libedit libicns 30*3b3bcbf7SAdrien Destugues mawk mesa mesa_devel mesa_swpipe@!gcc2 mesa_swrast@gcc2 315e15819dSAugustin Cavalier netcat 32242c022aSJérôme Duval sed sharutils 33*3b3bcbf7SAdrien Destugues tcpdump unzip wget which zip 34*3b3bcbf7SAdrien Destugues 35*3b3bcbf7SAdrien Destugues !gcc2 @{ grep tar zstd }@ 36*3b3bcbf7SAdrien Destugues gcc2 @{ grep_x86@secondary_x86 tar_x86@secondary_x86 }@ 376d8c8a9dSOliver Tappe }@ 386d8c8a9dSOliver Tappe] ; 398547d09eSAugustin CavalierAddHaikuImageSourcePackages [ FFilterByBuildFeatures 408547d09eSAugustin Cavalier bash bc coreutils 418547d09eSAugustin Cavalier 428547d09eSAugustin Cavalier regular_image @{ 43*3b3bcbf7SAdrien Destugues expat ffmpeg findutils grep gutenprint8 gzip 44*3b3bcbf7SAdrien Destugues lame less libicns mawk 458547d09eSAugustin Cavalier sed sharutils 468547d09eSAugustin Cavalier tar wget which 478547d09eSAugustin Cavalier }@ 488547d09eSAugustin Cavalier] ; 49220d0402SOliver Tappeif $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 { 504f44282cSAdrien Destugues AddHaikuImageSystemPackages [ FFilterByBuildFeatures gcc_syslibs ] ; 51220d0402SOliver Tappe} 52220d0402SOliver Tappe 53220d0402SOliver Tappeif $(HAIKU_PACKAGING_ARCHS[2]) { 54271e9484SIngo Weinhold # secondary architectures 55271e9484SIngo Weinhold local architectureObject ; 56271e9484SIngo Weinhold for architectureObject 57271e9484SIngo Weinhold in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] { 58271e9484SIngo Weinhold on $(architectureObject) { 594f44282cSAdrien Destugues AddHaikuImageSystemPackages [ FFilterByBuildFeatures 60*3b3bcbf7SAdrien Destugues freetype icu libsolv zlib 616d8c8a9dSOliver Tappe 626d8c8a9dSOliver Tappe regular_image @{ 6397d08998SJérôme Duval ffmpeg glu jasper jpeg libicns libpng16 libwebp mesa 646d8c8a9dSOliver Tappe }@ 656d8c8a9dSOliver Tappe ] ; 66220d0402SOliver Tappe if $(TARGET_PACKAGING_ARCH) != x86_gcc2 { 674f44282cSAdrien Destugues AddHaikuImageSystemPackages [ FFilterByBuildFeatures gcc_syslibs 686454164dSJérôme Duval mesa_swpipe ] ; 69220d0402SOliver Tappe } 70220d0402SOliver Tappe } 71271e9484SIngo Weinhold } 7278f4c163SIngo Weinhold} 73429618d2SMatt Madia 74429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image. 7557190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] { 764f44282cSAdrien Destugues AddHaikuImageSystemPackages openssl ; 77429618d2SMatt Madia} 78a5c31cbbSMatt Madia 7924796718SIngo Weinhold# add additionally requested packages 804f44282cSAdrien DestuguesAddHaikuImageSystemPackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ; 8124796718SIngo Weinhold 8248d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory. 8348d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) { 8448d60fa6SIngo Weinhold # Don't include "src", but at least include the stuff needed for the 8548d60fa6SIngo Weinhold # build. 8648d60fa6SIngo Weinhold SubInclude HAIKU_TOP src build ; 8748d60fa6SIngo Weinhold SubInclude HAIKU_TOP src tools ; 8848d60fa6SIngo Weinhold} else { 89338b8dc3SIngo Weinhold SubInclude HAIKU_TOP src ; 9048d60fa6SIngo Weinhold} 91a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) { 92a7ec9c1dSFrançois Revol SubInclude HAIKU_TOP 3rdparty ; 93a7ec9c1dSFrançois Revol} 9448d60fa6SIngo Weinhold 95be8a6e43SIngo Weinhold# Perform deferred SubIncludes. 96be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ; 97be8a6e43SIngo Weinhold 98689e6794SIngo Weinhold# reset subdir 99689e6794SIngo WeinholdSubDir HAIKU_TOP ; 100ad27081fSIngo Weinhold 101ad27081fSIngo Weinhold# Execute post-build-target user config rules. 102ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets ; 103689e6794SIngo Weinhold 104be5e6fefSIngo Weinhold# specify the Haiku repository contents 105be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ; 106be5e6fefSIngo Weinhold 107ff35d6c1SOliver Tappe# specify the actual Haiku image contents 108e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ; 109ff35d6c1SOliver Tappe 110ff35d6c1SOliver Tappe# specify the additional image contents one for each boot type 111e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ; 112e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ; 113e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ; 114e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ; 115e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ; 116dd45d433SAlexander von Gluck IVinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images MMCImage ] ; 11737aefc9cSIngo Weinhold 11837aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist. 11937aefc9cSIngo Weinholdlocal package ; 12037aefc9cSIngo Weinholdlocal packageError ; 12137aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) { 12237aefc9cSIngo Weinhold if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] { 12337aefc9cSIngo Weinhold Echo "ERROR: Requested optional package \"$(package)\" does not" 12437aefc9cSIngo Weinhold "exist." ; 12537aefc9cSIngo Weinhold packageError = 1 ; 12637aefc9cSIngo Weinhold } 12737aefc9cSIngo Weinhold} 12837aefc9cSIngo Weinholdif $(packageError) { 12937aefc9cSIngo Weinhold Exit ; 13037aefc9cSIngo Weinhold} 13180ad173eSMatt Madia 13280ad173eSMatt Madia# Pseudo-target to build all targets that are localized. 133a8fcb885SMatt MadiaNotFile LocalizedTargets ; 134a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ; 1359de5b022SMatt Madia 1369de5b022SMatt MadiaNotFile catalogs ; 1379de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ; 1389de5b022SMatt Madia 1399de5b022SMatt MadiaNotFile catkeys ; 1409de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ; 141