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