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 ] ; 11*afde4473SOliver Tappe 12*afde4473SOliver Tappe # Let the target platform depend on the external header directories such 13*afde4473SOliver Tappe # that those will be unpacked before anything is built for the target 14*afde4473SOliver Tappe # platform. 15*afde4473SOliver Tappe Depends $(TARGET_PLATFORM) : [ 16*afde4473SOliver Tappe BuildFeatureAttribute gcc_syslibs_devel : c++-headers 17*afde4473SOliver Tappe ] [ 18*afde4473SOliver Tappe BuildFeatureAttribute gcc_syslibs_devel : gcc-headers 19*afde4473SOliver Tappe ] ; 20b0944c78SIngo Weinhold } 21b0944c78SIngo Weinhold} 22f4eb5cf7SMatt Madia 236d8c8a9dSOliver Tappe# Include required packages: 2472e67791SOliver Tappe# primary architecture 256d8c8a9dSOliver TappeAddHaikuImagePackages [ FFilterByBuildFeatures 266d8c8a9dSOliver Tappe curl freetype icu libsolv zlib 276d8c8a9dSOliver Tappe 286d8c8a9dSOliver Tappe regular_image @{ 29c73c8e23SJérôme Duval bzip2 ctags ffmpeg findutils gawk glu grep gutenprint jpeg less libpng 309cd7c6a4SJérôme Duval mesa mesa_devel mesa_swrast sed sharutils tar tiff wget which 316d8c8a9dSOliver Tappe }@ 326d8c8a9dSOliver Tappe] ; 33271e9484SIngo Weinhold# secondary architectures 34271e9484SIngo Weinholdlocal architectureObject ; 35271e9484SIngo Weinholdfor architectureObject 36271e9484SIngo Weinhold in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] { 37271e9484SIngo Weinhold on $(architectureObject) { 386d8c8a9dSOliver Tappe AddHaikuImagePackages [ FFilterByBuildFeatures 396d8c8a9dSOliver Tappe curl freetype icu libsolv zlib 406d8c8a9dSOliver Tappe 416d8c8a9dSOliver Tappe regular_image @{ 4272e67791SOliver Tappe ffmpeg glu jpeg libpng mesa 436d8c8a9dSOliver Tappe }@ 446d8c8a9dSOliver Tappe ] ; 45271e9484SIngo Weinhold } 4678f4c163SIngo Weinhold} 47429618d2SMatt Madia 48429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image. 4957190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] { 5098c6dfa4SIngo Weinhold AddHaikuImagePackages openssl ; 51429618d2SMatt Madia} 52a5c31cbbSMatt Madia 5324796718SIngo Weinhold# add additionally requested packages 5424796718SIngo WeinholdAddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ; 5524796718SIngo Weinhold 5648d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory. 5748d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) { 5848d60fa6SIngo Weinhold # Don't include "src", but at least include the stuff needed for the 5948d60fa6SIngo Weinhold # build. 6048d60fa6SIngo Weinhold SubInclude HAIKU_TOP src build ; 6148d60fa6SIngo Weinhold SubInclude HAIKU_TOP src tools ; 6248d60fa6SIngo Weinhold} else { 63338b8dc3SIngo Weinhold SubInclude HAIKU_TOP src ; 6448d60fa6SIngo Weinhold} 65a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) { 66a7ec9c1dSFrançois Revol SubInclude HAIKU_TOP 3rdparty ; 67a7ec9c1dSFrançois Revol} 6848d60fa6SIngo Weinhold 69be8a6e43SIngo Weinhold# Perform deferred SubIncludes. 70be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ; 71be8a6e43SIngo Weinhold 72689e6794SIngo Weinhold# reset subdir 73689e6794SIngo WeinholdSubDir HAIKU_TOP ; 74ad27081fSIngo Weinhold 75ad27081fSIngo Weinhold# Execute post-build-target user config rules. 76ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets ; 77689e6794SIngo Weinhold 78be5e6fefSIngo Weinhold# specify the Haiku repository contents 79be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ; 80be5e6fefSIngo Weinhold 81ff35d6c1SOliver Tappe# specify the actual Haiku image contents 82e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ; 83ff35d6c1SOliver Tappe 84ff35d6c1SOliver Tappe# specify the additional image contents one for each boot type 85e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ; 86e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ; 87e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ; 88e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ; 89e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ; 90e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ; 9137aefc9cSIngo Weinhold 9237aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist. 9337aefc9cSIngo Weinholdlocal package ; 9437aefc9cSIngo Weinholdlocal packageError ; 9537aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) { 9637aefc9cSIngo Weinhold if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] { 9737aefc9cSIngo Weinhold Echo "ERROR: Requested optional package \"$(package)\" does not" 9837aefc9cSIngo Weinhold "exist." ; 9937aefc9cSIngo Weinhold packageError = 1 ; 10037aefc9cSIngo Weinhold } 10137aefc9cSIngo Weinhold} 10237aefc9cSIngo Weinholdif $(packageError) { 10337aefc9cSIngo Weinhold Exit ; 10437aefc9cSIngo Weinhold} 10580ad173eSMatt Madia 10680ad173eSMatt Madia# Pseudo-target to build all targets that are localized. 107a8fcb885SMatt MadiaNotFile LocalizedTargets ; 108a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ; 1099de5b022SMatt Madia 1109de5b022SMatt MadiaNotFile catalogs ; 1119de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ; 1129de5b022SMatt Madia 1139de5b022SMatt MadiaNotFile catkeys ; 1149de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ; 115