1# set HAIKU_BUILD_TYPE early 2switch $(HAIKU_BUILD_PROFILE) { 3 case "bootstrap-*" : { 4 HAIKU_BUILD_TYPE = bootstrap ; 5 EnableBuildFeatures bootstrap_image ; 6 7 # Add a third pseudo target for the platform used when building anything 8 # for stage0 of the bootstrap process. 9 NotFile bootstrap_stage0 ; 10 11 HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ; 12 TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ; 13 } 14 15 case "minimum-*" : { 16 HAIKU_BUILD_TYPE = minimum ; 17 EnableBuildFeatures minimum_image ; 18 19 HAIKU_DEFINES += HAIKU_MINIMUM_BUILD ; 20 TARGET_DEFINES += HAIKU_MINIMUM_BUILD ; 21 } 22 23 case "*" : { 24 HAIKU_BUILD_TYPE = regular ; 25 EnableBuildFeatures regular_image ; 26 27 HAIKU_DEFINES += HAIKU_REGULAR_BUILD ; 28 TARGET_DEFINES += HAIKU_REGULAR_BUILD ; 29 } 30} 31Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ; 32 33 34rule DefineDefaultBuildProfiles 35{ 36 # release profiles 37 DefineBuildProfile release-raw : image : "haiku-release.image" ; 38 DefineBuildProfile release-vmware : vmware-image : "haiku-release.vmdk" ; 39 DefineBuildProfile release-cd : cd-image : "haiku-release.iso" ; 40 DefineBuildProfile release-anyboot : anyboot-image 41 : "haiku-release-anyboot.iso" ; 42 43 # nightly profiles 44 DefineBuildProfile nightly-raw : image : "haiku-nightly.image" ; 45 DefineBuildProfile nightly-mmc : haiku-mmc-image : "haiku-nightly.mmc" ; 46 DefineBuildProfile nightly-vmware : vmware-image : "haiku-nightly.vmdk" ; 47 DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ; 48 DefineBuildProfile nightly-anyboot : anyboot-image 49 : "haiku-nightly-anyboot.iso" ; 50 51 # bootstrap profiles 52 DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ; 53 DefineBuildProfile bootstrap-mmc : haiku-mmc-image : "haiku-bootstrap.mmc" ; 54 DefineBuildProfile bootstrap-vmware : vmware-image 55 : "haiku-bootstrap.vmdk" ; 56 DefineBuildProfile bootstrap-anyboot : anyboot-image 57 : "haiku-bootstrap-anyboot.iso" ; 58 59 # minimum profiles 60 DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ; 61 DefineBuildProfile minimum-mmc : haiku-mmc-image : "haiku-minimum.mmc" ; 62 DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ; 63 DefineBuildProfile minimum-cd : cd-image : "haiku-minimum.iso" ; 64 DefineBuildProfile minimum-anyboot : anyboot-image 65 : "haiku-minimum-anyboot.iso" ; 66 67 switch $(HAIKU_BUILD_PROFILE) { 68 case "release-*" : { 69 Echo Building Haiku R1/development preview ; 70 HAIKU_ROOT_USER_NAME ?= user ; 71 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 72 AddGroupToHaikuImage party : 101 : user sshd ; 73 HAIKU_IMAGE_HOST_NAME ?= shredder ; 74 75 if $(HAIKU_INCLUDE_SOURCES) = 1 || $(DEBUG) != 0 { 76 HAIKU_IMAGE_SIZE ?= 1400 ; 77 } else { 78 HAIKU_IMAGE_SIZE ?= 800 ; 79 } 80 81 AddHaikuImageSystemPackages 82 bepdf 83 keymapswitcher 84 mandoc 85 noto 86 noto_sans_cjk_jp 87 openssh 88 pdfwriter 89 pe 90 timgmsoundfont 91 vision 92 wpa_supplicant 93 # Some packages can't be built with gcc2, so we install the gcc13 94 # secondary architecture package instead in this case 95 !gcc2 @{ nano p7zip python3.9 xz_utils }@ 96 gcc2 @{ nano_x86@secondary_x86 p7zip_x86@secondary_x86 97 python3.9_x86@secondary_x86 xz_utils_x86@secondary_x86 }@ 98 ; 99 AddHaikuImageSourcePackages 100 bepdf 101 nano 102 p7zip 103 ; 104 105 local architectureObject ; 106 for architectureObject in [ MultiArchSubDirSetup ] { 107 on $(architectureObject) { 108 AddHaikuImageSystemPackages openssl wonderbrush@gcc2 ; 109 } 110 } 111 112 AddOptionalHaikuImagePackages BeBook Development Git Welcome ; 113 114 # WebPositive can only built for x86_gcc2, x86 and x86_64 115 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 116 AddOptionalHaikuImagePackages WebPositive ; 117 } else { 118 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 119 } 120 } 121 122 case "nightly-*" : { 123 Echo Building Haiku Nightly ; 124 HAIKU_ROOT_USER_NAME ?= user ; 125 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 126 AddGroupToHaikuImage party : 101 : user sshd ; 127 HAIKU_IMAGE_HOST_NAME ?= shredder ; 128 if $(DEBUG) != 0 { 129 HAIKU_IMAGE_SIZE ?= 850 ; 130 } 131 HAIKU_IMAGE_SIZE ?= 600 ; 132 HAIKU_NIGHTLY_BUILD = 1 ; 133 134 AddHaikuImageSystemPackages 135 mandoc 136 noto 137 openssh 138 openssl 139 pe 140 vision 141 wpa_supplicant 142 # xz_utils can't be built with gcc2, so we install it for 143 # primary gcc 8 architectures or gcc 2 hybrids. 144 !gcc2 @{ nano p7zip xz_utils }@ 145 gcc2 @{ 146 nano_x86@secondary_x86 147 p7zip_x86@secondary_x86 148 xz_utils_x86@secondary_x86 149 }@ 150 ; 151 AddHaikuImageSourcePackages 152 nano 153 p7zip 154 ; 155 156 AddOptionalHaikuImagePackages Development Git ; 157 158 # WebPositive can only built for x86_gcc2, x86 and x86_64 159 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 160 AddOptionalHaikuImagePackages WebPositive ; 161 } else { 162 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 163 } 164 } 165 166 case "minimum-*" : { 167 Echo Building Haiku Minimum Target ; 168 HAIKU_IMAGE_HOST_NAME ?= shredder ; 169 if $(DEBUG) != 0 { 170 HAIKU_IMAGE_SIZE ?= 450 ; 171 } 172 173 AddHaikuImageSystemPackages 174 openssl 175 ; 176 } 177 178 case "bootstrap-*" : { 179 Echo Building Haiku Bootstrap ; 180 HAIKU_IMAGE_HOST_NAME ?= shredder ; 181 HAIKU_IMAGE_SIZE ?= 20000 ; 182 183 AddHaikuImageSystemPackages 184 binutils 185 bison 186 expat 187 flex 188 gcc 189 grep 190 haikuporter 191 less 192 libedit 193 make 194 ncurses6 195 noto 196 python 197 sed 198 texinfo 199 !gcc2 @{ gawk grep }@ 200 gcc2 @{ grep_x86@secondary_x86 mawk }@ 201 ; 202 203 AddHaikuImageDisabledPackages 204 freetype_devel 205 libedit_devel 206 ncurses6_devel 207 zlib_devel 208 ; 209 210 # secondary architecture packages 211 local architectureObject ; 212 for architectureObject 213 in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] { 214 on $(architectureObject) { 215 AddHaikuImageSystemPackages 216 binutils 217 expat 218 freetype 219 gcc 220 icu@gcc2 icu74@!gcc2 221 libsolv 222 libedit 223 ncurses6 224 zlib 225 ; 226 AddHaikuImageDisabledPackages 227 freetype_devel 228 libedit_devel 229 ncurses6_devel 230 zlib_devel 231 ; 232 } 233 } 234 235 AddOptionalHaikuImagePackages DevelopmentMin ; 236 } 237 } 238 239 240 # Uncomment in official release branch. 241 #HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ; 242 #TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ; 243 244 245 # If a build profile was specified on the command line, now is the time to 246 # check whether it is unknown or one of the default profiles. 247 if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) { 248 # define the obvious default profiles 249 if $(HAIKU_BUILD_PROFILE) in cd-image install vmware-image { 250 DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ; 251 } else { 252 Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ; 253 } 254 } 255} 256