1SubDir HAIKU_TOP ; 2 3NotFile doc_files ; 4Depends files : doc_files ; 5 6# Prepare the optional build features before parsing the Jamfile tree. 7local architectureObject ; 8for architectureObject in [ MultiArchSubDirSetup ] { 9 on $(architectureObject) { 10 include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ; 11 12 # Let the target platform depend on the external header directories such 13 # that those will be unpacked before anything is built for the target 14 # platform. 15 Depends $(TARGET_PLATFORM) : [ 16 BuildFeatureAttribute gcc_syslibs_devel : c++-headers 17 ] [ 18 BuildFeatureAttribute gcc_syslibs_devel : gcc-headers 19 ] ; 20 } 21} 22 23# Include required packages: 24# primary architecture 25AddHaikuImagePackages [ FFilterByBuildFeatures 26 bash curl freetype icu libsolv zlib 27 28 regular_image @{ 29 bzip2 ctags ffmpeg findutils gawk glu grep gutenprint jasper jpeg 30 less libicns libpng libpng16 libwebp mesa mesa_devel mesa_swrast 31 sed sharutils 32 tar tiff wget which 33 }@ 34] ; 35if $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 { 36 AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ; 37} 38 39if $(HAIKU_PACKAGING_ARCHS[2]) { 40 # secondary architectures 41 local architectureObject ; 42 for architectureObject 43 in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] { 44 on $(architectureObject) { 45 AddHaikuImagePackages [ FFilterByBuildFeatures 46 curl freetype icu libsolv zlib 47 48 regular_image @{ 49 ffmpeg glu jasper jpeg libicns libpng libwebp mesa 50 }@ 51 ] ; 52 if $(TARGET_PACKAGING_ARCH) != x86_gcc2 { 53 AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ; 54 } 55 } 56 } 57} 58 59# If enabled, make sure that OpenSSL is added to the image. 60if [ FIsBuildFeatureEnabled openssl ] { 61 AddHaikuImagePackages openssl ; 62} 63 64# add additionally requested packages 65AddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ; 66 67# Optionally we allow not to include the "src" subdirectory. 68if $(HAIKU_DONT_INCLUDE_SRC) { 69 # Don't include "src", but at least include the stuff needed for the 70 # build. 71 SubInclude HAIKU_TOP src build ; 72 SubInclude HAIKU_TOP src tools ; 73} else { 74 SubInclude HAIKU_TOP src ; 75} 76if $(HAIKU_INCLUDE_3RDPARTY) { 77 SubInclude HAIKU_TOP 3rdparty ; 78} 79 80# Perform deferred SubIncludes. 81ExecuteDeferredSubIncludes ; 82 83# reset subdir 84SubDir HAIKU_TOP ; 85 86# Execute post-build-target user config rules. 87UserBuildConfigRulePostBuildTargets ; 88 89# specify the Haiku repository contents 90include [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ; 91 92# specify the actual Haiku image contents 93include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ; 94 95# specify the additional image contents one for each boot type 96include [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ; 97include [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ; 98include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ; 99include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ; 100include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ; 101include [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ; 102 103# Check whether all requested optional packages do actually exist. 104local package ; 105local packageError ; 106for package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) { 107 if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] { 108 Echo "ERROR: Requested optional package \"$(package)\" does not" 109 "exist." ; 110 packageError = 1 ; 111 } 112} 113if $(packageError) { 114 Exit ; 115} 116 117# Pseudo-target to build all targets that are localized. 118NotFile LocalizedTargets ; 119Depends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ; 120 121NotFile catalogs ; 122Depends catalogs : $(HAIKU_LOCALE_CATALOGS) ; 123 124NotFile catkeys ; 125Depends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ; 126