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