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